summaryrefslogtreecommitdiff
path: root/includes/view/Shifts_view.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-11-12 23:00:46 +0100
committermsquare <msquare@notrademark.de>2016-11-12 23:00:46 +0100
commit1a3b4e2a334c57cc403be1d8e21fd8e162d9df5c (patch)
treebd61f7ab438d50a57ccb34866022aab13d4fdfcb /includes/view/Shifts_view.php
parent106a6788086f9be3ef6d30d1844f512fcbf22e23 (diff)
redone shift coloring and shift signup state
Diffstat (limited to 'includes/view/Shifts_view.php')
-rw-r--r--includes/view/Shifts_view.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php
index 1b910f5c..8e52eb9d 100644
--- a/includes/view/Shifts_view.php
+++ b/includes/view/Shifts_view.php
@@ -18,7 +18,8 @@ function Shift_signup_button_render($shift, $angeltype, $user_angeltype = null,
$user_angeltype = UserAngelType_by_User_and_AngelType($user, $angeltype);
}
- if (Shift_signup_allowed($shift, $angeltype, $user_angeltype, $user_shifts)) {
+ $shift_signup_state = Shift_signup_allowed($user, $shift, $angeltype, $user_angeltype, $user_shifts);
+ if ($shift_signup_state->isSignupAllowed()) {
return button(page_link_to('user_shifts') . '&shift_id=' . $shift['SID'] . '&type_id=' . $angeltype['id'], _('Sign up'));
} elseif ($user_angeltype == null) {
return button(page_link_to('angeltypes') . '&action=view&angeltype_id=' . $angeltype['id'], sprintf(_('Become %s'), $angeltype['name']));