From fd85034e7f2277730f4ea4de49dade6d125832dd Mon Sep 17 00:00:00 2001 From: msquare Date: Tue, 19 Dec 2017 20:58:01 +0100 Subject: redo shift signoff and icons for delete/confirm/acknowledgment questions --- includes/view/User_view.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'includes/view/User_view.php') diff --git a/includes/view/User_view.php b/includes/view/User_view.php index 04fb4d04..e47603fb 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -363,19 +363,9 @@ function User_view_myshift($shift, $user_source, $its_me) 'btn-xs' ); } - if ( - ($shift['start'] > time() + config('last_unsubscribe') * 3600) - || in_array('user_shifts_admin', $privileges) - ) { - $parameters = [ - 'cancel' => $shift['id'], - 'id' => $user_source['UID'], - ]; - if ($its_me) { - $parameters['id'] = ''; - } + if (Shift_signout_allowed($shift, ['id' => $shift['TID']], $user_source)) { $myshift['actions'][] = button( - page_link_to('user_myshifts', $parameters), + ShiftEntry_delete_link($shift), glyph('trash') . _('sign off'), 'btn-xs' ); -- cgit v1.2.3-54-g00ecf