2 Copyright
2017-
2018 Dirk Brenken (dev@brenken.org)
3 This is free software, licensed under the Apache License, Version
2.0
7 local anonclass = (not self.anonymous or self.sectiontitle) and
"named" or
"anonymous"
10 <%+adblock/adblock_css%
>
12 <div class=
"cbi-section" id=
"cbi-<%=self.config%>-<%=self.sectiontype%>">
13 <% if self.title then -%
>
14 <h3><%=self.title%
></h3>
16 <div class=
"cbi-section-descr"><%=self.description%
></div>
17 <div class=
"cbi-section-node">
18 <div class=
"table cbi-section-table">
19 <div class=
"tr cbi-section-table-titles <%=anonclass%>">
20 <%- for i, k in pairs(self.children) do -%
>
21 <div class=
"th cbi-section-table-cell">
26 <%- local section, scope, isempty = true
27 for i, k in ipairs(self:cfgsections()) do
29 local sectionname = striptags((type(self.sectiontitle) ==
"function") and self:sectiontitle(section) or k)
30 local sectiontitle = ifattr(sectionname and (not self.anonymous or self.sectiontitle),
"data-title", sectionname, true)
32 scope = { valueheader =
"cbi/cell_valueheader", valuefooter =
"cbi/cell_valuefooter" }
34 <div class=
"tr cbi-section-table-row" id=
"cbi-<%=self.config%>-<%=section%>"<%=sectiontitle%
>>
36 for k, node in ipairs(self.children) do
37 node:render(section, scope or {})
39 if not scope.cbid:match(
"adb_src_cat") then
41 <div class=
"td cbi-value-field"> </div>