summaryrefslogtreecommitdiff
path: root/includes/view/Shifts_view.php
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2019-06-04 20:51:26 +0200
committermsquare <msquare@notrademark.de>2019-06-04 21:23:34 +0200
commitead56a89fef63745d0e9d3a0b44ef198792c2784 (patch)
treef7831e1de0281a553c5f5df8fa0a4e1d156a8f27 /includes/view/Shifts_view.php
parentb6eda8dbfc9880239bdc622a0b6988ad0a8ab722 (diff)
Only show the shift "Comment" field for own entries
Diffstat (limited to 'includes/view/Shifts_view.php')
-rw-r--r--includes/view/Shifts_view.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php
index 4daaec8e..2e7bfa4b 100644
--- a/includes/view/Shifts_view.php
+++ b/includes/view/Shifts_view.php
@@ -224,9 +224,10 @@ function Shift_view_render_shift_entry($shift_entry, $user_shift_admin, $angelty
if ($shift_entry['freeloaded']) {
$entry = '<del>' . $entry . '</del>';
}
- if ($user_shift_admin || $angeltype_supporter) {
+ $isUser = $shift_entry['UID'] == auth()->user()->id;
+ if ($user_shift_admin || $angeltype_supporter || $isUser) {
$entry .= ' <div class="btn-group">';
- if ($user_shift_admin) {
+ if ($user_shift_admin || $isUser) {
$entry .= button_glyph(
page_link_to('user_myshifts', ['edit' => $shift_entry['id'], 'id' => $shift_entry['UID']]),
'pencil',