summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-12-14 08:52:44 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-12-14 08:52:44 +0100
commit1d589fa0b785de6116b92895ab8fcc9a2f1eaf24 (patch)
treee0220729f4ecaeace7c963fe8a81324c482ec153 /templates
parentfc9595e99cbff8cb3297ab36033fa918bb7eda2b (diff)
departures: show orientation bar dividing past from future
Diffstat (limited to 'templates')
-rw-r--r--templates/departures.html.ep14
1 files changed, 14 insertions, 0 deletions
diff --git a/templates/departures.html.ep b/templates/departures.html.ep
index 41e71f0..e71fa25 100644
--- a/templates/departures.html.ep
+++ b/templates/departures.html.ep
@@ -58,6 +58,8 @@
</p>
<table class="striped">
<tbody>
+ % my $orientation_bar_shown = param('train');
+ % my $now_epoch = now()->epoch;
% for my $result (@{$results}) {
% my $td_class = '';
% my $link_class = 'action-checkin';
@@ -65,6 +67,18 @@
% $td_class = "cancelled";
% $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>
<td>
<a class="<%= $link_class %>" data-station="<%= $result->station_uic %>" data-train="<%= $result->train_id %>">