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/_checked_in.html.ep | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'templates/_checked_in.html.ep') diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 797ff57..a5611e9 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -356,24 +356,20 @@ % }
- % my $url = 'https://bahn.expert/details/'; - % if ($journey->{train_id} =~ m{[|]}) { - % if ($journey->{train_type} and $journey->{train_no}) { - % $url .= $journey->{train_type} . ' ' . $journey->{train_no}; - % } - % $url .= '/' . $journey->{sched_departure}->epoch . '000?jid=' . $journey->{train_id} =~ s{#}{%23}gr; - % } - % else { - % $url .= $journey->{train_type} . ' ' . $journey->{train_no} . '/' . $journey->{sched_departure}->epoch . '000?station=' . $journey->{dep_eva}; + % my $url = 'https://dbf.finalrewind.org/z/'; + % if ($journey->{is_hafas}) { + % $url .= $journey->{train_id} =~ s{#}{%23}gr . '?hafas=' . $journey->{backend_name}; + Details % } - % if ($journey->{backend_id} <= 1) { + % elsif ($journey->{extra_data}{trip_id}) { + % $url .= $journey->{extra_data}{trip_id} =~ s{#}{%23}gr; Zuglauf % } % else {   % } % if ($journey->{extra_data}{trip_id}) { - Karte + Karte % }
-- cgit v1.2.3