Skip to content

Commit

Permalink
_checked_in: HAFAS: pass train type and number to bahn.expert, if ava…
Browse files Browse the repository at this point in the history
…ilable

Patch by @networkException, thanks!

Closes #158
  • Loading branch information
derf committed Aug 24, 2024
1 parent 8184a17 commit 9fdae85
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions templates/_checked_in.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 9fdae85

Please sign in to comment.