From d1a3176edf4872c05a137a77ca1adb4034ff1b8e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 1 Mar 2023 17:51:43 +0100 Subject: journey template: $journey_visibility may be unset --- templates/journey.html.ep | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'templates') diff --git a/templates/journey.html.ep b/templates/journey.html.ep index 87ce0db..9d62daa 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -38,13 +38,13 @@ % } am <%= $journey->{sched_departure}->strftime('%d.%m.%Y') %> - % if ($journey_visibility) { + % if (my $v = stash('journey_visibility')) { % if (stash('username')) { - <%= visibility_icon($journey_visibility) %> + <%= visibility_icon($v) %> % } % else { - <%= visibility_icon($journey_visibility) %> + <%= visibility_icon($v) %> % } % } @@ -130,8 +130,8 @@ <%= numify_skipped_stations($journey->{skip_route}) %>
% } % if ($journey->{km_route} > 0.1) { - ca. <%= sprintf('%.f', $journey->{km_route}) %> km - (Luftlinie: <%= sprintf('%.f', $journey->{km_beeline}) %> km) + ca. <%= sprintf('%.1f', $journey->{km_route}) %> km + (Luftlinie: <%= sprintf('%.1f', $journey->{km_beeline}) %> km) % } % else { ? @@ -246,7 +246,7 @@