mirror of
https://github.com/derf/travelynx
synced 2024-11-10 23:14:16 +00:00
departures: show orientation bar dividing past from future
This commit is contained in:
parent
fc9595e99c
commit
1d589fa0b7
1 changed files with 14 additions and 0 deletions
|
@ -58,6 +58,8 @@
|
||||||
</p>
|
</p>
|
||||||
<table class="striped">
|
<table class="striped">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
% my $orientation_bar_shown = param('train');
|
||||||
|
% my $now_epoch = now()->epoch;
|
||||||
% for my $result (@{$results}) {
|
% for my $result (@{$results}) {
|
||||||
% my $td_class = '';
|
% my $td_class = '';
|
||||||
% my $link_class = 'action-checkin';
|
% my $link_class = 'action-checkin';
|
||||||
|
@ -65,6 +67,18 @@
|
||||||
% $td_class = "cancelled";
|
% $td_class = "cancelled";
|
||||||
% $link_class = 'action-cancelled-from';
|
% $link_class = 'action-cancelled-from';
|
||||||
% }
|
% }
|
||||||
|
% if (not $orientation_bar_shown and $result->departure->epoch < $now_epoch) {
|
||||||
|
% $orientation_bar_shown = 1;
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
— Anfragezeitpunkt —
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
% }
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class="<%= $link_class %>" data-station="<%= $result->station_uic %>" data-train="<%= $result->train_id %>">
|
<a class="<%= $link_class %>" data-station="<%= $result->station_uic %>" data-train="<%= $result->train_id %>">
|
||||||
|
|
Loading…
Reference in a new issue