summaryrefslogtreecommitdiff
path: root/includes/view/User_view.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-12-19 20:58:01 +0100
committermsquare <msquare@notrademark.de>2017-12-19 20:58:01 +0100
commitfd85034e7f2277730f4ea4de49dade6d125832dd (patch)
tree54017bb754302b578838479d8f4d68f4a92010dd /includes/view/User_view.php
parent567ed9ebd2603a5deb9c171b4d969f7188414794 (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.php14
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'
);