diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php index 8d67b733..f33bd222 100644 --- a/includes/pages/admin_user.php +++ b/includes/pages/admin_user.php @@ -122,43 +122,38 @@ function admin_user() // Arrived? $html .= ' ' . __('user.arrived') . '' . "\n"; - if ($admin_arrive) { - $html .= html_options('arrive', $options, $user_source->state->arrived) . '' . "\n"; - } else { - $html .= ($user_source->state->arrived ? __('Yes') : __('No')); - $html .= '' . "\n"; - } + $html .= $admin_arrive + ? html_options('arrive', $options, $user_source->state->arrived) + : icon_bool($user_source->state->arrived); + $html .= '' . "\n"; // Active? - if ($user_edit_shirt) { - $html .= ' ' . __('user.active') . '' . "\n"; - $html .= html_options('eAktiv', $options, $user_source->state->active) . '' . "\n"; - } else { - $html .= ' ' . __('user.active') . '' . "\n"; - $html .= ($user_source->state->active ? __('Yes') : __('No')); - $html .= '' . "\n"; - } + $html .= ' ' . __('user.active') . '' . "\n"; + $html .= $user_edit_shirt + ? html_options('eAktiv', $options, $user_source->state->active) + : icon_bool($user_source->state->active); + $html .= '' . "\n"; // Forced active? if (config('enable_force_active')) { $html .= ' ' . __('Force active') . '' . "\n"; - if (auth()->can('user.fa.edit')) { - $html .= html_options('force_active', $options, $user_source->state->force_active); - } else { - $html .= ($user_source->state->force_active ? __('Yes') : __('No')); - } + $html .= auth()->can('user.fa.edit') + ? html_options('force_active', $options, $user_source->state->force_active) + : icon_bool($user_source->state->force_active); $html .= '' . "\n"; } - if ($goodie_enabled && $user_edit_shirt) { + if ($goodie_enabled) { // T-Shirt bekommen? - if ($goodie_tshirt) { - $html .= ' ' . __('T-shirt') . '' . "\n"; - } else { - $html .= ' ' . __('Goodie') . '' . "\n"; - } - $html .= html_options('eTshirt', $options, $user_source->state->got_shirt) . '' . "\n"; + $html .= ' ' + . ($goodie_tshirt ? __('T-shirt') : __('Goodie')) + . '' . "\n"; + $html .= $user_edit_shirt + ? html_options('eTshirt', $options, $user_source->state->got_shirt) + : icon_bool($user_source->state->got_shirt); + $html .= '' . "\n"; } + $html .= '' . "\n" . ''; $html .= '' . "\n";