From 26336c5eda9f4a64d990ca86f1da477ae014d6b7 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 25 May 2009 14:01:31 +0000 Subject: [PATCH] luci-0.8: merge r4605 and r4606 --- .../resources/freifunk-map/hna.gif | Bin 0 -> 209 bytes .../resources/freifunk-map/node.gif | Bin 0 -> 209 bytes .../luasrc/controller/freifunk/freifunk.lua | 3 + .../luasrc/view/freifunk-map/frame.htm | 21 ++++ .../freifunk/luasrc/view/freifunk-map/map.htm | 97 ++++++++++++++++++ modules/freifunk/root/etc/init.d/freifunk | 2 +- 6 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 modules/freifunk/htdocs/luci-static/resources/freifunk-map/hna.gif create mode 100644 modules/freifunk/htdocs/luci-static/resources/freifunk-map/node.gif create mode 100644 modules/freifunk/luasrc/view/freifunk-map/frame.htm create mode 100644 modules/freifunk/luasrc/view/freifunk-map/map.htm 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 0000000000000000000000000000000000000000..818780d153abf08cd650ff698e6b595f9b2a9bac GIT binary patch literal 209 zcmZ?wbhEHblwgoxn8?KNpCRo(7%(s}DE{a6a}5c0b_{Se(lcOY1PT3Q;Y?v*V$cDy zff^(j7?@a)&euTE|AWyGdI0ZBvV4T}c(n0X8> z)7Z;mj%|C#ef-lOF_0!!G+Q(gntnH3Gi&(II<=fZ$yMqZ$CT$!8ei|&d!zUHuXEr3 J1u-yK0|2#tP22zg literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..f64ab162a451f8eb04b6b6664694b7b907f511cf GIT binary patch literal 209 zcmZ?wbhEHblwgoxn8?JykoF$}7#J87|8x7fh6Fo12DlpO889<~gnqJcrZ6xu=m6P3 z4H66tOfpmYSDt>$zj)4;Tiu^o8K20d%vnD5S?97>r?&YrV$-02q#^T$MT30IJcgEO z>}4^>w!Py%{^^exNE0iXEt&{TzniX^HT-9tTF#*4D)o$G%JV0UuXpUd(fj<@x$pmi H7#OSpv*u0Q literal 0 HcmV?d00001 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 -- 2.30.2