From 150740f282b1ddbafd53799c281c7922d2d6ace1 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 31 Jan 2024 17:36:13 +0100 Subject: history: show destination in first line, origin in second This way, consecutive history entries have matching origin/destination pairs, and both the outer list and the inner origin/destination pair are sorted by descending date. --- templates/_history_trains.html.ep | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'templates/_history_trains.html.ep') diff --git a/templates/_history_trains.html.ep b/templates/_history_trains.html.ep index be35a72..9af5490 100644 --- a/templates/_history_trains.html.ep +++ b/templates/_history_trains.html.ep @@ -21,20 +21,6 @@ - - radio_button_unchecked - % 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} %> - - place % if (param('cancelled') and $travel->{sched_arrival}->epoch != 0) { @@ -51,6 +37,20 @@ % } % } <%= $travel->{to_name} %> + + + radio_button_unchecked + % 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} %> + % } -- cgit v1.2.3