* Added DHCP page
[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         <meta http-equiv="content-type" content="text/xhtml+xml; charset=utf-8" />
15         <meta http-equiv="content-script-type" content="text/javascript" />
16         <title>FFLuCI</title>
17 </head>
18 <body>
19 <div id="header">
20         <div class="headerlogo left"><img src="<%=media%>/logo.png" alt="Freifunk" /></div>
21         <div class="whitetext smalltext right">
22         OpenWRT Kamikaze<br />
23         Freifunk Firmware 2.0-dev<br />
24         <%:load Last%>: <%=load1%> <%=load5%> <%=load15%><br />
25         <%:hostname Hostname%>: <%=ffluci.sys.hostname()%> 
26         </div>
27         <div>
28                 <span class="headertitle">Freifunk Kamikaze</span><br />
29                 <span class="whitetext bold"><%:batmanedition Fledermausedition%></span>
30         </div>
31 </div>
32
33 <div class="separator yellow bold">
34 <%:path Pfad%>: <a href="<%=controller .. "/" .. req.category%>"><%=translate(req.category, req.category)%></a>
35 &#187; <a href="<%=controller .. "/" .. req.category .. "/" .. req.module %>"><%=translate(req.module, req.module)%></a>
36 &#187; <a href="<%=controller .. "/" .. req.category .. "/" .. req.module .. "/" .. req.action %>"><%=translate(req.action, req.action)%></a>
37 </div>
38
39 <div id="columns"><div id="columnswrapper">
40         <div class="sidebar left">
41         <% for k,v in pairs(menu) do %>
42             <div<% if v[".contr"] == req.module then %> class="yellowtext"<% end %>><a href="<%=controller.."/"..req.category.."/"..v[".contr"]%>"><%=translate(v[".contr"], v[".descr"])%></a><%
43             if v[".contr"] == req.module then %>
44                 <ul><% for key,val in ipairs(v) do %>
45                         <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>
46                 <% end %></ul>
47             <% end %></div>
48         <% end %>
49         </div>
50         <div class="sidebar right">
51                 <div><%:webif Weboberfläche%>
52                         <ul>
53                                 <li<% if "public" == req.category then %> class="yellowtext"<% end %>><a href="<%=controller%>/public"><%:public Öffentlich%></a></li>
54                                 <li<% if "admin" == req.category then %> class="yellowtext"<% end %>><a href="<%=controller%>/admin"><%:admin Verwaltung%></a></li>
55                         </ul>
56                 </div>
57                 <%
58                         if "admin" == req.category then
59                                 require("ffluci.model.uci") 
60                                 local ucic = ffluci.model.uci.changes()
61                                 if ucic then
62                                         ucic = #ffluci.util.split(ucic)
63                                 end
64                 %>
65                 <div><%:config Konfiguration%>
66                         <ul>
67                         <% if ucic then %>
68                                 <li><a href="<%=controller%>/admin/uci/changes"><%:changes Änderungen:%> <%=ucic%></a></li>
69                                 <li><a href="<%=controller%>/admin/uci/apply"><%:apply Anwenden%></a></li>
70                                 <li><a href="<%=controller%>/admin/uci/revert"><%:revert Verwerfen%></a></li>
71                         <% else %>
72                                 <li><%:changes Änderungen: %> 0</li>
73                         <% end %>
74                         </ul>
75                 </div>
76                 <% end %>
77         </div>
78         <div id="content">