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
38 .table.cbi-section-table .th
42 .table.cbi-section-table input
52 background:transparent;
58 <fieldset class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
59 <% if self.title then -%>
60 <legend><%=self.title%></legend>
62 <div class="cbi-section-descr"><%=self.description%></div>
63 <div class="cbi-section-node">
64 <div class="table cbi-section-table">
65 <div class="tr cbi-section-table-titles">
66 <%- if self.sectionhead then -%>
67 <div class="th cbi-section-table-cell"><%=self.sectionhead%></div>
69 <div class="th"> </div>
71 <%- for i, k in pairs(self.children) do -%>
72 <div class="th cbi-section-table-cell"<%=width(k)%>>
77 <%- local isempty = true
78 for i, k in ipairs(self:cfgsections()) do
81 scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" }
83 <div class="tr cbi-section-table-row" id="cbi-<%=self.config%>-<%=section%>">
84 <div class="th"><%=k%></div>
86 for k, node in ipairs(self.children) do
87 node:render(section, scope or {})
89 if not scope.cbid:match("adb_src_cat") then
91 <div class="td cbi-value-field"> </div>