summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_train_details.html.ep31
-rw-r--r--templates/train_details.html.ep2
2 files changed, 20 insertions, 13 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index 0aa3bba..9aa39ac 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -112,7 +112,12 @@
</div> <!-- dataline -->
<div class="verbose">
% if ($departure->{trip_id}) {
- <a class="smallbutton" href="/map/<%= $departure->{trip_id} %>/<%= $departure->{train_line} // 0 %>?from=<%= $station_name %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
+% if (stash('station_name')) {
+ <a class="smallbutton" href="/map/<%= $departure->{trip_id} %>/<%= $departure->{train_line} // 0 %>?from=<%= stash('station_name') %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
+% }
+% else {
+ <a class="smallbutton" href="/map/<%= $departure->{trip_id} %>/<%= $departure->{train_line} // 0 %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
+% }
% }
% if ($departure->{wr_link}) {
<a class="smallbutton" href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>?e=<%= $departure->{direction} // '' %>"><i class="material-icons" aria-hidden="true">train</i> Wagenreihung
@@ -192,19 +197,21 @@
% }
</li>
% }
- <li class="<%= $departure->{is_cancelled} ? 'cancelled-stop' : q{} %>"><%= $departure->{sched_departure} // $departure->{sched_arrival} // q{} %>
-% if ($departure->{sched_departure}) {
-% if ($departure->{departure} ne $departure->{sched_departure}) {
- (heute <%= $departure->{departure} %>)
+% if (stash('station_name')) {
+ <li class="<%= $departure->{is_cancelled} ? 'cancelled-stop' : q{} %>"><%= $departure->{sched_departure} // $departure->{sched_arrival} // q{} %>
+% if ($departure->{sched_departure}) {
+% if ($departure->{departure} ne $departure->{sched_departure}) {
+ (heute <%= $departure->{departure} %>)
+% }
% }
-% }
-% elsif ($departure->{arrival}) {
-% if ($departure->{arrival} ne $departure->{sched_arrival}) {
- (heute <%= $departure->{arrival} %>)
+% elsif ($departure->{arrival}) {
+% if ($departure->{arrival} ne $departure->{sched_arrival}) {
+ (heute <%= $departure->{arrival} %>)
+% }
% }
-% }
- <strong><%= $station_name %></strong>
- </li>
+ <strong><%= stash('station_name') %></strong>
+ </li>
+% }
% for my $stop (@{$departure->{route_post_diff}}) {
<li>
<a href="<%= url_for('station', station => $stop->{name})->query({detailed => param('detailed')}) %>" class="
diff --git a/templates/train_details.html.ep b/templates/train_details.html.ep
index 08058a9..7d5ea90 100644
--- a/templates/train_details.html.ep
+++ b/templates/train_details.html.ep
@@ -1,4 +1,4 @@
-<div class="app" data-station="<%= $station_name %>">
+<div class="app" data-station="<%= stash('station_name') // q{} %>">
<div class="moreinfo" data-static="1">
%= include '_train_details'
</div>