Globally replace luci.dispatcher.build_url(...) with url(...) invocations
[project/luci.git] / modules / luci-mod-freifunk / luasrc / view / freifunk-map / frame.htm
1 <%+header%>
2
3 <%
4         local has_latlon = false
5         local uci = require "luci.model.uci".cursor()
6         uci:foreach("olsrd", "LoadPlugin", function(s)
7                 if s.library == "olsrd_nameservice.so.0.3" and s.latlon_file then
8                         has_latlon = true
9                 end
10         end)
11 %>
12
13 <% if has_latlon then %>
14         <iframe style="width:100%; height:640px; border:none" src="<%=url("freifunk/map/content")%>"></iframe>
15         <h3><%:Legend%>:</h3>
16         <ul>
17                 <li><strong><span style="color:#00cc00"><%:Green%></span></strong>:<%:Very good (ETX < 2)%></li>
18                 <li><strong><span style="color:#ffcb05"><%:Yellow%></span></strong>:<%:Good (2 < ETX < 4)%></li>
19                 <li><strong><span style="color:#ff6600"><%:Orange%></span></strong>:<%:Still usable (4 < ETX < 10)%></li>
20                 <li><strong><span style="color:#bb3333"><%:Red%></span></strong>:<%:Bad (ETX > 10)%></li>
21         </ul>
22
23 <% else %>
24         <h2><%:Map Error%></h2>
25         <p><%_The OLSRd service is not configured to capture position data from the network.<br />
26                 Please make sure that the nameservice plugin is properly configured and that the <em>latlon_file</em> option is enabled.%></p>
27 <% end %>
28 <%+footer%>
29