summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.pl17
-rw-r--r--public/default.css4
-rw-r--r--templates/clean.html.ep12
3 files changed, 22 insertions, 11 deletions
diff --git a/index.pl b/index.pl
index 46a9c66..b1c61dd 100644
--- a/index.pl
+++ b/index.pl
@@ -116,7 +116,7 @@ helper 'json_route_diff' => sub {
push(
@json_route,
{
- name => $route[ $route_idx ],
+ name => $route[$route_idx],
isAdditional => 1,
isCancelled => 0
}
@@ -127,7 +127,7 @@ helper 'json_route_diff' => sub {
push(
@json_route,
{
- name => $sched_route[ $sched_idx ],
+ name => $sched_route[$sched_idx],
isAdditional => 0,
isCancelled => 1
}
@@ -497,12 +497,13 @@ sub handle_request {
[ $result->sched_route_post ]
)
],
- destination => $result->destination,
- origin => $result->origin,
- platform => $platform,
- info => $info,
- is_cancelled => $result->is_cancelled,
- messages => {
+ destination => $result->destination,
+ origin => $result->origin,
+ platform => $platform,
+ scheduled_platform => $result->sched_platform,
+ info => $info,
+ is_cancelled => $result->is_cancelled,
+ messages => {
delay => [
map { { timestamp => $_->[0], text => $_->[1] } }
$result->delay_messages
diff --git a/public/default.css b/public/default.css
index 68706db..74c6bae 100644
--- a/public/default.css
+++ b/public/default.css
@@ -238,6 +238,10 @@ div.displayclean li .countdown .platform {
font-weight: bold;
}
+div.displayclean li .countdown .changed-platform {
+ color:#ff0000;
+}
+
div.displayclean li .time {
color:#000000;
font-size:2.4em;
diff --git a/templates/clean.html.ep b/templates/clean.html.ep
index 61ee6d6..2eb63ea 100644
--- a/templates/clean.html.ep
+++ b/templates/clean.html.ep
@@ -71,7 +71,7 @@
% elsif (defined $departure->{delay} and $departure->{delay} > 0) {
<div class="minfo">+<%= $departure->{delay} %></div>
% }
- </div>
+ </div> <!-- mheader -->
% if (not $departure->{is_cancelled}) {
<div class="timeinfo">
% if ($departure->{sched_arrival}) {
@@ -138,7 +138,7 @@
% }
</ul>
% }
- </span>
+ </span> <!-- moreinfo -->
% if ($departure->{info} and length $departure->{info}) {
<span class="info">
%= $departure->{info}
@@ -171,7 +171,13 @@
% }
% }
% }
- <span class="platform <%= $extraclasses %>">
+% if ($departure->{scheduled_platform} and $departure->{platform} and
+% $departure->{scheduled_platform} ne $departure->{platform}) {
+ <span class="platform changed-platform">
+% }
+% else {
+ <span class="platform">
+% }
%= $departure->{platform}
</span>
</span>