From 7ae3fc5478312e6213d33b6300626eeb8cde9a5f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Mon, 25 May 2009 13:53:31 +0000 Subject: [PATCH] modules/freifunk: add map --- .../luci-static/resources/freifunk-map/hna.gif | Bin 0 -> 209 bytes .../luci-static/resources/freifunk-map/node.gif | Bin 0 -> 209 bytes .../luasrc/controller/freifunk/freifunk.lua | 3 + .../freifunk/luasrc/view/freifunk-map/frame.htm | 21 +++++ modules/freifunk/luasrc/view/freifunk-map/map.htm | 97 +++++++++++++++++++++ 5 files changed, 121 insertions(+) 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 6c8911b76..fd61bb3bd 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 000000000..9ec4f1c5d --- /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 000000000..7ecf49521 --- /dev/null +++ b/modules/freifunk/luasrc/view/freifunk-map/map.htm @@ -0,0 +1,97 @@ + + + + Map + + + + + +
+ + -- 2.11.0