add table of needed shirts to user active page
This commit is contained in:
parent
18e49ee06a
commit
e8daa4d2ce
|
@ -146,13 +146,22 @@ function admin_active() {
|
|||
$matched_users[] = $usr;
|
||||
}
|
||||
|
||||
$shirt_statistics = sql_select("
|
||||
$given_shirt_statistics = sql_select("
|
||||
SELECT `Size`, count(`Size`) AS `count`
|
||||
FROM `User`
|
||||
WHERE `Tshirt`=1
|
||||
GROUP BY `Size`
|
||||
ORDER BY `count` DESC");
|
||||
$shirt_statistics[] = array(
|
||||
ORDER BY `Size` DESC");
|
||||
$given_shirt_statistics[] = array(
|
||||
'Size' => '<b>' . _("Sum") . '</b>',
|
||||
'count' => '<b>' . sql_select_single_cell("SELECT count(*) FROM `User` WHERE `Tshirt`=1") . '</b>'
|
||||
);
|
||||
$needed_shirt_statistics = sql_select("
|
||||
SELECT `Size`, count(`Size`) AS `count`
|
||||
FROM `User`
|
||||
GROUP BY `Size`
|
||||
ORDER BY `Size` DESC");
|
||||
$needed_shirt_statistics[] = array(
|
||||
'Size' => '<b>' . _("Sum") . '</b>',
|
||||
'count' => '<b>' . sql_select_single_cell("SELECT count(*) FROM `User` WHERE `Tshirt`=1") . '</b>'
|
||||
);
|
||||
|
@ -178,11 +187,22 @@ function admin_active() {
|
|||
'tshirt' => _("T-shirt?"),
|
||||
'actions' => ""
|
||||
), $matched_users),
|
||||
'<h2>' . _("Given shirts") . '</h2>',
|
||||
table(array(
|
||||
'Size' => _("Size"),
|
||||
'count' => _("Count")
|
||||
), $shirt_statistics)
|
||||
div('row', [
|
||||
div('col-md-6', [
|
||||
'<h2>' . _("Needed shirts") . '</h2>' ,
|
||||
table(array(
|
||||
'Size' => _("Size"),
|
||||
'count' => _("Count")
|
||||
), $needed_shirt_statistics)
|
||||
]),
|
||||
div('col-md-6', [
|
||||
'<h2>' . _("Given shirts") . '</h2>',
|
||||
table(array(
|
||||
'Size' => _("Size"),
|
||||
'count' => _("Count")
|
||||
), $given_shirt_statistics)
|
||||
])
|
||||
])
|
||||
));
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -268,7 +268,7 @@ function User_angeltypes_render($user_angeltypes) {
|
|||
$class = 'text-warning';
|
||||
else
|
||||
$class = 'text-success';
|
||||
$output[] = '<span class="' . $class . '">' . ($angeltype['coordinator'] ? '<span class="glyphicon glyphicon-certificate"></span> ' : '') . $angeltype['name'] . '</span>';
|
||||
$output[] = '<span class="' . $class . '">' . ($angeltype['coordinator'] ? glyph('education') : '') . $angeltype['name'] . '</span>';
|
||||
}
|
||||
return join('<br />', $output);
|
||||
}
|
||||
|
|
Binary file not shown.
|
@ -1,8 +1,8 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Engelsystem 2.0\n"
|
||||
"POT-Creation-Date: 2015-08-14 12:31+0100\n"
|
||||
"PO-Revision-Date: 2015-08-14 12:32+0100\n"
|
||||
"POT-Creation-Date: 2015-08-14 14:06+0100\n"
|
||||
"PO-Revision-Date: 2015-08-14 14:06+0100\n"
|
||||
"Last-Translator: msquare <msquare@notrademark.de>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: de_DE\n"
|
||||
|
@ -557,21 +557,22 @@ msgid "remove t-shirt"
|
|||
msgstr "entferne t-shirt"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:156
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:165
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/view/AngelTypes_view.php:139
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/view/AngelTypes_view.php:146
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:52
|
||||
msgid "Sum"
|
||||
msgstr "Summe"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:162
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:171
|
||||
msgid "Search angel:"
|
||||
msgstr "Suche Engel:"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:163
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:172
|
||||
msgid "Show all shifts"
|
||||
msgstr "Alle Schichten anzeigen"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:164
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:173
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_arrive.php:86
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_arrive.php:87
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_free.php:71
|
||||
|
@ -581,59 +582,65 @@ msgstr "Alle Schichten anzeigen"
|
|||
msgid "Search"
|
||||
msgstr "Suche"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:167
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:176
|
||||
msgid "How much angels should be active?"
|
||||
msgstr "Wie viele Engel sollten aktiv sein?"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:168
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:177
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_shifts.php:239
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_shifts.php:322
|
||||
msgid "Preview"
|
||||
msgstr "Vorschau"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:172
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:181
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_arrive.php:90
|
||||
msgid "Nickname"
|
||||
msgstr "Nick"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:173
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:183
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:182
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:194
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:201
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:78
|
||||
msgid "Size"
|
||||
msgstr "Größe"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:174
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:183
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_shifts.php:4
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:217
|
||||
msgid "Shifts"
|
||||
msgstr "Schichten"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:175
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:184
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_shifts.php:311
|
||||
msgid "Length"
|
||||
msgstr "Länge"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:176
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:185
|
||||
msgid "Active?"
|
||||
msgstr "Aktiv?"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:177
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:186
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:76
|
||||
msgid "Forced"
|
||||
msgstr "Gezwungen"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:178
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:187
|
||||
msgid "T-shirt?"
|
||||
msgstr "T-Shirt?"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:181
|
||||
msgid "Given shirts"
|
||||
msgstr "Ausgegebene T-Shirts"
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:192
|
||||
msgid "Needed shirts"
|
||||
msgstr "Benötigte T-Shirts"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:184
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:195
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:202
|
||||
msgid "Count"
|
||||
msgstr "Anzahl"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_active.php:199
|
||||
msgid "Given shirts"
|
||||
msgstr "Ausgegebene T-Shirts"
|
||||
|
||||
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_arrive.php:4
|
||||
msgid "Arrived angels"
|
||||
msgstr "Angekommene Engel"
|
||||
|
|
Loading…
Reference in New Issue