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 input
48 background:transparent;
54 <fieldset class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
55 <% if self.title then -%>
56 <legend><%=self.title%></legend>
58 <div class="cbi-section-descr"><%=self.description%></div>
59 <div class="cbi-section-node">
60 <div class="table cbi-section-table">
61 <div class="tr cbi-section-table-titles">
62 <%- if self.sectionhead then -%>
63 <div class="th cbi-section-table-cell"><%=self.sectionhead%></div>
65 <div class="th"> </div>
67 <%- for i, k in pairs(self.children) do -%>
68 <div class="th cbi-section-table-cell"<%=width(k)%>>
73 <%- local isempty = true
74 for i, k in ipairs(self:cfgsections()) do
77 scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" }
79 <div class="tr cbi-section-table-row" id="cbi-<%=self.config%>-<%=section%>">
80 <div class="th"><%=k%></div>
82 for k, node in ipairs(self.children) do
83 node:render(section, scope or {})
85 if not scope.cbid:match("adb_src_cat") then
87 <div class="td cbi-value-field"> </div>