diff options
author | Steven Barth <steven@midlink.org> | 2008-03-18 22:08:46 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-03-18 22:08:46 +0000 |
commit | f989f6ee00aad6bc655948df5add6df772c51f92 (patch) | |
tree | 1c9e43f2d15ed6b720bf67c0347fa00b33817595 /src/ffluci/view/cbi | |
parent | e2f117b870b25f30d7a3ca0e8574a2399e7cfa2b (diff) |
* CBI updates
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> |