From 994531ea2607430d8bb395785106b478605c8960 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 9 Jul 2018 11:46:11 +0200 Subject: [PATCH] luci-app-adblock: align blocklist markup with recent changes Signed-off-by: Jo-Philipp Wich --- .../luasrc/view/adblock/blocklist.htm | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm index 81622e9bc6..93713c92b1 100644 --- a/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm +++ b/applications/luci-app-adblock/luasrc/view/adblock/blocklist.htm @@ -33,7 +33,6 @@ end margin-left:0px; padding-left:2px; line-height:20px; - height:20px; } .table.cbi-section-table .th { @@ -55,6 +54,11 @@ end } +<%- + local anonclass = (not self.anonymous or self.sectiontitle) and "named" or "anonymous" + local titlename = ifattr(not self.anonymous or self.sectiontitle, "data-title", translate("Name")) +-%> +
<% if self.title then -%> <%=self.title%> @@ -62,12 +66,7 @@ end
<%=self.description%>
-
- <%- if self.sectionhead then -%> -
<%=self.sectionhead%>
- <%- else -%> -
 
- <%- end -%> +
> <%- for i, k in pairs(self.children) do -%>
> <%-=k.title-%> @@ -76,12 +75,14 @@ end
<%- local isempty = true for i, k in ipairs(self:cfgsections()) do - section = k + local section = k + local sectionname = striptags((type(self.sectiontitle) == "function") and self:sectiontitle(section) or k) + local sectiontitle = ifattr(sectionname and (not self.anonymous or self.sectiontitle), "data-title", sectionname) + isempty = false scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } -%> -
-
<%=k%>
+
> <%- for k, node in ipairs(self.children) do node:render(section, scope or {}) -- 2.30.2