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