summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-07-16 10:33:49 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-07-16 10:33:49 +0200
commit6277cdd929f81db764333cfc6473f476a04d2fcb (patch)
tree4f4f21ab74c988a13b3b11358a7831900ca9b3e7 /templates
parentb0bb69d87ed0d807946474ec66f4f07935a2b147 (diff)
status card: do not show detail/map links in timeline view
Diffstat (limited to 'templates')
-rw-r--r--templates/_public_status_card.html.ep24
1 files changed, 13 insertions, 11 deletions
diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep
index cbdc878..0f7cacd 100644
--- a/templates/_public_status_card.html.ep
+++ b/templates/_public_status_card.html.ep
@@ -156,17 +156,19 @@
</p>
% }
</div>
- <div class="card-action">
- % if ($journey->{traewelling_url}) {
- <a style="margin-right: 0;" href="<%= $journey->{traewelling_url} %>"><i class="material-icons left">timeline</i> Träwelling</a>
- % } else {
- % my $url = 'https://bahn.expert/details/' . $journey->{train_type} . ' ' . $journey->{train_no} . '/' . DateTime->now(time_zone => 'Europe/Berlin')->epoch . '000';
- <a style="margin-right: 0;" href="<%= $url %>"><i class="material-icons left">timeline</i> Zuglauf</a>
- % }
- % if ($journey->{extra_data}{trip_id}) {
- <a class="right" style="margin-right: 0;" href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} %>/<%= $journey->{train_line} || 0 %>?from=<%= $journey->{dep_name} %>&amp;to=<%= $journey->{arr_name} // '' %>"><i class="material-icons left">map</i> Karte</a>
- % }
- </div>
+ % if (not stash('from_timeline')) {
+ <div class="card-action">
+ % if ($journey->{traewelling_url}) {
+ <a style="margin-right: 0;" href="<%= $journey->{traewelling_url} %>"><i class="material-icons left">timeline</i> Träwelling</a>
+ % } else {
+ % my $url = 'https://bahn.expert/details/' . $journey->{train_type} . ' ' . $journey->{train_no} . '/' . DateTime->now(time_zone => 'Europe/Berlin')->epoch . '000';
+ <a style="margin-right: 0;" href="<%= $url %>"><i class="material-icons left">timeline</i> Zuglauf</a>
+ % }
+ % if ($journey->{extra_data}{trip_id}) {
+ <a class="right" style="margin-right: 0;" href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} %>/<%= $journey->{train_line} || 0 %>?from=<%= $journey->{dep_name} %>&amp;to=<%= $journey->{arr_name} // '' %>"><i class="material-icons left">map</i> Karte</a>
+ % }
+ </div>
+ % }
</div>
% }
% else {