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.
This commit is contained in:
Birte Kristina Friesel 2024-01-31 17:36:13 +01:00
parent 558f158d0a
commit 150740f282
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA
2 changed files with 16 additions and 16 deletions

View file

@ -122,14 +122,14 @@ ul.suggestions {
font-weight: 600; font-weight: 600;
} }
} }
.destination::before { .origin::before {
content: ' '; content: ' ';
display: block; display: block;
border-left: 2px dotted $off-black; border-left: 2px dotted $off-black;
height: 1rem; height: 1rem;
position: absolute; position: absolute;
margin-left: calc( 0.5rem - 1px ); margin-left: calc( 0.5rem - 1px );
margin-top: -0.5rem; margin-top: -0.75rem;
} }
&.history-date-change { &.history-date-change {
display: block; display: block;

View file

@ -21,20 +21,6 @@
</span> </span>
</a> </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"> <a href="<%= $detail_link %>" class="unmarked destination">
<i class="material-icons tiny" aria-label="nach">place</i> <i class="material-icons tiny" aria-label="nach">place</i>
% if (param('cancelled') and $travel->{sched_arrival}->epoch != 0) { % if (param('cancelled') and $travel->{sched_arrival}->epoch != 0) {
@ -51,6 +37,20 @@
% } % }
% } % }
<strong><%= $travel->{to_name} %></strong> <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> </a>
</li> </li>
% } % }