X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fcbi%2Fluasrc%2Fview%2Fcbi%2Ftblsection.htm;h=d03d6f49714b7649ea270d23a8bcc42d9c66019a;hp=46f7e5115d714876caea627d5e2365fcbc01c90d;hb=68d499edb91de2d73f14d5dcc4d6328fff2e23ea;hpb=07fdaa87dbac0582960cded4e9aa981d4a141782 diff --git a/libs/cbi/luasrc/view/cbi/tblsection.htm b/libs/cbi/luasrc/view/cbi/tblsection.htm index 46f7e5115..d03d6f497 100644 --- a/libs/cbi/luasrc/view/cbi/tblsection.htm +++ b/libs/cbi/luasrc/view/cbi/tblsection.htm @@ -12,10 +12,19 @@ You may obtain a copy of the License at $Id$ -%> +<%- +local rowcnt = 1 +function rowstyle() + rowcnt = rowcnt + 1 + return (rowcnt % 2) + 1 +end +-%> -
-

<%=self.title%>

+
+ <% if self.title and #self.title > 0 then -%> + <%=self.title%> + <%- end %>
<%=self.description%>
<%- local count = 0 -%> @@ -24,24 +33,24 @@ $Id$ <%- if not self.anonymous then -%>   <%- end -%> - <%- for i, k in pairs(self.children) do -%> - <%=k.title%> - <%- count = count + 1; end; if self.extedit then -%> -   - <%- count = count + 1; end; if self.addremove then -%> + <%- for i, k in pairs(self.children) do if not k.optional then -%> + + <%- if k.titleref then -%><%- end -%> + <%-=k.title-%> + <%- if k.titleref then -%><%- end -%> + + <%- count = count + 1; end; end; if self.extedit or self.addremove then -%>   <%- count = count + 1; end -%> <%- if not self.anonymous then -%> -   + <%- end -%> - <%- for i, k in pairs(self.children) do -%> + <%- for i, k in pairs(self.children) do if not k.optional then -%> <%=k.description%> - <%- end; if self.extedit then -%> -   - <%- end; if self.addremove then -%> -   + <%- end; end; if self.extedit or self.addremove then -%> + <%- end -%> <%- local isempty = true @@ -50,25 +59,29 @@ $Id$ isempty = false scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } -%> - + <% if not self.anonymous then -%>

<%=k%>

<%- end %> - <%-+cbi/ucisection-%> + + + <%- + for k, node in ipairs(self.children) do + if not node.optional then + node:render(section, scope or {}) + end + end + -%> + <%- if self.extedit or self.addremove then -%> <%- if self.extedit then -%> - <%:edit%> + <%:edit%> <%- end; if self.addremove then %> - + <%- end -%> <%- end -%> - <%- if self.addremove then -%> - - - - <%- end -%> <%- end -%> @@ -79,15 +92,14 @@ $Id$ <%- end -%> <%- if self.addremove then -%> -
<% if self.anonymous then %> - + <% else %> - + <% end %> <% if self.err_invalid then %> @@ -98,5 +110,5 @@ $Id$
<%- end -%>
-
+