summaryrefslogtreecommitdiff
path: root/templates/clean.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-12-05 22:17:17 +0100
committerDaniel Friesel <derf@finalrewind.org>2014-12-05 22:17:17 +0100
commit88da26860bdbfea46b29ef83becb814edb92d10a (patch)
tree6299945e62ec71a9e4b39b6a9231fd5f704b6268 /templates/clean.html.ep
parentd8740e1bbab42e98a5d6dabc18254c9c60ada407 (diff)
clean template: show route in moreinfo when it is overwritten by info
Diffstat (limited to 'templates/clean.html.ep')
-rw-r--r--templates/clean.html.ep17
1 files changed, 11 insertions, 6 deletions
diff --git a/templates/clean.html.ep b/templates/clean.html.ep
index 86a3d03..215f098 100644
--- a/templates/clean.html.ep
+++ b/templates/clean.html.ep
@@ -5,6 +5,13 @@
% my $i = 0;
% for my $departure (@{$departures}) {
% $i++;
+% my $route_str = q{};
+% my $via_max = @{$departure->{via}};
+% my $via_cur = 0;
+% for my $stop (@{$departure->{via}}) {
+% $via_cur++;
+% $route_str .= $stop . ($via_cur < $via_max ? ' - ' : q{});
+% }
<li>
% my $linetype = q{};
@@ -17,6 +24,9 @@
% if ($departure->{moreinfo} and @{$departure->{moreinfo}}) {
<span class="moreinfo">
<ul>
+% if ($route_str) {
+<li> Via: <%= $route_str %> </li>
+% }
% for my $pair (@{$departure->{moreinfo}}) {
<li>
% if ($pair->[0]->isa('DateTime')) {
@@ -41,12 +51,7 @@
% }
% else {
<span class="route">
-% my $via_max = @{$departure->{via}};
-% my $via_cur = 0;
-% for my $stop (@{$departure->{via}}) {
-% $via_cur++;
-<%= $stop %><% if ($via_cur < $via_max) { %> - <% } %>
-% }
+%= $route_str
</span>
% }
% my $extraclasses = q{};