From de074342de0bdc3604a0610a0c5f9cce5338bb85 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sun, 24 Sep 2023 18:19:17 +0200 Subject: add support for HAFAS connection suggestions; drop manual destination list Still TODO: handle stations that have several EVAs --- templates/_connections_hafas.html.ep | 59 ++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 templates/_connections_hafas.html.ep (limited to 'templates/_connections_hafas.html.ep') diff --git a/templates/_connections_hafas.html.ep b/templates/_connections_hafas.html.ep new file mode 100644 index 0000000..9322116 --- /dev/null +++ b/templates/_connections_hafas.html.ep @@ -0,0 +1,59 @@ +
+ % for my $res (@{$connections}) { + % my ($train, $via, $via_arr) = @{$res}; + % $via_arr = $via_arr ? $via_arr->strftime('%H:%M') : q{}; + % my $td_class = ''; + % my $link_class = 'action-checkin'; + % if ($train->is_cancelled) { + % $td_class = 'cancelled'; + % $link_class = 'action-cancelled-from'; + % } + % if ($checkin_from) { + + % } + % else { + + % } + + + + + % } +
+ % if ($train->platform) { + % if ($checkin_from) { + Gleis <%= $train->platform %> + % } + % else { + Gleis <%= $train->platform %> + % } +
+ % } + % if ($checkin_from) { + <%= $train->line %> + % } + % else { + %= $train->line + % } +
+ % if ($checkin_from) { + <%= $via->{name} %> + % } + % else { + %= $via->{name} + % } + + % if ($train->is_cancelled) { + %= $train->sched_datetime->strftime('%H:%M') + ⊖ + % } + % else { + %= $train->datetime->strftime('%H:%M') + % } + % if ($via_arr) { + → <%= $via_arr %> + % } + % if ($train->delay) { + %= sprintf('(%+d)', $train->delay) + % } +
-- cgit v1.2.3