summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_intersection_infobox.html.ep22
-rw-r--r--templates/route_map.html.ep5
2 files changed, 26 insertions, 1 deletions
diff --git a/templates/_intersection_infobox.html.ep b/templates/_intersection_infobox.html.ep
new file mode 100644
index 0000000..cb27d19
--- /dev/null
+++ b/templates/_intersection_infobox.html.ep
@@ -0,0 +1,22 @@
+<div class="container" id="infobox2" style="margin-top: 1ex; margin-bottom: 1ex;">
+<div class="journey" id="jdata"
+data-req="<%= stash('ajax_req') %>"
+data-route="<%= stash('ajax_route') %>"
+data-poly="<%= stash('ajax_polyline') %>"
+>
+ <strong><%= stash('train1_no') %></strong>
+ und
+ <strong><%= stash('train2_no') %></strong>
+ werden sich wahrscheinlich
+ % if (my $t = stash('time')) {
+ gegen <strong><%= $t->strftime('%H:%M') %> Uhr</strong>
+ % }
+ % if (my $p = stash('likely_pair')) {
+ zwischen <strong><%= $p->[0] %></strong> und <strong><%= $p->[1] %></strong>
+ % }
+ % if (not stash('time')) {
+ nicht
+ % }
+ begegnen.
+</div>
+</div>
diff --git a/templates/route_map.html.ep b/templates/route_map.html.ep
index 6f5643b..1ba96bc 100644
--- a/templates/route_map.html.ep
+++ b/templates/route_map.html.ep
@@ -1,6 +1,9 @@
-% if ($origin and $destination) {
+% if (stash('origin') and stash('destination')) {
%= include '_map_infobox'
% }
+% elsif (stash('intersection')) {
+ %= include '_intersection_infobox'
+% }
<div class="container">
<div id="map" style="height: 500px;">