From 79d216976dea59e4d283ac81d65f167b3bb05329 Mon Sep 17 00:00:00 2001 From: Cassidy Dingenskirchen Date: Mon, 22 Jan 2024 19:56:46 +0100 Subject: new history design (cherry picked from commit 8b3ff460b5845c4ec86466715fc054705b635c20) Signed-off-by: Birte Kristina Friesel --- templates/_history_trains.html.ep | 108 ++++++++++++++++++-------------------- templates/landingpage.html.ep | 2 +- 2 files changed, 53 insertions(+), 57 deletions(-) (limited to 'templates') diff --git a/templates/_history_trains.html.ep b/templates/_history_trains.html.ep index 51f776c..be35a72 100644 --- a/templates/_history_trains.html.ep +++ b/templates/_history_trains.html.ep @@ -1,63 +1,59 @@
- - - - - - - - - - - % for my $travel (@{$journeys}) { - % my $detail_link = '/journey/' . $travel->{id}; - % if (my $prefix = stash('link_prefix')) { - % $detail_link = $prefix . $travel->{id}; + - - - - - + % } % } - -
DatumFahrtVonNach
<%= $travel->{sched_departure}->strftime($date_format) %> - - <%= $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') - % } - % else { - % if ($travel->{rt_arrival}->epoch == 0 and $travel->{sched_arrival}->epoch == 0) { - timer_off - % } else { - %= $travel->{rt_arrival}->strftime('%H:%M'); - % if ($travel->{sched_arrival} != $travel->{rt_arrival}) { - (<%= sprintf('%+d', ($travel->{rt_arrival}->epoch - $travel->{sched_arrival}->epoch) / 60) %>) - % } - % } + % } + <%= $travel->{from_name} %> + + + + place + % if (param('cancelled') and $travel->{sched_arrival}->epoch != 0) { + %= $travel->{sched_arrival}->strftime('%H:%M') + % } + % else { + % if ($travel->{rt_arrival}->epoch == 0 and $travel->{sched_arrival}->epoch == 0) { + timer_off + % } else { + %= $travel->{rt_arrival}->strftime('%H:%M'); + % if ($travel->{sched_arrival} != $travel->{rt_arrival}) { + (<%= sprintf('%+d', ($travel->{rt_arrival}->epoch - $travel->{sched_arrival}->epoch) / 60) %>) % } -
- <%= $travel->{to_name} %> -
+ <%= $travel->{to_name} %> + + + % } +
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep index b42777d..45bfb21 100644 --- a/templates/landingpage.html.ep +++ b/templates/landingpage.html.ep @@ -76,7 +76,7 @@

Letzte Fahrten

- %= include '_history_trains', date_format => '%d.%m', journeys => [journeys->get(uid => current_user->{id}, limit => 5, with_datetime => 1)]; + %= include '_history_trains', date_format => '%d.%m.%Y', journeys => [journeys->get(uid => current_user->{id}, limit => 5, with_datetime => 1)]; % } % else {
-- cgit v1.2.3