_checked_in: HAFAS: pass train type and number to bahn.expert, if available
Patch by @networkException, thanks! Closes #158
This commit is contained in:
parent
8184a17a20
commit
9fdae85904
1 changed files with 5 additions and 2 deletions
|
@ -358,10 +358,13 @@
|
||||||
<div class="card-action">
|
<div class="card-action">
|
||||||
% my $url = 'https://bahn.expert/details/';
|
% my $url = 'https://bahn.expert/details/';
|
||||||
% if ($journey->{train_id} =~ m{[|]}) {
|
% 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 {
|
% 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) {
|
% if ($journey->{backend_id} <= 1) {
|
||||||
<a style="margin-right: 0;" href="<%= $url %>"><i class="material-icons left" aria-hidden="true">timeline</i> Zuglauf</a>
|
<a style="margin-right: 0;" href="<%= $url %>"><i class="material-icons left" aria-hidden="true">timeline</i> Zuglauf</a>
|
||||||
|
|
Loading…
Reference in a new issue