From 234486663dbe1712c10888121d9bf38c4cbd2cc8 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 21 Mar 2021 08:19:33 +0100 Subject: add preliminary support for station-independent train details --- templates/_train_details.html.ep | 31 +++++++++++++++++++------------ templates/train_details.html.ep | 2 +- 2 files changed, 20 insertions(+), 13 deletions(-) (limited to 'templates') diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 0aa3bba..9aa39ac 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -112,7 +112,12 @@
% if ($departure->{trip_id}) { - Karte +% if (stash('station_name')) { + Karte +% } +% else { + Karte +% } % } % if ($departure->{wr_link}) { Wagenreihung @@ -192,19 +197,21 @@ % } % } -
  • <%= $departure->{sched_departure} // $departure->{sched_arrival} // q{} %> -% if ($departure->{sched_departure}) { -% if ($departure->{departure} ne $departure->{sched_departure}) { - (heute <%= $departure->{departure} %>) +% if (stash('station_name')) { +
  • <%= $departure->{sched_departure} // $departure->{sched_arrival} // q{} %> +% if ($departure->{sched_departure}) { +% if ($departure->{departure} ne $departure->{sched_departure}) { + (heute <%= $departure->{departure} %>) +% } % } -% } -% elsif ($departure->{arrival}) { -% if ($departure->{arrival} ne $departure->{sched_arrival}) { - (heute <%= $departure->{arrival} %>) +% elsif ($departure->{arrival}) { +% if ($departure->{arrival} ne $departure->{sched_arrival}) { + (heute <%= $departure->{arrival} %>) +% } % } -% } - <%= $station_name %> -
  • + <%= stash('station_name') %> + +% } % for my $stop (@{$departure->{route_post_diff}}) {
  • +
    %= include '_train_details'
    -- cgit v1.2.3