summaryrefslogtreecommitdiff
path: root/templates/_connections_efa.html.ep
diff options
context:
space:
mode:
Diffstat (limited to 'templates/_connections_efa.html.ep')
-rw-r--r--templates/_connections_efa.html.ep56
1 files changed, 56 insertions, 0 deletions
diff --git a/templates/_connections_efa.html.ep b/templates/_connections_efa.html.ep
new file mode 100644
index 0000000..4800adb
--- /dev/null
+++ b/templates/_connections_efa.html.ep
@@ -0,0 +1,56 @@
+<ul class="collection departures connections">
+ % for my $res (@{$suggestions}) {
+ % my ($dep, $dest, $via_arr) = @{$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->{ts} %>"
+ data-dest="<%= $dest->{name} %>">
+ % }
+ % else {
+ <li class="collection-item <%= $row_class %>">
+ % }
+ <a class="dep-time" href="#">
+ % if ($dep->{is_cancelled}) {
+ %= $dep->{sched_hhmm}
+ % }
+ % else {
+ %= $dep->{rt_hhmm}
+ % }
+ % if ($via_arr) {
+ → <%= $via_arr %>
+ % }
+ % 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>