summaryrefslogtreecommitdiff
path: root/includes/view/ShiftCalendarShiftRenderer.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2017-08-28 16:21:10 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2017-08-28 17:34:00 +0200
commit73175e2b64c85c7a8c528c76452cd82ffa99f925 (patch)
tree7464fe30c04fe245424646a98cfd6247d060e517 /includes/view/ShiftCalendarShiftRenderer.php
parente1762e7764d4ee4f37757ecd2630f62a440dbf0e (diff)
#337: Added routing
Diffstat (limited to 'includes/view/ShiftCalendarShiftRenderer.php')
-rw-r--r--includes/view/ShiftCalendarShiftRenderer.php14
1 files changed, 8 insertions, 6 deletions
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 .= '<li class="list-group-item">' . button(
- page_link_to('user_shifts') . '&amp;shift_id=' . $shift['SID'],
+ page_link_to('user_shifts', ['shift_id' => $shift['SID']]),
_('Add more angels'),
'btn-xs'
) . '</li>';
@@ -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[] = '<a href="' . page_link_to('user_shifts') . '&amp;shift_id=' . $shift['SID'] . '&amp;type_id=' . $angeltype['id'] . '">'
+ $entry_list[] = '<a href="'
+ . page_link_to('user_shifts', ['shift_id' => $shift['SID'], 'type_id' => $angeltype['id']])
+ . '">'
. $inner_text
. '</a> '
. button(
- page_link_to('user_shifts') . '&amp;shift_id=' . $shift['SID'] . '&amp;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 . '<br />'
. 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 = '<div class="pull-right">' . 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')
]) . '</div>';
}
$shift_heading = date('H:i', $shift['start']) . ' &dash; '