summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-08-03 21:18:14 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-08-03 21:18:14 +0200
commitaec37cce68ccc00a05b63035d8e89a8898d85646 (patch)
tree4ae06df4b851741d445b41b0db3e4c0d605f2635 /templates
parent4a5fdd80dab8fe7522c43a3e10a575fb97f13f1f (diff)
public status card: only link to bahn.expert for DB journeys
Diffstat (limited to 'templates')
-rw-r--r--templates/_public_status_card.html.ep5
1 files changed, 4 insertions, 1 deletions
diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep
index 4c3d617..ae00b0b 100644
--- a/templates/_public_status_card.html.ep
+++ b/templates/_public_status_card.html.ep
@@ -165,10 +165,13 @@
<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 {
+ % } elsif ($journey->{backend_id} <= 1) {
% 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>
% }
+ % else {
+ &nbsp;
+ % }
% if ($journey->{extra_data}{trip_id}) {
<a class="right" style="margin-right: 0;" href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} =~ s{#}{%23}gr %>/<%= $journey->{train_line} || 0 %>?hafas=<%= $journey->{backend_name} // 'DB' %>&amp;from=<%= $journey->{dep_name} %>&amp;to=<%= $journey->{arr_name} // '' %>"><i class="material-icons left">map</i> Karte</a>
% }