summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-08-24 09:33:52 +0200
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-08-24 09:33:52 +0200
commit9fdae85904376eab907083e1c2bdbe61dcff682f (patch)
tree95801049453252975d3158b40e473e8520fb3541 /templates
parent8184a17a20c9c1f1f92c5463f6d4114ad5092914 (diff)
_checked_in: HAFAS: pass train type and number to bahn.expert, if available
Patch by @networkException, thanks! Closes #158
Diffstat (limited to 'templates')
-rw-r--r--templates/_checked_in.html.ep7
1 files changed, 5 insertions, 2 deletions
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index 249997a..9e69218 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -358,10 +358,13 @@
<div class="card-action">
% my $url = 'https://bahn.expert/details/';
% if ($journey->{train_id} =~ m{[|]}) {
- % $url = $url . '/' . $journey->{sched_departure}->epoch . '000?jid=' . $journey->{train_id} =~ s{#}{%23}gr;
+ % 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 = $url . $journey->{train_type} . ' ' . $journey->{train_no} . '/' . $journey->{sched_departure}->epoch . '000?station=' . $journey->{dep_eva};
+ % $url .= $journey->{train_type} . ' ' . $journey->{train_no} . '/' . $journey->{sched_departure}->epoch . '000?station=' . $journey->{dep_eva};
% }
% if ($journey->{backend_id} <= 1) {
<a style="margin-right: 0;" href="<%= $url %>"><i class="material-icons left" aria-hidden="true">timeline</i> Zuglauf</a>