<%# Copyright 2017-2018 Dirk Brenken (dev@brenken.org) This is free software, licensed under the Apache License, Version 2.0 -%> <%- local rowcnt = 1 function rowstyle() rowcnt = rowcnt + 1 return (rowcnt % 2) + 1 end function width(o) if o.width then if type(o.width) == 'number' then return ' style="width:%dpx"' % o.width end return ' style="width:%s"' % o.width end return '' end -%>
<% if self.title then -%> <%=self.title%> <%- end %>
<%=self.description%>
<%- local count = 0 -%> <%- if self.sectionhead then -%> <%- else -%> <%- end -%> <%- for i, k in pairs(self.children) do -%> <%- count = count + 1; end; -%> <%- local isempty = true for i, k in ipairs(self:cfgsections()) do section = k isempty = false scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } -%> <%- for k, node in ipairs(self.children) do if not node.optional then node:render(section, scope or {}) end end -%> <%- end -%> <%- if isempty then -%> <%- end -%>
<%=self.sectionhead%> > <%-=k.title-%>
<%=k%>

<%:This section contains no values yet%>