* luci/libs/cbi: print a notice in empty tblsections
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 20 Jul 2008 01:34:05 +0000 (01:34 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 20 Jul 2008 01:34:05 +0000 (01:34 +0000)
* luci/i18n: added new string to cbi translations

i18n/english/luasrc/i18n/cbi.en.lua
i18n/german/luasrc/i18n/cbi.de.lua
libs/cbi/luasrc/view/cbi/tblsection.htm

index ca3dcce57c59c60a3d7c763d0142ffe1181e907e..14153989fbd467825ee29d5954ca9adeaadeac88 100644 (file)
@@ -2,4 +2,5 @@ cbi_add = "Add entry"
 cbi_del = "Remove entry"
 cbi_invalid = "Error: Invalid input value"
 cbi_addopt = "-- Additional Field --"
-cbi_optional = " (optional)"
\ No newline at end of file
+cbi_optional = " (optional)"
+cbi_sectempty = "This section contains no values yet"
index baa3a80da17f125869f4bd613decfde0f90ce650..f3ed319001f431eedc57d9f2dca9a8f0a2f6b266 100644 (file)
@@ -1,4 +1,5 @@
 cbi_add = "Eintrag hinzufügen"
 cbi_del = "Eintrag entfernen"
 cbi_invalid = "Error: Ungültige Eingabe"
-cbi_addopt = "-- Zusätzliches Feld --"
\ No newline at end of file
+cbi_addopt = "-- Zusätzliches Feld --"
+cbi_sectempty = "Diese Sektion enthält noch keine Einträge"
index 6f2029e3bb07c85b0dd01de7addb7f3d0732ba26..44ff589d7c27bfa4153dccd30f7664f698eb5bed 100644 (file)
@@ -33,7 +33,10 @@ $Id$
                                <th class="cbi-section-table-cell">&nbsp;</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">