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 <style type=
"text/css">
11 .table.cbi-section-table .th,
12 .table.cbi-section-table .td,
13 .cbi-section-table-cell,
14 .cbi-section-table-row,
15 .tr[data-title]::before
22 .table.cbi-section-table .th
26 .table.cbi-section-table input
30 .cbi-section-table-row
> .cbi-value-field [data-dynlist]
> input,
31 .table.cbi-section-table input
42 background:transparent;
47 <div class=
"cbi-section" id=
"cbi-<%=self.config%>-<%=self.sectiontype%>">
48 <% if self.title then -%
>
49 <legend><%=self.title%
></legend>
51 <div class=
"cbi-section-descr"><%=self.description%
></div>
52 <div class=
"cbi-section-node">
53 <div class=
"table cbi-section-table">
54 <div class=
"tr cbi-section-table-titles <%=anonclass%>">
55 <%- for i, k in pairs(self.children) do -%
>
56 <div class=
"th cbi-section-table-cell">
61 <%- local section, scope, isempty = true
62 for i, k in ipairs(self:cfgsections()) do
64 local sectionname = striptags((type(self.sectiontitle) ==
"function") and self:sectiontitle(section) or k)
65 local sectiontitle = ifattr(sectionname and (not self.anonymous or self.sectiontitle),
"data-title", sectionname)
67 scope = { valueheader =
"cbi/cell_valueheader", valuefooter =
"cbi/cell_valuefooter" }
69 <div class=
"tr cbi-section-table-row" id=
"cbi-<%=self.config%>-<%=section%>"<%=sectiontitle%
>>
71 for k, node in ipairs(self.children) do
72 node:render(section, scope or {})
74 if not scope.cbid:match(
"adb_src_cat") then
76 <div class=
"td cbi-value-field"> </div>