diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-02-19 20:58:38 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-02-19 20:58:38 +0100 |
commit | 57f686b688d1ae09a3ab6fe6b54ba3c7c18c16a6 (patch) | |
tree | 1b582a989e9e8904a68bc1ca412652dc870e542e /templates/journey.html.ep | |
parent | 2652ea6bab56e40169334800f4b9c5a11c3ef601 (diff) |
allow showing past journeys on shared status page
Diffstat (limited to 'templates/journey.html.ep')
-rw-r--r-- | templates/journey.html.ep | 78 |
1 files changed, 40 insertions, 38 deletions
diff --git a/templates/journey.html.ep b/templates/journey.html.ep index ae8f750..bd22edc 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -223,44 +223,46 @@ </table> </div> </div> - <div class="row hide-on-small-only"> - <div class="col s12 m6 l6 center-align"> - <a class="waves-effect waves-light red btn action-delete" - data-id="<%= $journey->{id} %>" - data-checkin="<%= $journey->{checkin}->epoch %>" - data-checkout="<%= $journey->{checkout}->epoch %>"> - <i class="material-icons left">delete_forever</i> - Löschen - </a> - </div> - <div class="col s12 m6 l6 center-align"> - %= form_for '/journey/edit' => (method => 'POST') => begin - %= hidden_field 'journey_id' => param('journey_id') - <button class="btn waves-effect waves-light" type="submit" name="action" value="edit"> - <i class="material-icons left" aria-hidden="true">edit</i> - Bearbeiten - </button> - %= end - </div> - </div> - <div class="row hide-on-med-and-up"> - <div class="col s12 m6 l6 center-align"> - %= form_for '/journey/edit' => (method => 'POST') => begin - %= hidden_field 'journey_id' => param('journey_id') - <button class="btn waves-effect waves-light" type="submit" name="action" value="edit"> - <i class="material-icons left" aria-hidden="true">edit</i> - Bearbeiten - </button> - %= end + % if (not stash('readonly')) { + <div class="row hide-on-small-only"> + <div class="col s12 m6 l6 center-align"> + <a class="waves-effect waves-light red btn action-delete" + data-id="<%= $journey->{id} %>" + data-checkin="<%= $journey->{checkin}->epoch %>" + data-checkout="<%= $journey->{checkout}->epoch %>"> + <i class="material-icons left">delete_forever</i> + Löschen + </a> + </div> + <div class="col s12 m6 l6 center-align"> + %= form_for '/journey/edit' => (method => 'POST') => begin + %= hidden_field 'journey_id' => param('journey_id') + <button class="btn waves-effect waves-light" type="submit" name="action" value="edit"> + <i class="material-icons left" aria-hidden="true">edit</i> + Bearbeiten + </button> + %= end + </div> </div> - <div class="col s12 m6 l6 center-align" style="margin-top: 1em;"> - <a class="waves-effect waves-light red btn action-delete" - data-id="<%= $journey->{id} %>" - data-checkin="<%= $journey->{checkin}->epoch %>" - data-checkout="<%= $journey->{checkout}->epoch %>"> - <i class="material-icons left" aria-hidden="true">delete_forever</i> - Löschen - </a> + <div class="row hide-on-med-and-up"> + <div class="col s12 m6 l6 center-align"> + %= form_for '/journey/edit' => (method => 'POST') => begin + %= hidden_field 'journey_id' => param('journey_id') + <button class="btn waves-effect waves-light" type="submit" name="action" value="edit"> + <i class="material-icons left" aria-hidden="true">edit</i> + Bearbeiten + </button> + %= end + </div> + <div class="col s12 m6 l6 center-align" style="margin-top: 1em;"> + <a class="waves-effect waves-light red btn action-delete" + data-id="<%= $journey->{id} %>" + data-checkin="<%= $journey->{checkin}->epoch %>" + data-checkout="<%= $journey->{checkout}->epoch %>"> + <i class="material-icons left" aria-hidden="true">delete_forever</i> + Löschen + </a> + </div> </div> - </div> + % } % } |