blob: 8d5c597cf7fa0e95ad1a9c1726221df3b2219f68 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
<%
local req = require("ffluci.dispatcher").request
local menu = require("ffluci.menu").get()[req.category]
local menu_module = nil
require("ffluci.i18n").loadc("default")
%>
<div id="menu" style="font-size: 0.8em; padding-bottom: 20px">
<div id="menu_categories">
<span style="<% if "public" == req.category then write("font-weight: bold") end %>"><a href="<%=controller%>/public"><%:public Public%></a></span>
<span style="<% if "admin" == req.category then write("font-weight: bold") end %>"><a href="<%=controller%>/admin"><%:admin Admin%></a></span>
</div>
<div id="menu_modules">
<% for k,v in pairs(menu) do
if v[".contr"] == req.module then menu_module = v end %>
<span style="<% if v[".contr"] == req.module then write("font-weight: bold") end %>"><a href="<%=controller.."/"..req.category.."/"..v[".contr"]%>"><%=translate(v[".contr"], v[".descr"])%></a></span>
<% end %>
</div>
<% if menu_module then %>
<div id="menu_actions">
<% for k,v in ipairs(menu_module) do %>
<span style="<% if v.action == req.action then write("font-weight: bold") end %>"><a href="<%=controller.."/"..req.category.."/"..req.module.."/"..v.action%>"><%=translate(v.action, v.descr)%></a></span>
<% end %>
</div>
<% end %>
</div>
|