summaryrefslogtreecommitdiff
path: root/templates/app.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-01-16 20:32:32 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-01-16 20:32:32 +0100
commitf9ef51bdb6f6e2de74f699442f748db5c565d1f3 (patch)
tree1dca0cd885b607f6123ca49656eccb804b391fdd /templates/app.html.ep
parent14966d5a6e71d7394fa05b4cf722a5b1512c547a (diff)
show previous route as well
Diffstat (limited to 'templates/app.html.ep')
-rw-r--r--templates/app.html.ep69
1 files changed, 48 insertions, 21 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep
index 5c511ce..b2dd257 100644
--- a/templates/app.html.ep
+++ b/templates/app.html.ep
@@ -158,29 +158,56 @@
% }
% if ($departure->{route_post_diff} and @{$departure->{route_post_diff}}) {
- <div class="mroute">
- Über:
-% my $first = 0;
-% for my $stop (@{$departure->{route_post_diff} // q{???}}) {
-% if ($first++) {
- <span class="separator">–</span>
+% if (@{$departure->{route_pre_diff}}) {
+ <div class="mroute">
+ Von:
+% my $first = 0;
+% for my $stop (@{$departure->{route_pre_diff}}) {
+% if ($first++) {
+ <span class="separator">–</span>
+% }
+ <a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class="
+% if ($stop->{isAdditional}) {
+ additional-stop
+% }
+% elsif ($stop->{isCancelled}) {
+ cancelled-stop
+% }
+% elsif ($self->is_important($stop->{name})) {
+ important-stop
+% }
+% else {
+ generic-stop
+% }
+ "><%= $stop->{name} %></a>
% }
- <a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class="
-% if ($stop->{isAdditional}) {
- additional-stop
-% }
-% elsif ($stop->{isCancelled}) {
- cancelled-stop
-% }
-% elsif ($self->is_important($stop->{name})) {
- important-stop
-% }
-% else {
- generic-stop
+ </div> <!-- mroute -->
+% }
+% if (@{$departure->{route_post_diff}}) {
+ <div class="mroute">
+ Nach:
+% my $first = 0;
+% for my $stop (@{$departure->{route_post_diff}}) {
+% if ($first++) {
+ <span class="separator">–</span>
+% }
+ <a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class="
+% if ($stop->{isAdditional}) {
+ additional-stop
+% }
+% elsif ($stop->{isCancelled}) {
+ cancelled-stop
+% }
+% elsif ($self->is_important($stop->{name})) {
+ important-stop
+% }
+% else {
+ generic-stop
+% }
+ "><%= $stop->{name} %></a>
% }
- "><%= $stop->{name} %></a>
-% }
- </div> <!-- mroute -->
+ </div> <!-- mroute -->
+% }
% }
% if ($departure->{moreinfo} and @{$departure->{moreinfo}}) {
Meldungen: