From bcf4d076e1827d7514cfe90a3d3a89d3a9cb0fc7 Mon Sep 17 00:00:00 2001 From: Martin Weinelt <mweinelt@users.noreply.github.com> Date: Tue, 27 Nov 2018 23:16:32 +0100 Subject: [PATCH] gluon-status-page: display position and link it with geo uri scheme (#1587) Fixes: #659 Signed-off-by: Martin Weinelt <martin@darmstadt.freifunk.net> --- .../files/lib/gluon/status-page/view/status-page.html | 6 ++++++ package/gluon-status-page/i18n/de.po | 3 +++ package/gluon-status-page/i18n/gluon-status-page.pot | 3 +++ 3 files changed, 12 insertions(+) diff --git a/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html b/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html index 2b6c7ac04..94c1d433e 100644 --- a/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html +++ b/package/gluon-status-page/files/lib/gluon/status-page/view/status-page.html @@ -103,6 +103,12 @@ <% if nodeinfo.owner and nodeinfo.owner.contact then -%> <dt><%:Contact%></dt><dd><%| nodeinfo.owner.contact %></dd> <%- end %> + <% if nodeinfo.location then -%> + <dt><%:Location%></dt> + <dd><a href="geo:<%| nodeinfo.location.latitude %>,<%| nodeinfo.location.longitude %>"> + <%| nodeinfo.location.latitude %>, <%| nodeinfo.location.longitude %> + </a></dd> + <%- end %> <dt><%:Model%></dt><dd><%| nodeinfo.hardware.model %></dd> <dt><%:Primary MAC address%></dt><dd><%| nodeinfo.network.mac %></dd> <dt><%:IP address%></dt><dd><%= pcdata(table.concat(sorted(nodeinfo.network.addresses), '\n')):gsub('\n', '<br />') %></dd> diff --git a/package/gluon-status-page/i18n/de.po b/package/gluon-status-page/i18n/de.po index 9454dad22..2e2d54b9b 100644 --- a/package/gluon-status-page/i18n/de.po +++ b/package/gluon-status-page/i18n/de.po @@ -34,6 +34,9 @@ msgstr "Clients" msgid "Contact" msgstr "Kontakt" +msgid "Location" +msgstr "Position" + msgid "Distance" msgstr "Entfernung" diff --git a/package/gluon-status-page/i18n/gluon-status-page.pot b/package/gluon-status-page/i18n/gluon-status-page.pot index 56b02dae0..1b4cd75b1 100644 --- a/package/gluon-status-page/i18n/gluon-status-page.pot +++ b/package/gluon-status-page/i18n/gluon-status-page.pot @@ -25,6 +25,9 @@ msgstr "" msgid "Contact" msgstr "" +msgid "Location" +msgstr "" + msgid "Distance" msgstr "" -- GitLab