diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2008-07-20 01:34:05 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2008-07-20 01:34:05 +0000 |
commit | 94a968e62fba7c6a8bead83db339e525d6a9d39a (patch) | |
tree | 0a33e6e110eaea53174a518602933786c80e0b86 /libs/cbi | |
parent | faed4aa7f1f2a572fed2fb7f691357bdfb42bbe1 (diff) |
* luci/libs/cbi: print a notice in empty tblsections
* luci/i18n: added new string to cbi translations
Diffstat (limited to 'libs/cbi')
-rw-r--r-- | libs/cbi/luasrc/view/cbi/tblsection.htm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/cbi/luasrc/view/cbi/tblsection.htm b/libs/cbi/luasrc/view/cbi/tblsection.htm index 6f2029e3b..44ff589d7 100644 --- a/libs/cbi/luasrc/view/cbi/tblsection.htm +++ b/libs/cbi/luasrc/view/cbi/tblsection.htm @@ -33,7 +33,10 @@ $Id$ <th class="cbi-section-table-cell"> </th> <%- end -%> </tr> - <%- for i, k in ipairs(self:cfgsections()) do + <%- local isempty = true + for i, k in ipairs(self:cfgsections()) do + isempty = false + if not self.anonymous then -%> <tr class="cbi-section-table-title"> @@ -47,11 +50,17 @@ $Id$ <%-+cbi/ucisection-%> <%- if self.addremove then -%> <td class="cbi-section-table-cell"> - <input type="submit" name="cbi.rts.<%=self.config%>.<%=k%>" value="X" /> + <input type="submit" name="cbi.rts.<%=self.config%>.<%=k%>" value="X" title="<%:delete%>" /> </td> <%- end -%> </tr> <%- end -%> + + <%- if isempty then -%> + <tr class="cbi-section-table-row"> + <td colspan="<%=count%>"><em><%:cbi_sectempty%></em></td> + </tr> + <%- end -%> <%- if self.addremove then -%> <tr class="cbi-section-table-row"> |