make got t-shirt always available

This commit is contained in:
msquare 2017-12-30 13:37:26 +01:00
parent c961269bb7
commit 0314ba19e3
1 changed files with 9 additions and 5 deletions

View File

@ -200,22 +200,26 @@ function admin_active()
. _('set active') . _('set active')
. '</a>'; . '</a>';
} }
if ($usr['Aktiv'] == 1 && $usr['Tshirt'] == 0) { if ($usr['Aktiv'] == 1) {
$parametersRemove = [ $parametersRemove = [
'not_active' => $usr['UID'], 'not_active' => $usr['UID'],
'search' => $search, 'search' => $search,
]; ];
if ($show_all_shifts) {
$parametersRemove['show_all_shifts'] = 1;
}
$actions[] = '<a href="' . page_link_to('admin_active', $parametersRemove) . '">'
. _('remove active')
. '</a>';
}
if ($usr['Tshirt'] == 0) {
$parametersShirt = [ $parametersShirt = [
'tshirt' => $usr['UID'], 'tshirt' => $usr['UID'],
'search' => $search, 'search' => $search,
]; ];
if ($show_all_shifts) { if ($show_all_shifts) {
$parametersRemove['show_all_shifts'] = 1;
$parametersShirt['show_all_shifts'] = 1; $parametersShirt['show_all_shifts'] = 1;
} }
$actions[] = '<a href="' . page_link_to('admin_active', $parametersRemove) . '">'
. _('remove active')
. '</a>';
$actions[] = '<a href="' . page_link_to('admin_active', $parametersShirt) . '">' $actions[] = '<a href="' . page_link_to('admin_active', $parametersShirt) . '">'
. _('got t-shirt') . _('got t-shirt')
. '</a>'; . '</a>';