summaryrefslogtreecommitdiff
path: root/templates/_map_infobox.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-09-05 08:33:53 +0200
committerDaniel Friesel <derf@finalrewind.org>2020-09-05 08:33:53 +0200
commitc8383c697ac9108b195696a5ca371e79d224225f (patch)
tree1e799fa158ba07ea264785f19635708855ac557c /templates/_map_infobox.html.ep
parent8bf1dd3575bf58f1a50b28747f12f65a26b5a281 (diff)
parent37c510b2d351ea0c1c50ecceec21452de89afebf (diff)
Merge branch 'master' of git.finalrewind.org:var/git_root/db-fakedisplay into master3.1.3
Diffstat (limited to 'templates/_map_infobox.html.ep')
-rw-r--r--templates/_map_infobox.html.ep61
1 files changed, 61 insertions, 0 deletions
diff --git a/templates/_map_infobox.html.ep b/templates/_map_infobox.html.ep
new file mode 100644
index 0000000..8f66a6f
--- /dev/null
+++ b/templates/_map_infobox.html.ep
@@ -0,0 +1,61 @@
+<div class="container" id="infobox" 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') %>"
+>
+ Fahrt
+ % if (stash('train_no')) {
+ <strong><%= stash('train_no') %></strong>
+ % }
+ von <strong><%= stash('origin')->{name} %></strong>
+ nach <strong><%= stash('destination')->{name} %></strong>
+</div>
+% if (my $next = stash('next_stop')) {
+ <div class="nextstop">
+ % if ($next->{type} eq 'present' and $next->{station}{dep} and $next->{station}{arr}) {
+ Aufenthalt in <strong><%= $next->{station}{name} %></strong>
+ an Gleis <strong><%= $next->{station}{platform} %></strong>
+ bis <strong><%= $next->{station}{dep}->strftime('%H:%M') %></strong>
+ % if ($next->{station}{dep_delay}) {
+ %= sprintf('(%+d)', $next->{station}{dep_delay})
+ % }
+ % }
+ % elsif ($next->{type} eq 'present' and $next->{station}{dep}) {
+ Abfahrt in <strong><%= $next->{station}{name} %></strong>
+ von Gleis <strong><%= $next->{station}{platform} %></strong>
+ um <strong><%= $next->{station}{dep}->strftime('%H:%M') %></strong>
+ % if ($next->{station}{dep_delay}) {
+ %= sprintf('(%+d)', $next->{station}{dep_delay})
+ % }
+ % }
+ % elsif ($next->{type} eq 'present' and $next->{station}{arr}) {
+ Endstation erreicht um
+ <strong><%= $next->{station}{arr}->strftime('%H:%M') %></strong>
+ auf Gleis <strong><%= $next->{station}{platform} %></strong>
+ % if ($next->{station}{arr_delay}) {
+ %= sprintf('(%+d)', $next->{station}{arr_delay})
+ % }
+ % }
+ % elsif ($next->{type} eq 'present') {
+ Zug steht in
+ <strong><%= $next->{station}{arr}->strftime('%H:%M') %></strong>
+ auf Gleis <strong><%= $next->{station}{platform} %></strong>
+ % }
+ % elsif ($next->{type} eq 'next' and $next->{station}{arr}) {
+ Nächster Halt:
+ <strong><%= $next->{station}{name} %></strong>
+ um <strong><%= $next->{station}{arr}->strftime('%H:%M') %></strong>
+ % if ($next->{station}{arr_delay}) {
+ %= sprintf('(%+d)', $next->{station}{arr_delay})
+ % }
+ auf Gleis <strong><%= $next->{station}{platform} %></strong>
+ % }
+ % elsif ($next->{type} eq 'next') {
+ Nächster Halt:
+ <strong><%= $next->{station}{name} %></strong>
+ auf Gleis <strong><%= $next->{station}{platform} %></strong>
+ % }
+ </div>
+% }
+</div>