From dfe0287c6fbab70c359f97c4b9d72a53bc5ff0e2 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 12 Jul 2008 16:46:10 +0000 Subject: * luci/themes: lots of fixes in openwrt.org theme * luci/libs/cbi: use fpr table sections --- libs/cbi/luasrc/view/cbi/cell_valuefooter.htm | 27 ++++++++ libs/cbi/luasrc/view/cbi/cell_valueheader.htm | 15 +++++ libs/cbi/luasrc/view/cbi/tblsection.htm | 88 +++++++++++++++++---------- 3 files changed, 97 insertions(+), 33 deletions(-) create mode 100644 libs/cbi/luasrc/view/cbi/cell_valuefooter.htm create mode 100644 libs/cbi/luasrc/view/cbi/cell_valueheader.htm (limited to 'libs/cbi') diff --git a/libs/cbi/luasrc/view/cbi/cell_valuefooter.htm b/libs/cbi/luasrc/view/cbi/cell_valuefooter.htm new file mode 100644 index 0000000000..045866d7b7 --- /dev/null +++ b/libs/cbi/luasrc/view/cbi/cell_valuefooter.htm @@ -0,0 +1,27 @@ +<%# +LuCI - Lua Configuration Interface +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +-%> + + <%- if self.tag_invalid[section] then -%> +
<%:cbi_invalid%>
+ <%- end -%> + + +<%- if #self.deps > 0 then -%> + +<%- end -%> diff --git a/libs/cbi/luasrc/view/cbi/cell_valueheader.htm b/libs/cbi/luasrc/view/cbi/cell_valueheader.htm new file mode 100644 index 0000000000..7b8f0a5d69 --- /dev/null +++ b/libs/cbi/luasrc/view/cbi/cell_valueheader.htm @@ -0,0 +1,15 @@ +<%# +LuCI - Lua Configuration Interface +Copyright 2008 Steven Barth +Copyright 2008 Jo-Philipp Wich + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +$Id$ + +-%> +
"> diff --git a/libs/cbi/luasrc/view/cbi/tblsection.htm b/libs/cbi/luasrc/view/cbi/tblsection.htm index 2688e7a1b3..367af80b88 100644 --- a/libs/cbi/luasrc/view/cbi/tblsection.htm +++ b/libs/cbi/luasrc/view/cbi/tblsection.htm @@ -16,38 +16,60 @@ $Id$

<%=self.title%>

<%=self.description%>
-
-<% for i, k in pairs(self.children) do %> -
<%=k.title%>
-<% end %> -
-
-<% for i, k in pairs(self.children) do %> -
<%=k.description%>
-<% end %> -
-<% for i, k in ipairs(self:cfgsections()) do%> - <% if not self.anonymous then %>

<%=k%>

<% end %> -<% -section = k -scope = {valueheader = "cbi/tiny_valueheader", valuefooter = "cbi/tiny_valuefooter"} -%> -
-<%+cbi/ucisection%> - <% if self.addremove then %>
- -
<% end %> -
-<% end %> -<% if self.addremove then %> -
- <% if self.anonymous then %> - - <% else %> - - - <% end %><% if self.err_invalid then %>
<%:cbi_invalid%>
<% end %> -
+ <%- local count = 0 -%> + + + <%- for i, k in pairs(self.children) do -%> + + <%- count = count + 1; end; if self.addremove then -%> + + <%- count = count + 1; end -%> + + + <%- for i, k in pairs(self.children) do -%> + + <%- end; if self.addremove then -%> + + <%- end -%> + + <%- for i, k in ipairs(self:cfgsections()) do + if not self.anonymous then + -%> + + + + <%- end + section = k + scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } + -%> + + <%-+cbi/ucisection-%> + <%- if self.addremove then -%> + + <%- end -%> + + <%- end -%> + + <%- if self.addremove then -%> + + + + <%- end -%> +
<%=k.title%> 
<%=k.description%> 

<%=k%>

+ +
+
+ <% if self.anonymous then %> + + <% else %> + + + <% end %> + + <% if self.err_invalid then %> +
<%:cbi_invalid%>
+ <% end %> +
+
-<% end %> -- cgit v1.2.3