From e91c540c8e5562f938dd329df43fcfc393599c12 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 10 Apr 2019 17:51:51 +0200 Subject: history: Show time next to station --- templates/_history_trains.html.ep | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) (limited to 'templates/_history_trains.html.ep') diff --git a/templates/_history_trains.html.ep b/templates/_history_trains.html.ep index 2044f7b..a105dff 100644 --- a/templates/_history_trains.html.ep +++ b/templates/_history_trains.html.ep @@ -4,9 +4,9 @@ Datum - Zeit Zug - Strecke + Von + Nach @@ -14,8 +14,25 @@ % if ($travel->{completed}) { % my $detail_link = '/journey/' . current_user()->{id} . '-' . $travel->{ids}->[1]; - <%= $travel->{sched_departure}->strftime('%d.%m.%Y') %> + <%= $travel->{sched_departure}->strftime('%d.%m.') %> + <%= $travel->{type} %> <%= $travel->{line} // '' %> <%= $travel->{no} %> + + + % if (param('cancelled')) { + %= $travel->{sched_departure}->strftime('%H:%M') + % } + % else { + <%= $travel->{rt_departure}->strftime('%H:%M') %> + % if ($travel->{sched_departure} != $travel->{rt_departure}) { + (<%= sprintf('%+d', ($travel->{rt_departure}->epoch - $travel->{sched_departure}->epoch) / 60) %>) + % } + % } +
+ <%= $travel->{from_name} %> +
+ + % if (param('cancelled') and $travel->{sched_arrival}->epoch != 0) { %= $travel->{sched_arrival}->strftime('%H:%M') % } @@ -30,18 +47,8 @@ % } % }
- % if (param('cancelled')) { - %= $travel->{sched_departure}->strftime('%H:%M') - % } - % else { - <%= $travel->{rt_departure}->strftime('%H:%M') %> - % if ($travel->{sched_departure} != $travel->{rt_departure}) { - (<%= sprintf('%+d', ($travel->{rt_departure}->epoch - $travel->{sched_departure}->epoch) / 60) %>) - % } - % } - -
<%= $travel->{type} %> <%= $travel->{line} // '' %> <%= $travel->{no} %> - <%= $travel->{from_name} %> → <%= $travel->{to_name} %> + <%= $travel->{to_name} %> + % } % } -- cgit v1.2.3