Loading lib/Travelynx/Controller/Traveling.pm +2 −0 Original line number Diff line number Diff line Loading @@ -1582,6 +1582,7 @@ sub yearly_history { uid => $self->current_user->{id}, after => $interval_start, before => $interval_end, sort => 'asc', with_datetime => 1 ); Loading Loading @@ -1664,6 +1665,7 @@ sub monthly_history { uid => $self->current_user->{id}, after => $interval_start, before => $interval_end, sort => 'asc', with_datetime => 1 ); Loading lib/Travelynx/Model/Journeys.pm +6 −1 Original line number Diff line number Diff line Loading @@ -698,9 +698,14 @@ sub get { user_id => $uid, cancelled => 0 ); my $order_key = '-desc'; if ( $opt{sort} and $opt{sort} eq 'asc' ) { $order_key = '-asc'; } my %order = ( order_by => { -desc => 'real_dep_ts', $order_key => 'real_dep_ts', } ); Loading sass/src/common/local.scss +23 −8 Original line number Diff line number Diff line Loading @@ -163,6 +163,20 @@ ul.route-history > li { } // route icon bubble &.order-asc { i.material-icons { &[aria-label=von] { display: block; transform: rotate(90deg); height: 1rem; margin-top: 0.4rem; } &[aria-label=nach] { padding-top: 0.4rem; } } } &.order-desc { i.material-icons { &[aria-label=nach] { padding-top: 0.4rem; Loading @@ -174,6 +188,7 @@ ul.route-history > li { margin-top: 0.4rem; } } } // route line / "perlenschnur" &::before { Loading templates/_history_trains.html.ep +70 −35 Original line number Diff line number Diff line Loading @@ -27,10 +27,25 @@ </span> </a> <ul class="route-history"> <li> <ul class="route-history route-history-<%= stash('order') // q{} %>"> % if (stash('order') and stash('order') eq 'asc') { <li class="order-asc"> <i class="material-icons tiny" aria-label="von">play_circle_filled</i> <a href="<%= $detail_link %>" class="unmarked"> % if (param('cancelled')) { %= $travel->{sched_departure}->strftime('%H:%M') % } % else { <%= $travel->{rt_departure}->strftime('%H:%M') %> % if ($travel->{delay_dep} and int($travel->{delay_dep} / 60)) { (<%= sprintf('%+d', $travel->{delay_dep} / 60) %>) % } % } <strong><%= $travel->{from_name} %></strong> </a> </li> <li class="order-asc"> <i class="material-icons tiny" aria-label="nach">radio_button_unchecked</i> <a href="<%= $detail_link %>" class="unmarked"> % if (param('cancelled') and $travel->{sched_arrival}->epoch != 0) { %= $travel->{sched_arrival}->strftime('%H:%M') Loading @@ -48,10 +63,29 @@ <strong><%= $travel->{to_name} %></strong> </a> </li> <li> % } % else { <li class="order-desc"> <i class="material-icons tiny" aria-label="nach">radio_button_unchecked</i> <a href="<%= $detail_link %>" class="unmarked"> % 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) { <i class="material-icons">timer_off</i> % } else { %= $travel->{rt_arrival}->strftime('%H:%M'); % if ($travel->{delay_arr} and int($travel->{delay_arr} / 60)) { (<%= sprintf('%+d', $travel->{delay_arr} / 60) %>) % } % } % } <strong><%= $travel->{to_name} %></strong> </a> </li> <li class="order-desc"> <i class="material-icons tiny" aria-label="von">play_circle_filled</i> <a href="<%= $detail_link %>" class="unmarked"> % if (param('cancelled')) { %= $travel->{sched_departure}->strftime('%H:%M') Loading @@ -65,6 +99,7 @@ <strong><%= $travel->{from_name} %></strong> </a> </li> % } </ul> </li> % } Loading templates/history_by_month.html.ep +1 −1 Original line number Diff line number Diff line Loading @@ -11,5 +11,5 @@ </div> % if (stash('journeys')) { %= include '_history_trains', date_format => '%d.%m.', journeys => stash('journeys'); %= include '_history_trains', date_format => '%d.%m.', journeys => stash('journeys'), order => 'asc'; % } Loading
lib/Travelynx/Controller/Traveling.pm +2 −0 Original line number Diff line number Diff line Loading @@ -1582,6 +1582,7 @@ sub yearly_history { uid => $self->current_user->{id}, after => $interval_start, before => $interval_end, sort => 'asc', with_datetime => 1 ); Loading Loading @@ -1664,6 +1665,7 @@ sub monthly_history { uid => $self->current_user->{id}, after => $interval_start, before => $interval_end, sort => 'asc', with_datetime => 1 ); Loading
lib/Travelynx/Model/Journeys.pm +6 −1 Original line number Diff line number Diff line Loading @@ -698,9 +698,14 @@ sub get { user_id => $uid, cancelled => 0 ); my $order_key = '-desc'; if ( $opt{sort} and $opt{sort} eq 'asc' ) { $order_key = '-asc'; } my %order = ( order_by => { -desc => 'real_dep_ts', $order_key => 'real_dep_ts', } ); Loading
sass/src/common/local.scss +23 −8 Original line number Diff line number Diff line Loading @@ -163,6 +163,20 @@ ul.route-history > li { } // route icon bubble &.order-asc { i.material-icons { &[aria-label=von] { display: block; transform: rotate(90deg); height: 1rem; margin-top: 0.4rem; } &[aria-label=nach] { padding-top: 0.4rem; } } } &.order-desc { i.material-icons { &[aria-label=nach] { padding-top: 0.4rem; Loading @@ -174,6 +188,7 @@ ul.route-history > li { margin-top: 0.4rem; } } } // route line / "perlenschnur" &::before { Loading
templates/_history_trains.html.ep +70 −35 Original line number Diff line number Diff line Loading @@ -27,10 +27,25 @@ </span> </a> <ul class="route-history"> <li> <ul class="route-history route-history-<%= stash('order') // q{} %>"> % if (stash('order') and stash('order') eq 'asc') { <li class="order-asc"> <i class="material-icons tiny" aria-label="von">play_circle_filled</i> <a href="<%= $detail_link %>" class="unmarked"> % if (param('cancelled')) { %= $travel->{sched_departure}->strftime('%H:%M') % } % else { <%= $travel->{rt_departure}->strftime('%H:%M') %> % if ($travel->{delay_dep} and int($travel->{delay_dep} / 60)) { (<%= sprintf('%+d', $travel->{delay_dep} / 60) %>) % } % } <strong><%= $travel->{from_name} %></strong> </a> </li> <li class="order-asc"> <i class="material-icons tiny" aria-label="nach">radio_button_unchecked</i> <a href="<%= $detail_link %>" class="unmarked"> % if (param('cancelled') and $travel->{sched_arrival}->epoch != 0) { %= $travel->{sched_arrival}->strftime('%H:%M') Loading @@ -48,10 +63,29 @@ <strong><%= $travel->{to_name} %></strong> </a> </li> <li> % } % else { <li class="order-desc"> <i class="material-icons tiny" aria-label="nach">radio_button_unchecked</i> <a href="<%= $detail_link %>" class="unmarked"> % 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) { <i class="material-icons">timer_off</i> % } else { %= $travel->{rt_arrival}->strftime('%H:%M'); % if ($travel->{delay_arr} and int($travel->{delay_arr} / 60)) { (<%= sprintf('%+d', $travel->{delay_arr} / 60) %>) % } % } % } <strong><%= $travel->{to_name} %></strong> </a> </li> <li class="order-desc"> <i class="material-icons tiny" aria-label="von">play_circle_filled</i> <a href="<%= $detail_link %>" class="unmarked"> % if (param('cancelled')) { %= $travel->{sched_departure}->strftime('%H:%M') Loading @@ -65,6 +99,7 @@ <strong><%= $travel->{from_name} %></strong> </a> </li> % } </ul> </li> % } Loading
templates/history_by_month.html.ep +1 −1 Original line number Diff line number Diff line Loading @@ -11,5 +11,5 @@ </div> % if (stash('journeys')) { %= include '_history_trains', date_format => '%d.%m.', journeys => stash('journeys'); %= include '_history_trains', date_format => '%d.%m.', journeys => stash('journeys'), order => 'asc'; % }