* CBI: Generalized templates
[project/luci.git] / src / ffluci / view / cbi / nsection.htm
index e002c68..9c54a99 100644 (file)
@@ -1,7 +1,17 @@
-                               <div class="cbi-nsection" id="cbi-<%=self.config%>-<%=self.section%>">
+<% if self:cfgvalue(self.section) then
+section = self.section %>
+                               <div class="cbi-section" id="cbi-<%=self.config%>-<%=section%>">
                                        <h2><%=self.title%></h2>
-                                       <div class="cbi-nsection-descr"><%=self.description%></div>
-                                       <div class="cbi-nsection-options">
-<% for k, node in ipairs(self.children) do node:render() end %>
-                                       </div>
+                                       <div class="cbi-section-descr"><%=self.description%></div>
+                                       <% if self.addremove then %><div class="cbi-section-remove">
+                                               <input type="submit" name="cbi.rns.<%=self.config%>.<%=section%>" value="<%:cbi_del Eintrag entfernen%>" />
+                                       </div><% end %>
+<%+cbi/ucisection%>
                                </div>
+<% elseif self.addremove then %>
+                               <div class="cbi-section" id="cbi-<%=self.config%>-<%=self.section%>">
+                                       <h2><%=self.title%></h2>
+                                       <div class="cbi-section-descr"><%=self.description%></div>
+                                       <input type="submit" name="cbi.cns.<%=self.config%>.<%=self.section%>" value="<%:cbi_cns Eintrag anlegen%>" />
+                               </div>
+<% end %>