2 Copyright
2017-
2018 Dirk Brenken (dev@brenken.org)
3 This is free software, licensed under the Apache License, Version
2.0
10 return (rowcnt %
2) +
1
15 if type(o.width) == 'number' then
16 return '
style=
"width:%dpx"' % o.width
18 return '
style=
"width:%s"' % o.width
24 <style type=
"text/css">
25 table.cbi-section-table th,
26 table.cbi-section-table td,
27 .cbi-section-table-cell,
28 .cbi-section-table-row,
40 background:transparent;
48 <fieldset class=
"cbi-section" id=
"cbi-<%=self.config%>-<%=self.sectiontype%>">
49 <% if self.title then -%
>
50 <legend><%=self.title%
></legend>
52 <div class=
"cbi-section-descr"><%=self.description%
></div>
53 <div class=
"cbi-section-node">
54 <div class=
"table cbi-section-table">
55 <div class=
"tr cbi-section-table-titles">
56 <%- if self.sectionhead then -%
>
57 <div class=
"th cbi-section-table-cell"><%=self.sectionhead%
></div>
59 <div class=
"th"> </div>
61 <%- for i, k in pairs(self.children) do -%
>
62 <div class=
"th cbi-section-table-cell"<%=width(k)%
>>
67 <%- local isempty = true
68 for i, k in ipairs(self:cfgsections()) do
71 scope = { valueheader =
"cbi/cell_valueheader", valuefooter =
"cbi/cell_valuefooter" }
73 <div class=
"tr cbi-section-table-row" id=
"cbi-<%=self.config%>-<%=section%>">
74 <div class=
"th"><%=k%
></div>
76 for k, node in ipairs(self.children) do
77 node:render(section, scope or {})
79 if not scope.cbid:match(
"adb_src_cat") then
81 <div class=
"td cbi-value-field"> </div>