mirror of
https://github.com/derf/travelynx
synced 2024-12-03 17:59:12 +00:00
75 lines
2 KiB
Text
75 lines
2 KiB
Text
<div class="row">
|
||
<div class="col s12 center-align">
|
||
<b><%= $station %></b>
|
||
% for my $related_station (sort { $a->{name} cmp $b->{name} } @{$related_stations}) {
|
||
<br/><%= $related_station->{name} %>
|
||
% }
|
||
</div>
|
||
</div>
|
||
% my $status = $self->get_user_status;
|
||
% my $have_connections = 0;
|
||
% if ($status->{checked_in}) {
|
||
<div class="row">
|
||
<div class="col s12">
|
||
<div class="card">
|
||
<div class="card-content">
|
||
<span class="card-title">Aktuell eingecheckt</span>
|
||
<p>In <%= $status->{train_type} %> <%= $status->{train_no} %>
|
||
ab <%= $status->{dep_name} %></p>
|
||
</div>
|
||
<div class="card-action">
|
||
<a class="action-checkout" data-station="<%= $eva %>" data-force="1">
|
||
Hier auschecken
|
||
</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
% }
|
||
% elsif ($status->{cancellation} and $station eq $status->{cancellation}{dep_name}) {
|
||
<div class="row">
|
||
<div class="col s12">
|
||
%= include '_cancelled_departure', journey => $status->{cancellation};
|
||
</div>
|
||
</div>
|
||
% }
|
||
% elsif ($status->{timestamp_delta} < 180) {
|
||
<div class="row">
|
||
<div class="col s12">
|
||
%= include '_checked_out', journey => $status;
|
||
</div>
|
||
</div>
|
||
% }
|
||
% elsif (not param('train') and my @connections = @{stash('connections') // []}) {
|
||
% $have_connections = 1;
|
||
<div class="row">
|
||
<div class="col s12">
|
||
<p>Häufig genutzte Verbindungen – Zug auswählen zum Einchecken mit Zielwahl</p>
|
||
%= include '_connections', connections => \@connections, checkin_from => $eva;
|
||
</div>
|
||
</div>
|
||
% }
|
||
<div class="row">
|
||
<div class="col s12">
|
||
<p>
|
||
% if ($have_connections) {
|
||
Alle Abfahrten –
|
||
% }
|
||
% if (@{$results}) {
|
||
Zug auswählen zum Einchecken.
|
||
% }
|
||
% else {
|
||
Keine Abfahrten gefunden. Ein Checkin ist frühestens 30 Minuten vor
|
||
und maximal 120 Minuten nach Abfahrt möglich.
|
||
% }
|
||
</p>
|
||
% if ($hafas) {
|
||
%= include '_departures_hafas', results => $results;
|
||
% }
|
||
% else {
|
||
%= include '_departures_iris', results => $results;
|
||
% }
|
||
</div>
|
||
</div>
|
||
|
||
%= include '_footer', version => stash('version')
|