journey template: $journey_visibility may be unset
This commit is contained in:
parent
becd6943f7
commit
d1a3176edf
1 changed files with 6 additions and 6 deletions
|
@ -38,13 +38,13 @@
|
||||||
% }
|
% }
|
||||||
am
|
am
|
||||||
<b><%= $journey->{sched_departure}->strftime('%d.%m.%Y') %></b>
|
<b><%= $journey->{sched_departure}->strftime('%d.%m.%Y') %></b>
|
||||||
% if ($journey_visibility) {
|
% if (my $v = stash('journey_visibility')) {
|
||||||
% if (stash('username')) {
|
% if (stash('username')) {
|
||||||
<i class="material-icons right"><%= visibility_icon($journey_visibility) %></i>
|
<i class="material-icons right"><%= visibility_icon($v) %></i>
|
||||||
% }
|
% }
|
||||||
% else {
|
% else {
|
||||||
<a class="right" href="/journey/visibility?id=<%= $journey->{id} %>">
|
<a class="right" href="/journey/visibility?id=<%= $journey->{id} %>">
|
||||||
<i class="material-icons"><%= visibility_icon($journey_visibility) %></i>
|
<i class="material-icons"><%= visibility_icon($v) %></i>
|
||||||
</a>
|
</a>
|
||||||
% }
|
% }
|
||||||
% }
|
% }
|
||||||
|
@ -130,8 +130,8 @@
|
||||||
<%= numify_skipped_stations($journey->{skip_route}) %><br/>
|
<%= numify_skipped_stations($journey->{skip_route}) %><br/>
|
||||||
% }
|
% }
|
||||||
% if ($journey->{km_route} > 0.1) {
|
% if ($journey->{km_route} > 0.1) {
|
||||||
ca. <%= sprintf('%.f', $journey->{km_route}) %> km
|
ca. <%= sprintf('%.1f', $journey->{km_route}) %> km
|
||||||
(Luftlinie: <%= sprintf('%.f', $journey->{km_beeline}) %> km)
|
(Luftlinie: <%= sprintf('%.1f', $journey->{km_beeline}) %> km)
|
||||||
% }
|
% }
|
||||||
% else {
|
% else {
|
||||||
?
|
?
|
||||||
|
@ -246,7 +246,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 m6 l6 center-align">
|
<div class="col s12 m6 l6 center-align">
|
||||||
<a class="btn waves-effect waves-light action-share"
|
<a class="btn waves-effect waves-light action-share"
|
||||||
% if ($journey_visibility eq 'public') {
|
% if (stash('journey_visibility') eq 'public') {
|
||||||
data-url="<%= url_for('public_journey', name => current_user()->{name}, id => $journey->{id} )->to_abs->scheme('https'); %>"
|
data-url="<%= url_for('public_journey', name => current_user()->{name}, id => $journey->{id} )->to_abs->scheme('https'); %>"
|
||||||
% }
|
% }
|
||||||
% else {
|
% else {
|
||||||
|
|
Loading…
Reference in a new issue