summaryrefslogtreecommitdiff
path: root/templates/_history_trains.html.ep
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-01-31 17:36:13 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-01-31 17:36:13 +0100
commit150740f282b1ddbafd53799c281c7922d2d6ace1 (patch)
treefcfe4ad9a061aaa269d6784e775510b2d801cceb /templates/_history_trains.html.ep
parent558f158d0a90312c1ed7be9951331a49b8725050 (diff)
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.
Diffstat (limited to 'templates/_history_trains.html.ep')
-rw-r--r--templates/_history_trains.html.ep28
1 files changed, 14 insertions, 14 deletions
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 @@
</span>
</a>
- <a href="<%= $detail_link %>" class="unmarked origin">
- <i class="material-icons tiny" aria-label="von">radio_button_unchecked</i>
- % 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) %>)
- % }
- % }
- <strong><%= $travel->{from_name} %></strong>
- </a>
-
<a href="<%= $detail_link %>" class="unmarked destination">
<i class="material-icons tiny" aria-label="nach">place</i>
% if (param('cancelled') and $travel->{sched_arrival}->epoch != 0) {
@@ -51,6 +37,20 @@
% }
% }
<strong><%= $travel->{to_name} %></strong>
+
+ <a href="<%= $detail_link %>" class="unmarked origin">
+ <i class="material-icons tiny" aria-label="von">radio_button_unchecked</i>
+ % 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) %>)
+ % }
+ % }
+ <strong><%= $travel->{from_name} %></strong>
+ </a>
</a>
</li>
% }