From d5dff8f9a5ca85d197cbb6037f95053bc55941e5 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 3 Nov 2019 20:49:31 +0100 Subject: treewide: move server side CBI support to luci-compat Signed-off-by: Jo-Philipp Wich --- modules/luci-compat/luasrc/view/cbi/tsection.htm | 52 ++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 modules/luci-compat/luasrc/view/cbi/tsection.htm (limited to 'modules/luci-compat/luasrc/view/cbi/tsection.htm') diff --git a/modules/luci-compat/luasrc/view/cbi/tsection.htm b/modules/luci-compat/luasrc/view/cbi/tsection.htm new file mode 100644 index 0000000000..8f3b7f0ffb --- /dev/null +++ b/modules/luci-compat/luasrc/view/cbi/tsection.htm @@ -0,0 +1,52 @@ +
+ <% if self.title and #self.title > 0 then -%> + <%=self.title%> + <%- end %> + <% if self.error_msg and #self.error_msg > 0 then -%> +
+ <%=self.error_msg%> +
+ <%- end %> + <% if self.description and #self.description > 0 then -%> +
<%=self.description%>
+ <%- end %> + <% local isempty = true for i, k in ipairs(self:cfgsections()) do -%> + <% if self.addremove then -%> +
+ +
+ <%- end %> + + <%- section = k; isempty = false -%> + + <% if not self.anonymous then -%> +

<%=section:upper()%>

+ <%- end %> + +
+ <%+cbi/ucisection%> +
+ <%- end %> + + <% if isempty then -%> + <%:This section contains no values yet%>

+ <%- 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 -%> +
<%:Invalid%>
+ <%- end %> +
+ +
+ + <%- end %> +
+ <%- end %> + <%- end %> +
-- cgit v1.2.3