diff options
Diffstat (limited to 'src/ffluci/view/cbi')
-rw-r--r-- | src/ffluci/view/cbi/map.htm | 7 | ||||
-rw-r--r-- | src/ffluci/view/cbi/nsection.htm | 5 | ||||
-rw-r--r-- | src/ffluci/view/cbi/tsection.htm | 22 |
3 files changed, 34 insertions, 0 deletions
diff --git a/src/ffluci/view/cbi/map.htm b/src/ffluci/view/cbi/map.htm new file mode 100644 index 0000000000..918e455d75 --- /dev/null +++ b/src/ffluci/view/cbi/map.htm @@ -0,0 +1,7 @@ +<div class="cbi-map" id="cbi-<%=config%>"> +<form method="post" action="<%=os.getenv("REQUEST_URI")%>"> +<h1><%=title%></h1> +<div class="cbi-map-descr"><%=description%></div> +<% for k, node in ipairs(children) do node:render() end %> +</form> +</div> diff --git a/src/ffluci/view/cbi/nsection.htm b/src/ffluci/view/cbi/nsection.htm new file mode 100644 index 0000000000..4a47c7dad4 --- /dev/null +++ b/src/ffluci/view/cbi/nsection.htm @@ -0,0 +1,5 @@ +<div class="cbi-nsection" id="cbi-<%=map.config%>-<%=sectiontype%>-<%=section%>"> +<h2><%=title%></h2> +<div class="cbi-nsection-descr"><%=description%></div> +<% for k, node in ipairs(children) do node:render() end %> +</div> diff --git a/src/ffluci/view/cbi/tsection.htm b/src/ffluci/view/cbi/tsection.htm new file mode 100644 index 0000000000..2c25500f8a --- /dev/null +++ b/src/ffluci/view/cbi/tsection.htm @@ -0,0 +1,22 @@ +<% +require("ffluci.model.uci") +local allsections = ffluci.model.uci.show(map) +local sections = {} +for k, v in pairs(allsections) do + if v[".type"] == sectiontype then + sections[k] = v + end +end +%> +<div class="cbi-tsection" id="cbi-<%=map%>-<%=sectiontype%>"> +<h2><%=title%></h2> +<div class="cbi-tsection-descr"><%=description%></div> +<% for k, v in pairs(sections) do %> +<div class="cbi-tsection-node" id="cbi-<%=map%>-<%=k%>"> +<% for k, node in ipairs(children) do + node.section = k + node:render(k) +end %> +</div> +<% end %> +</div> |