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