diff options
author | msquare <msquare@notrademark.de> | 2017-12-19 20:58:01 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2017-12-19 20:58:01 +0100 |
commit | fd85034e7f2277730f4ea4de49dade6d125832dd (patch) | |
tree | 54017bb754302b578838479d8f4d68f4a92010dd /includes/view/User_view.php | |
parent | 567ed9ebd2603a5deb9c171b4d969f7188414794 (diff) |
redo shift signoff and icons for delete/confirm/acknowledgment questions
Diffstat (limited to 'includes/view/User_view.php')
-rw-r--r-- | includes/view/User_view.php | 14 |
1 files changed, 2 insertions, 12 deletions
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' ); |