* 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 ca3dcce..1415398 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_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 baa3a80..f3ed319 100644 (file)
@@ -1,4 +1,5 @@
 cbi_add = "Eintrag hinzufügen"
 cbi_del = "Eintrag entfernen"
 cbi_invalid = "Error: Ungültige Eingabe"
 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 6f2029e..44ff589 100644 (file)
@@ -33,7 +33,10 @@ $Id$
                                <th class="cbi-section-table-cell">&nbsp;</th>
                        <%- end -%>
                        </tr>
                                <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">
                                        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">
                                <%-+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 -%>
                                        </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">
 
                        <%- if self.addremove then -%>
                        <tr class="cbi-section-table-row">