summaryrefslogtreecommitdiff
path: root/templates/_suggestions_efa.html.ep
diff options
context:
space:
mode:
Diffstat (limited to 'templates/_suggestions_efa.html.ep')
-rw-r--r--templates/_suggestions_efa.html.ep53
1 files changed, 53 insertions, 0 deletions
diff --git a/templates/_suggestions_efa.html.ep b/templates/_suggestions_efa.html.ep
new file mode 100644
index 0000000..68fb4a9
--- /dev/null
+++ b/templates/_suggestions_efa.html.ep
@@ -0,0 +1,53 @@
+<ul class="collection departures connections">
+ % for my $res (@{$suggestions}) {
+ % my ($dep, $dest) = @{$res};
+ % my $row_class = '';
+ % my $link_class = 'action-checkin';
+ % if ($dep->is_cancelled) {
+ % $row_class = 'cancelled';
+ % $link_class = 'action-cancelled-from';
+ % }
+ % if ($checkin_from) {
+ <li class="collection-item <%= $row_class %> <%= $link_class %>"
+ data-efa="<%= $efa %>"
+ data-station="<%= $dep->stop_id_num %>"
+ data-train="<%= $dep->id %>"
+ data-ts="<%= ($dep->sched_datetime // $dep->datetime)->epoch %>"
+ data-dest="<%= $dest->{name} %>">
+ % }
+ % else {
+ <li class="collection-item <%= $row_class %>">
+ % }
+ <a class="dep-time" href="#">
+ % if ($dep->is_cancelled) {
+ %= $dep->sched_datetime->strftime('%H:%M')
+ % }
+ % else {
+ %= $dep->datetime->strftime('%H:%M')
+ % }
+ % if ($dep->delay) {
+ %= sprintf('(%+d)', $dep->delay)
+ % }
+ </a>
+ <span class="connect-platform-wrapper">
+ % if ($dep->platform) {
+ <span>
+ % if (($dep->type // q{}) =~ m{ ast | bus | ruf }ix) {
+ Steig
+ % }
+ % else {
+ Gleis
+ % }
+ %= $dep->platform
+ </span>
+ % }
+ <span class="dep-line <%= ($dep->type // q{}) =~ tr{a-zA-Z_-}{}cdr %>">
+ %= $dep->line
+ </span>
+ </span>
+ <span class="dep-dest">
+ %= $dest->{name}
+ </span>
+ </li>
+ % }
+</ul>