-
<%
local class
local tabs
for x,cat in ipairs(session.menu.cats) do
io.write (string.format("\n\t\t\t\t
- %s\n\t\t\t\t\t
- \n", html.html_escape(cat.name))) --start row
for y,group in ipairs(cat.groups) do
class=""
if not tabs and group.controllers[pageinfo.prefix .. pageinfo.controller] then
class="class='selected'"
tabs = group.tabs
end
io.write (string.format("\t\t\t\t\t\t
- %s \n", class,class,html.html_escape(pageinfo.script),html.html_escape(group.tabs[1].prefix), html.html_escape(group.tabs[1].controller), html.html_escape(group.tabs[1].action), html.html_escape(group.name) )) end io.write ( "\t\t\t\t\t
")
end
%>
-
<% local class="" %>
<%
for x,tab in pairs(tabs or {}) do
if tab.prefix == pageinfo.prefix and tab.controller == pageinfo.controller and tab.action == pageinfo.action then
class="class='selected'"
else
class=""
end
io.write (string.format('
- %s \n',class,class,html.html_escape(pageinfo.script),html.html_escape(tab.prefix),html.html_escape(tab.controller),html.html_escape(tab.action),html.html_escape(tab.name) )) end %>
<% pageinfo.viewfunc(viewtable, viewlibrary, pageinfo, session) %>