summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2023-09-02 12:03:19 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2023-09-02 12:03:19 +0200
commit7a9ce677f333bb0aa0d3a2cd4708aa9ec671c22b (patch)
treec23d6fac881e48c3c9549bef6418a6972218e88a
parent18c919fe959905141924a5f0b49865e59f2453ff (diff)
train details: re-add replacement / replaced info
-rw-r--r--templates/_train_details.html.ep32
1 files changed, 10 insertions, 22 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index 039a0b4..2ed3dd4 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -17,28 +17,6 @@
% }
<span class="train-dest"><%= $departure->{destination} // q{???} %></span>
</div>
-<!--
-% if ($departure->{is_cancelled}) {
- <div class="minfo">Fahrt fällt aus</div>
-% }
-% elsif (defined $departure->{delay} and $departure->{delay} > 0) {
- <div class="minfo">+<%= $departure->{delay} %>
-% if ($departure->{departure_is_cancelled}) {
- (endet hier)
-% }
- </div>
-% }
-% if (@{$departure->{replaced_by}}) {
-% for my $replacement (@{$departure->{replaced_by}}) {
- <span class="replaced">Ersatzzug: <%= $replacement %></span>
-% }
-% }
-% if (@{$departure->{replacement_for}}) {
-% for my $replacement (@{$departure->{replacement_for}}) {
- <span class="replacement">Ersatzzug für <%= $replacement %></span>
-% }
-% }
--->
</div> <!-- mheader -->
<div class="mfooter">
<div class="dataline">
@@ -74,6 +52,16 @@
</div>
<div>
<div class="platform">
+% if (@{$departure->{replaced_by}}) {
+% for my $replacement (@{$departure->{replaced_by}}) {
+ <span class="replaced">Ersatzfahrt: <a href="/z/<%= $replacement %>/<%= stash('station_name') // q{} %>"><%= $replacement %></a></span><br/>
+% }
+% }
+% if (@{$departure->{replacement_for}}) {
+% for my $replacement (@{$departure->{replacement_for}}) {
+ <span class="replacement">Ersatzfahrt für <a href="/z/<%= $replacement %>/<%= stash('station_name') // q{} %>"><%= $replacement %></a></span><br/>
+% }
+% }
% if ($departure->{arrival_is_cancelled} and $departure->{departure_is_cancelled}) {
<span class="minfo">Fahrt fällt aus</span>
% }