summaryrefslogtreecommitdiff
path: root/templates/_suggestions_iris.html.ep
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-12-26 20:44:04 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-12-26 20:44:04 +0100
commit43c191fc9435a11f4349be86fe6844354f5bbca0 (patch)
treef98259f8a5f8c1d6199cd535d7b8eed11d4a0679 /templates/_suggestions_iris.html.ep
parentcb8d90be7e405d251dbb7f615701b69f4674e1ec (diff)
remove old (blocking) connection code; only show departure baord connections2.17.40
Background worker-based information about connecting departures while still checked in will come eventually, but won't recycle the existing code either way.
Diffstat (limited to 'templates/_suggestions_iris.html.ep')
-rw-r--r--templates/_suggestions_iris.html.ep44
1 files changed, 44 insertions, 0 deletions
diff --git a/templates/_suggestions_iris.html.ep b/templates/_suggestions_iris.html.ep
new file mode 100644
index 0000000..8aea570
--- /dev/null
+++ b/templates/_suggestions_iris.html.ep
@@ -0,0 +1,44 @@
+<ul class="collection departures connections">
+ % for my $res (@{$suggestions}) {
+ % my ($train, $dest) = @{$res};
+ % my $row_class = '';
+ % my $link_class = 'action-checkin';
+ % if ($train->departure_is_cancelled) {
+ % $row_class = 'cancelled';
+ % $link_class = 'action-cancelled-from';
+ % }
+ % if ($checkin_from) {
+ <li class="collection-item <%= $row_class %> <%= $link_class %>"
+ data-station="<%= $train->station_uic %>"
+ data-train="<%= $train->train_id %>"
+ data-ts="<%= ($train->sched_departure // $train->departure)->epoch %>"
+ data-dest="<%= $dest->{name} %>">
+ % }
+ % else {
+ <li class="collection-item <%= $row_class %>">
+ % }
+ <a class="dep-time" href="#">
+ % if ($train->departure_is_cancelled) {
+ %= $train->sched_departure->strftime('%H:%M')
+ % }
+ % else {
+ %= $train->departure->strftime('%H:%M')
+ % }
+ % if ($train->departure_delay) {
+ %= sprintf('(%+d)', $train->departure_delay)
+ % }
+ </a>
+ <span class="connect-platform-wrapper">
+ % if ($train->platform) {
+ <span>Gleis <%= $train->platform %></span>
+ % }
+ <span class="dep-line <%= $train->type // q{} %>">
+ %= $train->line
+ </span>
+ </span>
+ <span class="dep-dest">
+ %= $dest->{name}
+ </span>
+ </li>
+ % }
+</ul>