libs/cbi: attach pcdata() to template scope and use it
[project/luci.git] / libs / cbi / luasrc / view / cbi / map.htm
index e29b4fc..0b5ac58 100644 (file)
@@ -14,8 +14,23 @@ $Id$
 -%>
 
 <div class="cbi-map" id="cbi-<%=self.config%>">
-       <h1><%=self.title%></h1>
+       <h2><a id="content" name="content"><%=self.title%></a></h2>
        <div class="cbi-map-descr"><%=self.description%></div>
+       <%- if self._apply then -%>
+               <fieldset class="cbi-section">
+                       <legend><%:cbi_applying%></legend>
+                       <ul class="cbi-apply"><%-
+                               local fp = self._apply()
+                               self._apply = nil
+                               local line = fp:read()
+                               while line do
+                                       write("<li>" .. pcdata(line) .. "</li>\n")
+                                       line = fp:read()
+                               end
+                               fp:close()
+                       -%></ul>
+               </fieldset>
+       <%- end -%>
        <%- self:render_children() %>
        <br />
 </div>