summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-04-02 20:21:06 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-04-02 20:21:06 +0200
commit7b97f0a8734ff99481560e065863a646d46c65ea (patch)
treeb163780deb5bad382859543d85a7ed6003584261 /templates
parent6978a4932554564c6d28673e1e38414d2fbdaf6a (diff)
train details: map link: set line to 0 if it is an empty string
Diffstat (limited to 'templates')
-rw-r--r--templates/_train_details.html.ep4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index 3432c30..5c58e63 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -144,10 +144,10 @@
<div class="verbose">
% if ($departure->{trip_id}) {
% if (stash('station_name')) {
- <a class="smallbutton" href="/map/<%= $departure->{trip_id} =~ s{#}{%23}gr %>/<%= $departure->{train_line} // 0 %>?from=<%= stash('station_name') %>&amp;hafas=<%= param('hafas') // q{} %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
+ <a class="smallbutton" href="/map/<%= $departure->{trip_id} =~ s{#}{%23}gr %>/<%= $departure->{train_line} || 0 %>?from=<%= stash('station_name') %>&amp;hafas=<%= param('hafas') // q{} %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
% }
% else {
- <a class="smallbutton" href="/map/<%= $departure->{trip_id} =~ s{#}{%23}gr %>/<%= $departure->{train_line} // 0 %>?hafas=<%= param('hafas') // q{} %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
+ <a class="smallbutton" href="/map/<%= $departure->{trip_id} =~ s{#}{%23}gr %>/<%= $departure->{train_line} || 0 %>?hafas=<%= param('hafas') // q{} %>"><i class="material-icons" aria-hidden="true">map</i> Karte</a>
% }
% }
% if ($departure->{wr_link}) {