diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2017-08-28 16:21:10 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2017-08-28 17:34:00 +0200 |
commit | 73175e2b64c85c7a8c528c76452cd82ffa99f925 (patch) | |
tree | 7464fe30c04fe245424646a98cfd6247d060e517 /includes/view/Shifts_view.php | |
parent | e1762e7764d4ee4f37757ecd2630f62a440dbf0e (diff) |
#337: Added routing
Diffstat (limited to 'includes/view/Shifts_view.php')
-rw-r--r-- | includes/view/Shifts_view.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php index 094af7ad..bc905f39 100644 --- a/includes/view/Shifts_view.php +++ b/includes/view/Shifts_view.php @@ -1,4 +1,5 @@ <?php + use Engelsystem\ShiftSignupState; /** @@ -41,12 +42,12 @@ function Shift_signup_button_render($shift, $angeltype, $user_angeltype = null) if ($angeltype['shift_signup_state']->isSignupAllowed()) { return button( - page_link_to('user_shifts') . '&shift_id=' . $shift['SID'] . '&type_id=' . $angeltype['id'], + page_link_to('user_shifts', ['shift_id' => $shift['SID'], 'type_id' => $angeltype['id']]), _('Sign up') ); } elseif ($user_angeltype == null) { return button( - page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], + page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype['id']]), sprintf(_('Become %s'), $angeltype['name']) ); @@ -207,12 +208,12 @@ function Shift_view_render_shift_entry($shift_entry, $user_shift_admin, $angelty $entry .= ' <div class="btn-group">'; if ($user_shift_admin) { $entry .= button_glyph( - page_link_to('user_myshifts') . '&edit=' . $shift_entry['id'] . '&id=' . $shift_entry['UID'], + page_link_to('user_myshifts', ['edit' => $shift_entry['id'], 'id' => $shift_entry['UID']]), 'pencil', 'btn-xs' ); } - $entry .= button_glyph(page_link_to('user_shifts') . '&entry_id=' . $shift_entry['id'], 'trash', 'btn-xs'); + $entry .= button_glyph(page_link_to('user_shifts', ['entry_id' => $shift_entry['id']]), 'trash', 'btn-xs'); $entry .= '</div>'; } return $entry; |