From 3d22c00120518f8c5207fe1049a00506091cd43c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 4 Jan 2020 22:51:59 +0100 Subject: show train route on map --- templates/_train_details.html.ep | 5 ++++ templates/layouts/app.html.ep | 4 +++ templates/route_map.html.ep | 54 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 templates/route_map.html.ep (limited to 'templates') diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 44cf01d..444fe9a 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -78,6 +78,11 @@ Wagenreihung % } +% if ($departure->{trip_id}) { +
+ Karte +
+% } % } % if ($departure->{moreinfo} and @{$departure->{moreinfo}}) { diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep index bba3c32..2a596c0 100644 --- a/templates/layouts/app.html.ep +++ b/templates/layouts/app.html.ep @@ -28,6 +28,10 @@ % if (stash('with_geolocation')) { %= javascript "/static/${av}/js/geolocation.min.js", defer => undef % } + % if (stash('with_map')) { + %= stylesheet "/static/${av}/leaflet/leaflet.css" + %= javascript "/static/${av}/leaflet/leaflet.js" + % } diff --git a/templates/route_map.html.ep b/templates/route_map.html.ep new file mode 100644 index 0000000..505cddb --- /dev/null +++ b/templates/route_map.html.ep @@ -0,0 +1,54 @@ +% if (0) { +
+
+ Fehler! + Baz +
+
+% } +% else { +
+
+
+
+ + +% } -- cgit v1.2.3