summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-07-07 08:10:05 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-07-07 08:10:05 +0200
commit8e5a8fad931052cc50f3f0ec404b480a8e7fcd18 (patch)
tree2725b6962ba5b6aa83e674f2925d9a763de1b372 /templates
parent29958c19683f81f30c9be5be45308eff2c4105e7 (diff)
indicate whether a connecting train is cancelled or not1.8.2
Diffstat (limited to 'templates')
-rw-r--r--templates/_connections.html.ep14
1 files changed, 10 insertions, 4 deletions
diff --git a/templates/_connections.html.ep b/templates/_connections.html.ep
index 2506829..cd9edc3 100644
--- a/templates/_connections.html.ep
+++ b/templates/_connections.html.ep
@@ -29,18 +29,24 @@
<div class="hide-on-small-only"><table class="striped"><tbody>
% for my $res (@{$connections}) {
% my ($train, $via) = @{$res};
+ % my $td_class = '';
+ % my $link_class = 'action-checkin';
+ % if ($train->departure_is_cancelled) {
+ % $td_class = 'cancelled';
+ % $link_class = 'action-cancelled-from';
+ % }
<tr>
- <td>
+ <td class="<%= $td_class %>">
% if ($checkin_from) {
- <a class="action-checkin" data-station="<%= $checkin_from %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $train->line %></a>
+ <a class="<%= $link_class %>" data-station="<%= $checkin_from %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $train->line %></a>
% }
% else {
%= $train->line
% }
</td>
- <td>
+ <td class="<%= $td_class %>">
% if ($checkin_from) {
- <a class="action-checkin" data-station="<%= $checkin_from %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $via %></a>
+ <a class="<%= $link_class %>" data-station="<%= $checkin_from %>" data-train="<%= $train->train_id %>" data-dest="<%= $via %>"><%= $via %></a>
% }
% else {
%= $via