root/luci/branches/luci-0.10/modules/freifunk/luasrc/view/freifunk/adminindex.htm @ 7810

Revision 7810, 1.7 KB (checked in by jow, 19 months ago)

luci-0.10: sync with trunk, drop broken and unfinished applications

Line 
1<%+header%>
2<%
3local uci = require "luci.model.uci".cursor()
4local contact = uci:get_all("freifunk", "contact")
5local contacturl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "contact")
6local hostname = uci:get_first ("system", "system", "hostname")
7local latitude = uci:get_first ("system", "system", "latitude")
8local longitude = uci:get_first ("system", "system", "longitude")
9local location = uci:get_first ("system", "system", "location")
10local basicsurl = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "freifunk", "basics")
11luci.i18n.loadc("freifunk")
12%>
13
14<h2><%:Freifunk Overview%></h2>
15
16<%:These pages will assist you in setting up your router for Freifunk or similar wireless community networks.%>
17<p />
18
19<% if not (hostname and latitude and longitude and location) then%>
20<div class="error">
21    <%:Basic settings are incomplete. Please go to%> <a href='<%=basicsurl%>'><%:Basic settings%></a> <%:and fill out all required fields.%>
22</div>
23<%end%>
24<p />
25
26<% if not (contact.nickname and contact.name and contact.mail) then%>
27<div class="error">
28    <%:Contact information is incomplete. Please go to%> <a href='<%=contacturl%>'><%:Contact%></a> <%:and fill out all required fields.%>
29    <p />
30</div>
31<%end%>
32
33<% uci:foreach("wireless", "wifi-device", function(section)
34    local device = section[".name"]
35    local url = luci.dispatcher.build_url(luci.dispatcher.context.path[1], "network", "wireless")
36    if section.diversity ~= "0" and section.disabled ~= "1" then
37        print('<div class="error">' .. translate("Diversity is enabled for device") .. ' <b>' .. device .. '</b>. '
38        .. translate("Go to") .. ' <a href="' .. url .. '">' .. translate("wireless settings") .. '</a> ' ..
39        translate("to disable it.") .. '</div><p />')
40    end
41end) %>
42
43<%+footer%>
Note: See TracBrowser for help on using the browser.