+
- <%:Navigation%>
+-
<%-
local function submenu(prefix, node)
- if not node.nodes then
+ if not node.nodes or node.hidden then
return false
end
local index = {}
@@ -110,21 +89,23 @@ local function submenu(prefix, node)
if count > 0 then
%>
-
- - class="active"<%end%>><%=nnode.title%> - <%- submenu(prefix .. v.name .. "/", nnode) %> - - <%- end %> - <%- end %> -
- class="active"<%end%> href="<%=pcdata(href)%>"><%=striptags(nnode.title)%><%- +submenu(prefix .. v.name .. "/", nnode) +%> <%- + end + end +%> +
- class="preactive"<%end%> href="<%=pcdata(href)%>"><%=striptags(node.title)%><% +submenu("/" .. category .. "/" .. k.name .. "/", node) +%> <% end end end %> -
-
- <%- for j, v in pairs(index) do
- if #v.name > 0 then
- local nnode = node.nodes[v.name]
- local href = controller .. prefix .. v.name
- href = (nnode.query) and href .. luci.http.build_querystring(nnode.query) or href
- %>
-
- ">
+<%-
+ for j, v in pairs(index) do
+ if #v.name > 0 then
+ local nnode = node.nodes[v.name]
+ local href = controller .. prefix .. v.name .. "/"
+ href = (nnode.query) and href .. luci.http.build_querystring(nnode.query) or href
+%>
+
class="preactive"<%end%>><%=node.title%>
- <%submenu("/" .. category .. "/" .. k.name .. "/", node)%>
-
-<% end
+ if node.title and node.target and not node.hidden then
+ local href = controller.."/"..category.."/"..k.name.."/"
+ href = (k.query) and href .. luci.http.build_querystring(k.query) or href
+%>
+
-
-
- <%
- if tree.nodes[category] and tree.nodes[category].ucidata then
- local ucic = 0
- for i, j in pairs(require("luci.model.uci").changes()) do
- for k, l in pairs(j) do
- for m, n in pairs(l) do
- ucic = ucic + 1;
- end
- end
- end
- %>
- - <%
- for k,node in pairs(tree.nodes) do
- if node.title then %>
-
- class="active"<%end%>><%=node.title%> -<% end - end%> -
-
- <% end %>
+
+
+
- <% if ucic > 0 then %>
- <%:unsavedchanges%>: <%=ucic%>
-
- -
-
- <%:apply%> -
- <%:revert%> -
- <%
+for k,node in pairs(tree.nodes) do
+ if node.title and not node.hidden then %>
+
- class="active"<%end%> href="<%=controller%>/<%=k%>/"><%=striptags(node.title)%> <% + end +end +%> +
+<% +if tree.nodes[category] and tree.nodes[category].ucidata then + local ucic = 0 + for i, j in pairs(require("luci.model.uci").cursor():changes()) do + for k, l in pairs(j) do + for m, n in pairs(l) do + ucic = ucic + 1; + end + end + end +-%> +
-
+
- <% if ucic > 0 then %><%:Unsaved Changes%>: <%=ucic%><% +submenu("/" .. category .. "/uci/", tree.nodes[category].nodes["uci"]) +else -%> +<%:Changes%>: 0<% end -%> + +