bc65e3e8910e129b2f7322d7239fb8cce588a062
[project/luci.git] / core / src / view / header.htm
1 <%
2 require("ffluci.sys")
3 local load1, load5, load15 = ffluci.sys.loadavg()
4 local req = require("ffluci.dispatcher").request
5 local menu = require("ffluci.menu").get()[req.category]
6 menu = menu or {}
7 require("ffluci.i18n").loadc("default")
8 require("ffluci.http").prepare_content("text/html")
9 %><?xml version="1.0" encoding="utf-8"?>
10 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
11 <html xmlns="http://www.w3.org/1999/xhtml">
12 <head>
13 <link rel="stylesheet" type="text/css" href="<%=media%>/cascade.css" />
14 <link rel="stylesheet" type="text/css" href="<%=media%>/css/<%=req.category%>_<%=req.module%>.css" />
15 <meta http-equiv="content-type" content="text/xhtml+xml; charset=utf-8" />
16 <meta http-equiv="content-script-type" content="text/javascript" />
17 <title>FFLuCI</title>
18 </head>
19 <body>
20 <div id="header">
21 <div class="headerlogo left"><img src="<%=media%>/logo.png" alt="Freifunk" /></div>
22 <div class="whitetext smalltext right">
23 OpenWRT Kamikaze<br />
24 Freifunk Firmware 2.0-dev<br />
25 <%:load Last%>: <%=load1%> <%=load5%> <%=load15%><br />
26 <%:hostname Hostname%>: <%=ffluci.sys.hostname()%>
27 </div>
28 <div>
29 <span class="headertitle">Freifunk Kamikaze</span><br />
30 <span class="whitetext bold"><%:batmanedition Fledermausedition%></span>
31 </div>
32 </div>
33
34 <div class="separator yellow bold">
35 <%:path Pfad%>: <a href="<%=controller .. "/" .. req.category%>"><%=translate(req.category, req.category)%></a>
36 &#187; <a href="<%=controller .. "/" .. req.category .. "/" .. req.module %>"><%=translate(req.module, req.module)%></a>
37 &#187; <a href="<%=controller .. "/" .. req.category .. "/" .. req.module .. "/" .. req.action %>"><%=translate(req.action, req.action)%></a>
38 </div>
39
40 <div id="columns"><div id="columnswrapper">
41 <div class="sidebar left">
42 <% for k,v in pairs(menu) do %>
43 <div<% if v[".contr"] == req.module then %> class="yellowtext"<% end %>><a href="<%=controller.."/"..req.category.."/"..v[".contr"]%>"><%=translate(v[".contr"], v[".descr"])%></a><%
44 if v[".contr"] == req.module then %>
45 <ul><% for key,val in ipairs(v) do %>
46 <li<% if val.action == req.action then %> class="yellowtext"<% end %>><a href="<%=controller.."/"..req.category.."/"..req.module.."/"..val.action%>"><%=translate(val.action, val.descr)%></a></li>
47 <% end %></ul>
48 <% end %></div>
49 <% end %>
50 </div>
51 <div class="sidebar right">
52 <div><%:webif Weboberfläche%>
53 <ul>
54 <li<% if "public" == req.category then %> class="yellowtext"<% end %>><a href="<%=controller%>/public"><%:public Öffentlich%></a></li>
55 <li<% if "admin" == req.category then %> class="yellowtext"<% end %>><a href="<%=controller%>/admin"><%:admin Verwaltung%></a></li>
56 </ul>
57 </div>
58 <%
59 if "admin" == req.category then
60 require("ffluci.model.uci")
61 local ucic = ffluci.model.uci.changes()
62 if ucic then
63 ucic = #ffluci.util.split(ucic)
64 end
65 %>
66 <div><%:config Konfiguration%>
67 <ul>
68 <% if ucic then %>
69 <li><a href="<%=controller%>/admin/uci/changes"><%:changes Änderungen%>: <%=ucic%></a></li>
70 <li><a href="<%=controller%>/admin/uci/apply"><%:apply Anwenden%></a></li>
71 <li><a href="<%=controller%>/admin/uci/revert"><%:revert Verwerfen%></a></li>
72 <% else %>
73 <li><%:changes Änderungen%>: 0</li>
74 <% end %>
75 </ul>
76 </div>
77 <% end %>
78 </div>
79 <div id="content">