tshirt-score for forced active

This commit is contained in:
msquare 2017-12-27 20:30:05 +01:00
parent 8c64532902
commit c3b8fa892d
4 changed files with 28 additions and 18 deletions

View File

@ -224,6 +224,12 @@ function user_controller()
if ($user_source['api_key'] == '') { if ($user_source['api_key'] == '') {
User_reset_api_key($user_source, false); User_reset_api_key($user_source, false);
} }
if($user_source['force_active']) {
$tshirt_score = _('Enough');
} else {
$tshirt_score = round(User_tshirt_score($user_source), 2) . 'h';
}
return [ return [
$user_source['Nick'], $user_source['Nick'],
@ -235,7 +241,7 @@ function user_controller()
User_groups($user_source), User_groups($user_source),
$shifts, $shifts,
$user['UID'] == $user_source['UID'], $user['UID'] == $user_source['UID'],
User_tshirt_score($user_source), $tshirt_score,
in_array('admin_active', $privileges) in_array('admin_active', $privileges)
) )
]; ];

View File

@ -429,10 +429,10 @@ function User_view_myshifts($shifts, $user_source, $its_me, $tshirt_score, $tshi
'comment' => '', 'comment' => '',
'actions' => '' 'actions' => ''
]; ];
if ($its_me || $tshirt_admin) { if (config('enable_tshirt_size', false) && ($its_me || $tshirt_admin)) {
$myshifts_table[] = [ $myshifts_table[] = [
'date' => '<b>' . _('Your t-shirt score') . '&trade;:</b>', 'date' => '<b>' . _('Your t-shirt score') . '&trade;:</b>',
'duration' => '<b>' . round($tshirt_score, 2) . ' h</b>', 'duration' => '<b>' . $tshirt_score . '</b>',
'room' => '', 'room' => '',
'shift_info' => '', 'shift_info' => '',
'comment' => '', 'comment' => '',

View File

@ -1,8 +1,8 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Engelsystem 2.0\n" "Project-Id-Version: Engelsystem 2.0\n"
"POT-Creation-Date: 2017-12-27 15:02+0100\n" "POT-Creation-Date: 2017-12-27 20:29+0100\n"
"PO-Revision-Date: 2017-12-27 15:02+0100\n" "PO-Revision-Date: 2017-12-27 20:29+0100\n"
"Last-Translator: msquare <msquare@notrademark.de>\n" "Last-Translator: msquare <msquare@notrademark.de>\n"
"Language-Team: \n" "Language-Team: \n"
"Language: de_DE\n" "Language: de_DE\n"
@ -425,7 +425,7 @@ msgstr "Du darfst diesen Benutzer nicht für diesen Engeltyp freischalten."
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/user_angeltypes_controller.php:146 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/user_angeltypes_controller.php:146
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/user_angeltypes_controller.php:201 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/user_angeltypes_controller.php:201
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/user_angeltypes_controller.php:268 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/user_angeltypes_controller.php:268
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:409 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:415
msgid "User doesn't exist." msgid "User doesn't exist."
msgstr "Benutzer existiert nicht." msgstr "Benutzer existiert nicht."
@ -577,55 +577,59 @@ msgstr "Voucher von %s"
msgid "User not found." msgid "User not found."
msgstr "Benutzer nicht gefunden." msgstr "Benutzer nicht gefunden."
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:269 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:229
msgid "Enough"
msgstr "Genug"
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:275
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:232 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:232
msgid "All users" msgid "All users"
msgstr "Alle Benutzer" msgstr "Alle Benutzer"
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:293 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:299
msgid "Token is not correct." msgid "Token is not correct."
msgstr "Der Token ist nicht in Ordnung." msgstr "Der Token ist nicht in Ordnung."
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:306 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:312
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:142 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:142
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:116 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:116
msgid "Your passwords don't match." msgid "Your passwords don't match."
msgstr "Deine Passwörter stimmen nicht überein." msgstr "Deine Passwörter stimmen nicht überein."
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:310 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:316
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:114 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:114
msgid "Your password is to short (please use at least 6 characters)." msgid "Your password is to short (please use at least 6 characters)."
msgstr "Dein Passwort ist zu kurz (Bitte mindestens 6 Zeichen nutzen)." msgstr "Dein Passwort ist zu kurz (Bitte mindestens 6 Zeichen nutzen)."
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:315 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:321
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:119 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:119
msgid "Password saved." msgid "Password saved."
msgstr "Passwort gespeichert." msgstr "Passwort gespeichert."
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:340 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:346
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:344 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:350
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:107 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:107
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:31 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:31
msgid "E-mail address is not correct." msgid "E-mail address is not correct."
msgstr "Die E-Mail Adresse ist nicht in Ordnung." msgstr "Die E-Mail Adresse ist nicht in Ordnung."
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:348 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:354
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:111 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:111
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:35 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:35
msgid "Please enter your e-mail." msgid "Please enter your e-mail."
msgstr "Bitte gib Deine E-Mail-Adresse ein." msgstr "Bitte gib Deine E-Mail-Adresse ein."
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:355 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:361
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:391 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:397
msgid "Password recovery" msgid "Password recovery"
msgstr "Passwort wiederherstellen" msgstr "Passwort wiederherstellen"
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:357 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:363
#, php-format #, php-format
msgid "Please visit %s to recover your password." msgid "Please visit %s to recover your password."
msgstr "Bitte besuche %s, um Dein Passwort zurückzusetzen" msgstr "Bitte besuche %s, um Dein Passwort zurückzusetzen"
#: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:361 #: /Users/msquare/workspace/projects/engelsystem/includes/controller/users_controller.php:367
msgid "We sent an email containing your password recovery link." msgid "We sent an email containing your password recovery link."
msgstr "" msgstr ""
"Wir haben eine eMail mit einem Link zum Passwort-zurücksetzen geschickt." "Wir haben eine eMail mit einem Link zum Passwort-zurücksetzen geschickt."