Use icons in user edit view

This commit is contained in:
Xu 2024-04-07 17:20:14 +02:00 committed by Igor Scheller
parent 7e06923ed0
commit d7d99900f8
1 changed files with 21 additions and 26 deletions

View File

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