diff options
author | Philip Häusler <msquare@notrademark.de> | 2012-12-27 15:00:41 +0100 |
---|---|---|
committer | Philip Häusler <msquare@notrademark.de> | 2012-12-27 15:00:41 +0100 |
commit | e82c31a76defb0cd3b611e13e33faa091a97cebc (patch) | |
tree | d6f6d3c16f4ffab46ab950865fc400df7fec877e /includes/pages/user_myshifts.php | |
parent | 1cf84a87be359705de20657892352cb060d8704f (diff) | |
parent | 7a2eae0a4b41232d7a9dd9dfec7bf8dfe5e919bf (diff) |
Merge branch 'master' of https://vcs.wybt.net/engelsystem/git
Diffstat (limited to 'includes/pages/user_myshifts.php')
-rw-r--r-- | includes/pages/user_myshifts.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php index d8f94b81..f38a81d0 100644 --- a/includes/pages/user_myshifts.php +++ b/includes/pages/user_myshifts.php @@ -79,9 +79,10 @@ function user_myshifts() { $html .= '<td>' . $shift['name'] . '</td>'; $html .= '<td>' . $shift['Comment'] . '</td>'; $html .= '<td>'; - $html .= '<a href="' . page_link_to('user_myshifts') . '&edit=' . $shift['id'] . '">' . Get_Text('edit') . '</a>'; - if ($shift['start'] - time() > $LETZTES_AUSTRAGEN * 3600) - $html .= ' | <a href="' . page_link_to('user_myshifts') . '&cancel=' . $shift['id'] . '">' . Get_Text('sign_off') . '</a>'; + if ($id == $user['UID']) + $html .= '<a href="' . page_link_to('user_myshifts') . '&edit=' . $shift['id'] . '">' . Get_Text('edit') . '</a>'; + if (($shift['start'] - time() > $LETZTES_AUSTRAGEN * 3600) || in_array('user_shifts_admin', $privileges)) + $html .= ' | <a href="' . page_link_to('user_myshifts') . (($id != $user['UID'])? '&id=' . $id : '') . '&cancel=' . $shift['id'] . '">' . Get_Text('sign_off') . '</a>'; $html .= '</td>'; $html .= '</tr>'; } |