diff options
author | Daniel Friesel <derf@finalrewind.org> | 2023-02-28 19:45:27 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2023-02-28 19:45:27 +0100 |
commit | ba483a9daf2a9192acfcbe04f6c3c84eb87ec1a5 (patch) | |
tree | c8202c90452d774b62cfa0dc210dba1ed4b6e369 /templates | |
parent | d58c5a8826d2abf64c923ba4635510423a196eaa (diff) |
journey: add token to share link if non-public
Diffstat (limited to 'templates')
-rw-r--r-- | templates/journey.html.ep | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/journey.html.ep b/templates/journey.html.ep index 74c032b..87ce0db 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -246,7 +246,12 @@ </div> <div class="col s12 m6 l6 center-align"> <a class="btn waves-effect waves-light action-share" - data-url="<%= url_for('public_journey', name => current_user()->{name}, id => $journey->{id} )->to_abs->scheme('https'); %>" + % if ($journey_visibility eq 'public') { + data-url="<%= url_for('public_journey', name => current_user()->{name}, id => $journey->{id} )->to_abs->scheme('https'); %>" + % } + % else { + data-url="<%= url_for('public_journey', name => current_user()->{name}, id => $journey->{id} )->to_abs->scheme('https'); %>?token=<%= $journey->{from_eva} %>-<%= $journey->{checkin_ts} %>-<%= $journey->{sched_dep_ts} %>" + % } data-text="<%= stash('share_text') %>" > <i class="material-icons left" aria-hidden="true">share</i> Teilen |