From 5d3cf2ccab4a1f521273d2171b112c1badd8b996 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 9 Feb 2025 09:23:35 +0100 Subject: Make "Zuglauf" links work for non-DB checkins replaces text with "Details" for those --- templates/_public_status_card.html.ep | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'templates/_public_status_card.html.ep') diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep index 6dda46d..84708ef 100644 --- a/templates/_public_status_card.html.ep +++ b/templates/_public_status_card.html.ep @@ -168,8 +168,13 @@
% if ($journey->{traewelling_url}) { timeline Träwelling - % } 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'; + % } + % elsif ($journey->{is_hafas}) { + % my $url = 'https://dbf.finalrewind.org/z/' . $journey->{train_id} =~ s{#}{%23}gr . '?hafas=' . $journey->{backend_name}; + timeline Details + % } + % elsif ($journey->{extra_data}{trip_id}) { + % my $url = 'https://dbf.finalrewind.org/z/' . $journey->{extra_data}{trip_id} =~ s{#}{%23}gr; timeline Zuglauf % } % else { -- cgit v1.2.3