From 73175e2b64c85c7a8c528c76452cd82ffa99f925 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 28 Aug 2017 16:21:10 +0200 Subject: #337: Added routing --- includes/view/ShiftCalendarShiftRenderer.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'includes/view/ShiftCalendarShiftRenderer.php') diff --git a/includes/view/ShiftCalendarShiftRenderer.php b/includes/view/ShiftCalendarShiftRenderer.php index 8560d47d..f0488e83 100644 --- a/includes/view/ShiftCalendarShiftRenderer.php +++ b/includes/view/ShiftCalendarShiftRenderer.php @@ -125,7 +125,7 @@ class ShiftCalendarShiftRenderer if (in_array('user_shifts_admin', $privileges)) { $html .= '
  • ' . button( - page_link_to('user_shifts') . '&shift_id=' . $shift['SID'], + page_link_to('user_shifts', ['shift_id' => $shift['SID']]), _('Add more angels'), 'btn-xs' ) . '
  • '; @@ -169,11 +169,13 @@ class ShiftCalendarShiftRenderer case ShiftSignupState::ADMIN: case ShiftSignupState::FREE: // When admin or free display a link + button for sign up - $entry_list[] = '' + $entry_list[] = '' . $inner_text . ' ' . 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'), 'btn-xs btn-primary' ); break; @@ -191,7 +193,7 @@ class ShiftCalendarShiftRenderer // Add link to join the angeltype first $entry_list[] = $inner_text . '
    ' . button( - page_link_to('user_angeltypes') . '&action=add&angeltype_id=' . $angeltype['id'], + page_link_to('user_angeltypes', ['action' => 'add', 'angeltype_id' => $angeltype['id']]), sprintf(_('Become %s'), $angeltype['name']), 'btn-xs' ); @@ -232,8 +234,8 @@ class ShiftCalendarShiftRenderer $header_buttons = ''; if (in_array('admin_shifts', $privileges)) { $header_buttons = '
    ' . table_buttons([ - button(page_link_to('user_shifts') . '&edit_shift=' . $shift['SID'], glyph('edit'), 'btn-xs'), - button(page_link_to('user_shifts') . '&delete_shift=' . $shift['SID'], glyph('trash'), 'btn-xs') + button(page_link_to('user_shifts', ['edit_shift' => $shift['SID']]), glyph('edit'), 'btn-xs'), + button(page_link_to('user_shifts', ['delete_shift' => $shift['SID']]), glyph('trash'), 'btn-xs') ]) . '
    '; } $shift_heading = date('H:i', $shift['start']) . ' ‐ ' -- cgit v1.2.3-54-g00ecf