diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-12-27 18:42:42 +0100 |
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-12-27 18:42:42 +0100 |
| commit | e9e06417cff8f42beb4debc9a90cb439f53e0bce (patch) | |
| tree | 6e38b4689bd8d63eac31e518804666e5374b695e /templates | |
| parent | 3acb1b379b9be3c1cc252d7a55f1ec34240e48f6 (diff) | |
DBRIS: show connections while still checked in
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/_checked_in.html.ep | 7 | ||||
| -rw-r--r-- | templates/_connections_dbris.html.ep (renamed from templates/_suggestions_dbris.html.ep) | 30 | ||||
| -rw-r--r-- | templates/departures.html.ep | 2 |
3 files changed, 23 insertions, 16 deletions
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index b590fdd..837032a 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -221,6 +221,13 @@ </ul> </p> % } + % if (my @suggestions = @{$journey->{extra_data}{connection_suggestions_dbris} // []}) { + <span class="card-title" style="margin-top: 2ex;">Verbindungen</span> + % if ($journey->{arrival_countdown} < 0) { + <p>Fahrt auswählen zum Einchecken mit Zielwahl.</p> + % } + %= include '_connections_dbris', dbris => $journey->{backend_name}, suggestions => \@suggestions, checkin_from => $journey->{arrival_countdown} < 0 ? $journey->{arr_eva} : undef + % } % if (my @suggestions = @{$journey->{extra_data}{connection_suggestions_efa} // []}) { <span class="card-title" style="margin-top: 2ex;">Verbindungen</span> % if ($journey->{arrival_countdown} < 0) { diff --git a/templates/_suggestions_dbris.html.ep b/templates/_connections_dbris.html.ep index 175a57b..8fedf84 100644 --- a/templates/_suggestions_dbris.html.ep +++ b/templates/_connections_dbris.html.ep @@ -3,47 +3,47 @@ % my ($dep, $dest) = @{$res}; % my $row_class = ''; % my $link_class = 'action-checkin'; - % if ($dep->is_cancelled) { + % if ($dep->{is_cancelled}) { % $row_class = 'cancelled'; % $link_class = 'action-cancelled-from'; % } % if ($checkin_from) { <li class="collection-item <%= $row_class %> <%= $link_class %>" data-dbris="<%= $dbris %>" - data-station="<%= $dep->stop_eva %>" - data-train="<%= $dep->id %>" - data-suffix="<%= $dep->maybe_line_no %>" - data-ts="<%= ($dep->sched_dep // $dep->dep)->epoch %>" + data-station="<%= $dep->{stop_eva} %>" + data-train="<%= $dep->{id} %>" + data-suffix="<%= $dep->{maybe_line_no} %>" + data-ts="<%= $dep->{ts} %>" data-dest="<%= $dest->{name} %>"> % } % else { <li class="collection-item <%= $row_class %>"> % } <a class="dep-time" href="#"> - % if ($dep->is_cancelled) { - %= $dep->sched_dep->strftime('%H:%M') + % if ($dep->{is_cancelled}) { + %= $dep->{sched_hhmm} % } % else { - %= $dep->dep->strftime('%H:%M') + %= $dep->{rt_hhmm} % } - % if ($dep->delay) { - %= sprintf('(%+d)', $dep->delay) + % if ($dep->{delay}) { + %= sprintf('(%+d)', $dep->{delay}) % } </a> <span class="connect-platform-wrapper"> - % if ($dep->platform) { + % if ($dep->{platform}) { <span> - % if (($dep->type // q{}) =~ m{ ast | bus | ruf }ix) { + % if (($dep->{type} // q{}) =~ m{ ast | bus | ruf }ix) { Steig % } % else { Gleis % } - %= $dep->platform + %= $dep->{platform} </span> % } - <span class="dep-line <%= $dep->type // q{} %>"> - %= $dep->line + <span class="dep-line <%= $dep->{type} // q{} %>"> + %= $dep->{line} </span> </span> <span class="dep-dest"> diff --git a/templates/departures.html.ep b/templates/departures.html.ep index 5d5e5af..0513924 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -87,7 +87,7 @@ <div class="col s12"> <p>Häufig genutzte Verbindungen – Fahrt auswählen zum Einchecken mit Zielwahl</p> % if ($dbris) { - %= include '_suggestions_dbris', suggestions => stash('suggestions'), checkin_from => $eva; + %= include '_connections_dbris', suggestions => stash('suggestions'), checkin_from => $eva; % } % elsif ($efa) { %= include '_connections_efa', suggestions => stash('suggestions'), checkin_from => $eva; |
