X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fcbi%2Fluasrc%2Fview%2Fcbi%2Ftblsection.htm;h=99b5b97b576eb9b285be9d46acd0831bfe02443b;hp=979a135b5452154367efac532cc1befac63a5d99;hb=892ed55ba08d3d5553e621e57d69a3eb8ffa4efc;hpb=1dacc5c20affa5767772546fc2f54fab41916457 diff --git a/libs/cbi/luasrc/view/cbi/tblsection.htm b/libs/cbi/luasrc/view/cbi/tblsection.htm index 979a135b5..99b5b97b5 100644 --- a/libs/cbi/luasrc/view/cbi/tblsection.htm +++ b/libs/cbi/luasrc/view/cbi/tblsection.htm @@ -21,25 +21,39 @@ end -%> -
-

<%=self.title%>

+
+ <% if self.title and #self.title > 0 then -%> + <%=self.title%> + <%- end %>
<%=self.description%>
<%- local count = 0 -%> <%- if not self.anonymous then -%> - + <%- if self.sectionhead then -%> + + <%- else -%> + + <%- end -%> <%- end -%> <%- for i, k in pairs(self.children) do if not k.optional then -%> - + <%- count = count + 1; end; end; if self.extedit or self.addremove then -%> - + <%- count = count + 1; end -%> <%- if not self.anonymous then -%> - + <%- if self.sectiondesc then -%> + + <%- else -%> + + <%- end -%> <%- end -%> <%- for i, k in pairs(self.children) do if not k.optional then -%> @@ -53,7 +67,7 @@ end isempty = false scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } -%> - + <% if not self.anonymous then -%> <%- end %> @@ -70,7 +84,13 @@ end <%- if self.extedit or self.addremove then -%> <%- end -%>
 <%=self.sectionhead%> <%=k.title%> + <%- if k.titleref then -%><%- end -%> + <%-=k.title-%> + <%- if k.titleref then -%><%- end -%> +   
<%=self.sectiondesc%><%=k.description%>

<%=k%>

<%- if self.extedit then -%> - <%:edit%> + + <%=self.extedit:format(section)%> + <%- elseif type(self.extedit) == "function" then -%> + <%=self:extedit(section)%> + <%- end -%> + " title="<%:edit%>"><%:edit%> <%- end; if self.addremove then %> <%- end -%> @@ -85,24 +105,31 @@ end
- <%- if self.addremove then -%> -
- -
- <% if self.anonymous then %> - - <% else %> - - - <% end %> - <% if self.err_invalid then %> -
<%:cbi_invalid%>
- <% end %> -
- + <% if self.error then %> +
+
    <% for _, c in pairs(self.error) do for _, e in ipairs(c) do -%> +
  • <%=pcdata(e):gsub("\n","
    ")%>
  • + <%- end end %>
- <%- end -%> + <% end %> + + <%- if self.addremove then -%> + <% if self.template_addremove then include(self.template_addremove) else -%> +
+ <% if self.anonymous then %> + + <% else %> + <% if self.invalid_cts then -%>
<% end %> + + + <% if self.invalid_cts then -%> +
<%:cbi_invalid%>
+ <%- end %> + <% end %> +
+ <%- end %> + <%- end -%>
-
+