summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.pl2
-rw-r--r--templates/clean.html.ep42
2 files changed, 39 insertions, 5 deletions
diff --git a/index.pl b/index.pl
index 1197fc5..30c8221 100644
--- a/index.pl
+++ b/index.pl
@@ -560,6 +560,8 @@ sub handle_request {
canceled_stops => [],
replaced_by => [],
replacement_for => [],
+ route_timetable => [ $result->route_timetable ],
+ route_info => $result->route_info,
}
);
}
diff --git a/templates/clean.html.ep b/templates/clean.html.ep
index 9b36f45..a05cc08 100644
--- a/templates/clean.html.ep
+++ b/templates/clean.html.ep
@@ -51,13 +51,17 @@
% }
<div class="moreinfo">
<div class="mheader">
- <span class="train-line"><%= $departure->{train_type} // q{???} %></span><!--
- --><span class="train-line"><%= $departure->{train_line} // q{} %></span>
-% if ($departure->{train_line}) {
- <span class="train-no"><%= $departure->{train_no} // q{???} %></span>
+% if ($departure->{train_no} or $departure->{line_no}) {
+ <span class="train-line"><%= $departure->{train_type} // q{???} %></span>
+% if ($departure->{train_line}) {
+ <span class="train-no"><%= $departure->{train_no} // q{???} %></span>
+% }
+% else {
+ <span class="train-line"><%= $departure->{train_no} // q{???} %></span>
+% }
% }
% else {
- <span class="train-line"><%= $departure->{train_no} // q{???} %></span>
+ <span class="train-line"><%= $departure->{train} // q{???} %></span>
% }
% if ($departure->{origin}) {
:
@@ -88,6 +92,12 @@
% }
<br/>
% }
+% if (not ($departure->{sched_arrival} or $departure->{sched_departure})) {
+ Abfahrt: <%= $departure->{time} %>
+% if ($departure->{delay}) {
+ (heute +<%= $departure->{delay} %>)
+% }
+% }
</div> <!-- timeinfo -->
% }
% if ($departure->{route_post_diff} and @{$departure->{route_post_diff}}) {
@@ -113,6 +123,25 @@
% }
</div> <!-- mroute -->
% }
+% elsif ($departure->{route_timetable}) {
+ <div class="mroute">
+ Über:
+% my $first = 0;
+% for my $stop (@{$departure->{route_timetable}}) {
+% my ($time, $name) = @{$stop};
+% if ($first++) {
+ <span class="separator">–</span>
+% }
+ <span class="generic-stop"><%= $time %></span>
+% if ($self->is_important($name)) {
+ <span class="important-stop"><%= $name %></span>
+% }
+% else {
+ <span class="generic-stop"><%= $name %></span>
+% }
+% }
+ </div> <!-- mroute -->
+% }
% if ($departure->{moreinfo} and @{$departure->{moreinfo}}) {
Meldungen:
<ul>
@@ -136,6 +165,9 @@
</span>
</li>
% }
+% if ($departure->{route_info}) {
+ <li><%= $departure->{route_info} %></li>
+% }
</ul>
% }
</div> <!-- moreinfo -->