make use of the new features in the binding for uci v0.4.0 - fixes remaining dependen...
[project/luci.git] / themes / fledermaus / luasrc / view / themes / fledermaus / header.htm
index 5f87678..2aea59c 100644 (file)
@@ -1,7 +1,6 @@
 <%
 require("luci.sys")
 local load1, load5, load15 = luci.sys.loadavg()
-
 local request  = require("luci.dispatcher").request
 local category = request[1]
 local tree     = luci.dispatcher.node()
@@ -27,7 +26,7 @@ require("luci.http").prepare_content("text/html")
        <% if node and node.css then %><link rel="stylesheet" type="text/css" href="<%=resource%>/<%=node.css%>" /><% end %>
        <meta http-equiv="content-type" content="text/xhtml+xml; charset=utf-8" />
        <meta http-equiv="content-script-type" content="text/javascript" />
-       <title>LuCI - Lua Configuration Interface</title>
+       <title>LuCI - Lua Configuration Interface - <%=node.title%></title>
 </head>
 <body>
 <div id="header">
@@ -74,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="yellowtext"<%end%>><a href="<%=controller .. prefix .. v.name%>"><%=nnode.title%></a></span>
+                       <span<% if nnode._menu_selected then %> class="yellowtext"<%end%>><a href="<%=href%>"><%=nnode.title%></a></span>
                        <% submenu(prefix .. v.name .. "/", nnode) %>
                </li>
        <% end %>
@@ -94,7 +96,9 @@ if cattree and cattree.nodes then
 
        for i, k in ipairs(index) do
                node = cattree.nodes[k.name]
-               if node.title then %>
+               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="yellowtext"<%end%>><a href="<%=controller%>/<%=category%>/<%=k.name%>"><%=node.title%></a>                 
                                <%submenu("/" .. category .. "/" .. k.name .. "/", node)%>
                        </div>
@@ -104,7 +108,7 @@ end
 %>             
        </div>
        <div class="sidebar right">
-               <div><%:webif Weboberfläche%>
+               <div><%:webui Weboberfläche%>
                        <ul><%
                                for k,node in pairs(tree.nodes) do
                                        if node.title then %>
@@ -116,9 +120,11 @@ end
                <%
                        if "admin" == request[1] then
                                require("luci.model.uci") 
-                               local ucic = luci.model.uci.changes()
-                               if ucic then
-                                       ucic = #luci.util.split(ucic)
+                               local ucic = 0
+                               for n, s in pairs(luci.model.uci.changes()) do
+                                       for no, o in pairs(s) do
+                                               ucic = ucic + 1;
+                                       end
                                end
                %>
                <div><%:config Konfiguration%>
@@ -134,4 +140,4 @@ end
                </div>
                <% end %>
        </div>
-       <div id="content">
\ No newline at end of file
+       <div id="content">