summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-05-09 17:01:50 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-05-09 17:01:50 +0200
commit03461898e27f0644c78ed973a6cccb0a54b9664e (patch)
tree81f9c7cd29df6f25a4cc6d9373e1636cb9ec24d6
parent1823c4f669b0faace79bbb3af4fc57e7d5d166ef (diff)
ris backend: add train_type information
-rw-r--r--index.pl1
-rw-r--r--templates/clean.html.ep4
2 files changed, 4 insertions, 1 deletions
diff --git a/index.pl b/index.pl
index 6532efd..1e709a2 100644
--- a/index.pl
+++ b/index.pl
@@ -481,6 +481,7 @@ sub handle_request {
{
time => $time,
train => $result->train,
+ train_type => $result->type,
via => [ $result->route_interesting(3) ],
destination => $result->destination,
platform => $platform,
diff --git a/templates/clean.html.ep b/templates/clean.html.ep
index 69f954f..bc1fc7c 100644
--- a/templates/clean.html.ep
+++ b/templates/clean.html.ep
@@ -45,8 +45,10 @@
% else {
<span class="train-line"><%= $departure->{train_no} // q{???} %></span>
% }
+% if ($departure->{origin}) {
:
-<span class="train-origin"><%= $departure->{origin} // q{???} %></span>
+<span class="train-origin"><%= $departure->{origin} %></span>
+% }
<span class="train-dest"><%= $departure->{destination} // q{???} %></span>
% if ($departure->{is_cancelled}) {