Added module for system abstraction
[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 <title>FFLuCI</title>
14 </head>
15 <body>
16 <div id="header">
17         <div class="headerlogo left"><img src="<%=media%>/logo.png" alt="Freifunk" /></div>
18         <div class="whitetext smalltext right">
19         OpenWRT Kamikaze<br />
20         Freifunk Firmware 2.0-dev<br />
21         <%:load Last%>: <%=load1%> <%=load5%> <%=load15%><br />
22         <%:hostname Hostname%>: <%=ffluci.sys.hostname()%> 
23         </div>
24         <div>
25                 <span class="headertitle">Freifunk Kamikaze</span><br />
26                 <span class="whitetext bold"><%:batmanedition Fledermausedition%></span>
27         </div>
28 </div>
29
30 <div class="separator yellow bold">
31 <%:path Pfad%>: <a href="<%=controller .. "/" .. req.category%>"><%=req.category%></a>
32 &#187; <a href="<%=controller .. "/" .. req.category .. "/" .. req.module %>"><%=req.module%></a>
33 &#187; <a href="<%=controller .. "/" .. req.category .. "/" .. req.module .. "/" .. req.action %>"><%=req.action%></a>
34 </div>
35
36 <div id="columns"><div id="columnswrapper">
37         <div class="sidebar left">
38         <% for k,v in pairs(menu) do %>
39             <div<% if v[".contr"] == req.module then %> class="yellowtext"<% end %>><a href="<%=controller.."/"..req.category.."/"..v[".contr"]%>"><%=translate(v[".contr"], v[".descr"])%></a><%
40             if v[".contr"] == req.module then %>
41                 <ul><% for key,val in ipairs(v) do %>
42                         <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>
43                 <% end %></ul>
44             <% end %></div>
45         <% end %>
46         </div>
47         <div class="sidebar right">
48                 <div><%:webif Weboberfläche%>
49                         <ul>
50                                 <li<% if "public" == req.category then %> class="yellowtext"<% end %>><a href="<%=controller%>/public"><%:public Public%></a></li>
51                                 <li<% if "admin" == req.category then %> class="yellowtext"<% end %>><a href="<%=controller%>/admin"><%:admin Admin%></a></li>
52                         </ul>
53                 </div>
54                 <% if "admin" == req.category then %>
55                 <div>Konfiguration<ul><li>x Änderungen</li><li>Anwenden</li><li>Zurücksetzen</li></ul></div>
56                 <% end %>
57         </div>
58         <div id="content">