2 LuCI - Lua Configuration Interface
3 Copyright 2008 Steven Barth <steven@midlink.org>
4 Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
17 <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.sectiontype%>">
18 <h2><%=self.title%></h2>
19 <div class="cbi-section-descr"><%=self.description%></div>
20 <div class="cbi-section-node">
21 <%- local count = 0 -%>
22 <table class="cbi-section-table">
23 <tr class="cbi-section-table-titles">
24 <%- for i, k in pairs(self.children) do -%>
25 <th class="cbi-section-table-cell"><%=k.title%></th>
26 <%- count = count + 1; end; if self.addremove then -%>
27 <th class="cbi-section-table-cell"> </th>
28 <%- count = count + 1; end -%>
30 <tr class="cbi-section-table-descr">
31 <%- for i, k in pairs(self.children) do -%>
32 <th class="cbi-section-table-cell"><%=k.description%></th>
33 <%- end; if self.addremove then -%>
34 <th class="cbi-section-table-cell"> </th>
37 <%- local isempty = true
38 for i, k in ipairs(self:cfgsections()) do
39 if not self.anonymous then
41 <tr class="cbi-section-table-title">
42 <th colspan="<%=count%>"><h3><%=k%></h3></th>
47 scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" }
49 <tr class="cbi-section-table-row" id="cbi-<%=self.config%>-<%=section%>">
51 <%- if self.addremove then -%>
52 <td class="cbi-section-table-cell">
53 <input type="submit" name="cbi.rts.<%=self.config%>.<%=k%>" value="X" title="<%:delete%>" />
59 <%- if isempty then -%>
60 <tr class="cbi-section-table-row">
61 <td colspan="<%=count%>"><em><br /><%:cbi_sectempty%></em></td>
65 <%- if self.addremove then -%>
66 <tr class="cbi-section-table-row">
67 <td colspan="<%=count%>" class="cbi-section-table-optionals">
68 <div class="cbi-section-create">
69 <% if self.anonymous then %>
70 <input type="submit" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" value="<%:cbi_add%>" />
72 <input type="text" class="cbi-section-create-name" name="cbi.cts.<%=self.config%>.<%=self.sectiontype%>" />
73 <input type="submit" value="<%:cbi_add%>" />
76 <% if self.err_invalid then %>
77 <div class="cbi-error"><%:cbi_invalid%></div>