modules/freifunk: add map
[project/luci.git] / modules / 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="<%=luci.dispatcher.build_url("freifunk/map/content")%>"></iframe>
15 <% else %>
16 <h2><%:freifunk_map_error Map Error%></h2>
17 <p><%:freifunk_map_nodata The OLSRd service is not configured to capture position data from the network.<br />
18 Please make sure that the nameservice plugin is properly configured and that the <em>latlon_file</em> option is enabled.%></p>
19 <% end %>
20
21 <%+footer%>