Skip to content

Commit

Permalink
public status card: only link to bahn.expert for DB journeys
Browse files Browse the repository at this point in the history
  • Loading branch information
derf committed Aug 3, 2024
1 parent 4a5fdd8 commit aec37cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion templates/_public_status_card.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,13 @@
<div class="card-action">
% if ($journey->{traewelling_url}) {
<a style="margin-right: 0;" href="<%= $journey->{traewelling_url} %>"><i class="material-icons left">timeline</i> Träwelling</a>
% } else {
% } 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';
<a style="margin-right: 0;" href="<%= $url %>"><i class="material-icons left">timeline</i> Zuglauf</a>
% }
% else {
&nbsp;
% }
% if ($journey->{extra_data}{trip_id}) {
<a class="right" style="margin-right: 0;" href="https://dbf.finalrewind.org/map/<%= $journey->{extra_data}{trip_id} =~ s{#}{%23}gr %>/<%= $journey->{train_line} || 0 %>?hafas=<%= $journey->{backend_name} // 'DB' %>&amp;from=<%= $journey->{dep_name} %>&amp;to=<%= $journey->{arr_name} // '' %>"><i class="material-icons left">map</i> Karte</a>
% }
Expand Down

0 comments on commit aec37cc

Please sign in to comment.