Loading lib/Travelynx/Controller/Traveling.pm +10 −1 Original line number Diff line number Diff line Loading @@ -362,7 +362,16 @@ sub status_card { ); } else { $self->render( '_checked_out', journey => $status ); my @connecting_trains; my $now = DateTime->now( time_zone => 'Europe/Berlin' ); if ( $now->epoch - $status->{timestamp}->epoch < ( 30 * 60 ) ) { @connecting_trains = $self->get_connecting_trains; } $self->render( '_checked_out', journey => $status, connections => \@connecting_trains ); } } Loading templates/_checked_out.html.ep +4 −6 Original line number Diff line number Diff line Loading @@ -3,13 +3,11 @@ <span class="card-title">Ausgecheckt</span> <p>Aus <%= $journey->{train_type} %> <%= $journey->{train_no} %> bis <a href="/s/<%= $journey->{arr_ds100} %>"><%= $journey->{arr_name} %></a></p> % if (now()->epoch - $journey->{timestamp}->epoch < (30*60)) { % if (my @connections = get_connecting_trains()) { % if (my @connections = @{stash('connections') // []}) { <span class="card-title" style="margin-top: 2ex;">Verbindungen</span> <p>Zug auswählen zum Einchecken mit Zielwahl.</p> %= include '_connections', connections => \@connections, checkin_from => $journey->{arr_ds100}; % } % } </div> <div class="card-action"> <a class="action-undo" data-id="<%= $journey->{journey_id} %>"> Loading Loading
lib/Travelynx/Controller/Traveling.pm +10 −1 Original line number Diff line number Diff line Loading @@ -362,7 +362,16 @@ sub status_card { ); } else { $self->render( '_checked_out', journey => $status ); my @connecting_trains; my $now = DateTime->now( time_zone => 'Europe/Berlin' ); if ( $now->epoch - $status->{timestamp}->epoch < ( 30 * 60 ) ) { @connecting_trains = $self->get_connecting_trains; } $self->render( '_checked_out', journey => $status, connections => \@connecting_trains ); } } Loading
templates/_checked_out.html.ep +4 −6 Original line number Diff line number Diff line Loading @@ -3,13 +3,11 @@ <span class="card-title">Ausgecheckt</span> <p>Aus <%= $journey->{train_type} %> <%= $journey->{train_no} %> bis <a href="/s/<%= $journey->{arr_ds100} %>"><%= $journey->{arr_name} %></a></p> % if (now()->epoch - $journey->{timestamp}->epoch < (30*60)) { % if (my @connections = get_connecting_trains()) { % if (my @connections = @{stash('connections') // []}) { <span class="card-title" style="margin-top: 2ex;">Verbindungen</span> <p>Zug auswählen zum Einchecken mit Zielwahl.</p> %= include '_connections', connections => \@connections, checkin_from => $journey->{arr_ds100}; % } % } </div> <div class="card-action"> <a class="action-undo" data-id="<%= $journey->{journey_id} %>"> Loading