summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-01-08 19:01:19 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2020-01-08 19:01:19 +0100
commit9697279aeb1fe202274c2e0c30c5f12e0565a8c8 (patch)
tree05b54a9402df02d5603d92f76b45032a9c9001a4 /templates
parente8b610f3e64a395864f50c8e798de08678bfb228 (diff)
add links to complete route and map for checked-in trains
Diffstat (limited to 'templates')
-rw-r--r--templates/_checked_in.html.ep11
-rw-r--r--templates/_public_status_card.html.ep16
2 files changed, 24 insertions, 3 deletions
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index fdf0ab8..b220000 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -260,6 +260,17 @@
% }
</div>
</div>
+ <div class="row" style="margin-top: 2em;">
+ <div class="col s6 center-align">
+ % my $url = 'https://marudor.de/details/' . $journey->{train_type} . ' ' . $journey->{train_no} . '/' . DateTime->now(time_zone => 'Europe/Berlin')->epoch . '000';
+ <a href="<%= $url %>" class="waves-effect waves-light btn"><i class="material-icons left">timeline</i> Zuglauf</a>
+ </div>
+ <div class="col s6 center-align">
+ % if ($journey->{extra_data}{trip_id}) {
+ <a href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} %>/<%= $journey->{train_line} || 0 %>" class="waves-effect waves-light btn"><i class="material-icons left">map</i> Karte</a>
+ % }
+ </div>
+ </div>
% if ($journey->{arr_name}) {
<div class="card" style="margin-top: 3em;">
<div class="card-content">
diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep
index 6b2a5c3..751a14b 100644
--- a/templates/_public_status_card.html.ep
+++ b/templates/_public_status_card.html.ep
@@ -8,12 +8,11 @@
<p>„<%= $journey->{comment} %>“</p>
% }
<p>
- % my $url = 'https://marudor.de/details/' . $journey->{train_type} . ' ' . $journey->{train_no} . '/' . DateTime->now(time_zone => 'Europe/Berlin')->epoch . '000';
% if ($journey->{train_line}) {
- <div class="center-align"><a href="<%= $url %>"><b><%= $journey->{train_type} %> <%= $journey->{train_line} %></b> <%= $journey->{train_no} %></a></div>
+ <div class="center-align"><b><%= $journey->{train_type} %> <%= $journey->{train_line} %></b> <%= $journey->{train_no} %></div>
% }
% else {
- <div class="center-align"><a href="<%= $url %>"><b><%= $journey->{train_type} %> <%= $journey->{train_no} %></b></a></div>
+ <div class="center-align"><b><%= $journey->{train_type} %> <%= $journey->{train_no} %></b></div>
% }
<div class="center-align countdown"
data-duration="<%= $journey->{journey_duration} // 0 %>"
@@ -142,6 +141,17 @@
% }
</div>
</div>
+ <div class="row">
+ <div class="col s6 center-align">
+ % my $url = 'https://marudor.de/details/' . $journey->{train_type} . ' ' . $journey->{train_no} . '/' . DateTime->now(time_zone => 'Europe/Berlin')->epoch . '000';
+ <a href="<%= $url %>" class="waves-effect waves-light btn"><i class="material-icons left">timeline</i> Zuglauf</a>
+ </div>
+ <div class="col s6 center-align">
+ % if ($journey->{extra_data}{trip_id}) {
+ <a href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} %>/<%= $journey->{train_line} || 0 %>" class="waves-effect waves-light btn"><i class="material-icons left">map</i> Karte</a>
+ % }
+ </div>
+ </div>
% }
% else {
<div class="card">