From: Jo-Philipp Wich Date: Mon, 25 May 2009 14:01:31 +0000 (+0000) Subject: luci-0.8: merge r4605 and r4606 X-Git-Tag: 0.8.7~20 X-Git-Url: http://git.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=26336c5eda9f4a64d990ca86f1da477ae014d6b7 luci-0.8: merge r4605 and r4606 --- diff --git a/modules/freifunk/htdocs/luci-static/resources/freifunk-map/hna.gif b/modules/freifunk/htdocs/luci-static/resources/freifunk-map/hna.gif new file mode 100644 index 0000000000..818780d153 Binary files /dev/null and b/modules/freifunk/htdocs/luci-static/resources/freifunk-map/hna.gif differ diff --git a/modules/freifunk/htdocs/luci-static/resources/freifunk-map/node.gif b/modules/freifunk/htdocs/luci-static/resources/freifunk-map/node.gif new file mode 100644 index 0000000000..f64ab162a4 Binary files /dev/null and b/modules/freifunk/htdocs/luci-static/resources/freifunk-map/node.gif differ diff --git a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua index 6c8911b76f..fd61bb3bde 100644 --- a/modules/freifunk/luasrc/controller/freifunk/freifunk.lua +++ b/modules/freifunk/luasrc/controller/freifunk/freifunk.lua @@ -71,6 +71,9 @@ function index() page.target = cbi("freifunk/contact") page.title = "Kontakt" page.order = 40 + + entry({"freifunk", "map"}, template("freifunk-map/frame"), translate("freifunk_map", "Karte"), 50) + entry({"freifunk", "map", "content"}, template("freifunk-map/map"), nil, 51) end local function fetch_olsrd() diff --git a/modules/freifunk/luasrc/view/freifunk-map/frame.htm b/modules/freifunk/luasrc/view/freifunk-map/frame.htm new file mode 100644 index 0000000000..9ec4f1c5db --- /dev/null +++ b/modules/freifunk/luasrc/view/freifunk-map/frame.htm @@ -0,0 +1,21 @@ +<%+header%> + +<% + local has_latlon = false + local uci = require "luci.model.uci".cursor() + uci:foreach("olsrd", "LoadPlugin", function(s) + if s.library == "olsrd_nameservice.so.0.3" and s.latlon_file then + has_latlon = true + end + end) +%> + +<% if has_latlon then %> + +<% else %> +

<%:freifunk_map_error Map Error%>

+

<%:freifunk_map_nodata The OLSRd service is not configured to capture position data from the network.
+ Please make sure that the nameservice plugin is properly configured and that the latlon_file option is enabled.%>

+<% end %> + +<%+footer%> diff --git a/modules/freifunk/luasrc/view/freifunk-map/map.htm b/modules/freifunk/luasrc/view/freifunk-map/map.htm new file mode 100644 index 0000000000..7ecf495210 --- /dev/null +++ b/modules/freifunk/luasrc/view/freifunk-map/map.htm @@ -0,0 +1,97 @@ + + + + Map + + + + + +
+ + diff --git a/modules/freifunk/root/etc/init.d/freifunk b/modules/freifunk/root/etc/init.d/freifunk index 3a668b11f5..8b280cd51f 100755 --- a/modules/freifunk/root/etc/init.d/freifunk +++ b/modules/freifunk/root/etc/init.d/freifunk @@ -24,7 +24,7 @@ boot() { } grep -q '/usr/sbin/ff_mapupdate' /etc/crontabs/root || { - echo "17 * * * * /usr/sbin/ff_mapupdate >> /etc/crontabs/root + echo "17 * * * * /usr/sbin/ff_mapupdate" >> /etc/crontabs/root } [ -f /etc/rc.local ] && . /etc/rc.local