summaryrefslogtreecommitdiffhomepage
path: root/themes/openwrt.org/luasrc/view
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-06-03 18:02:53 +0000
committerSteven Barth <steven@midlink.org>2008-06-03 18:02:53 +0000
commit56a23c609c30cf6c477bf6523661a44821da1819 (patch)
treee7843bed1dd23f057d5cc2d61d368d8a8a6c6674 /themes/openwrt.org/luasrc/view
parent25ca2d2f20ad08a52bc9756e7b2f7abaeb4c7edc (diff)
* libs/web: Added support for custom query strings
Diffstat (limited to 'themes/openwrt.org/luasrc/view')
-rw-r--r--themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm13
1 files changed, 9 insertions, 4 deletions
diff --git a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm
index 2ab67ecf49..4efde4a62c 100644
--- a/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm
+++ b/themes/openwrt.org/luasrc/view/themes/openwrt.org/header.htm
@@ -73,9 +73,12 @@ local function submenu(prefix, node)
%>
<ul>
<% for j, v in pairs(index) do
- local nnode = node.nodes[v.name]%>
+ local nnode = node.nodes[v.name]
+ local href = controller .. prefix .. v.name
+ href = (v.query) and href .. luci.http.build_querystring(v.query) or href
+ %>
<li>
- <span<% if nnode._menu_selected then %> class="blacktext"<%end%>><a href="<%=controller .. prefix .. v.name%>"><%=nnode.title%></a></span>
+ <span<% if nnode._menu_selected then %> class="blacktext"<%end%>><a href="<%=href%>"><%=nnode.title%></a></span>
<% submenu(prefix .. v.name .. "/", nnode) %>
</li>
<% end %>
@@ -93,8 +96,10 @@ if cattree and cattree.nodes then
for i, k in ipairs(index) do
node = cattree.nodes[k.name]
- if node.title then %>
- <div<% if node._menu_selected then %> class="blacktext"<%end%>><a href="<%=controller%>/<%=category%>/<%=k.name%>"><%=node.title%></a>
+ if node.title then
+ local href = controller.."/"..category.."/"..k.name
+ href = (k.query) and href .. luci.http.build_querystring(k.query) or href %>
+ <div<% if node._menu_selected then %> class="blacktext"<%end%>><a href="<%=href%>"><%=node.title%></a>
<%submenu("/" .. category .. "/" .. k.name .. "/", node)%>
</div>
<% end