diff options
-rw-r--r-- | i18n/english/luasrc/i18n/cbi.en.lua | 3 | ||||
-rw-r--r-- | i18n/german/luasrc/i18n/cbi.de.lua | 3 | ||||
-rw-r--r-- | libs/cbi/luasrc/view/cbi/tblsection.htm | 13 |
3 files changed, 15 insertions, 4 deletions
diff --git a/i18n/english/luasrc/i18n/cbi.en.lua b/i18n/english/luasrc/i18n/cbi.en.lua index ca3dcce57..14153989f 100644 --- a/i18n/english/luasrc/i18n/cbi.en.lua +++ b/i18n/english/luasrc/i18n/cbi.en.lua @@ -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" diff --git a/i18n/german/luasrc/i18n/cbi.de.lua b/i18n/german/luasrc/i18n/cbi.de.lua index baa3a80da..f3ed31900 100644 --- a/i18n/german/luasrc/i18n/cbi.de.lua +++ b/i18n/german/luasrc/i18n/cbi.de.lua @@ -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" 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"> |