From e8daa4d2ce91a5376b3770a8cd60385339b67a81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Fri, 14 Aug 2015 14:06:33 +0200 Subject: [PATCH] add table of needed shirts to user active page --- includes/pages/admin_active.php | 38 +++++++++++++----- includes/view/User_view.php | 2 +- locale/de_DE.UTF-8/LC_MESSAGES/default.mo | Bin 33529 -> 33579 bytes locale/de_DE.UTF-8/LC_MESSAGES/default.po | 45 +++++++++++++--------- 4 files changed, 56 insertions(+), 29 deletions(-) diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php index b79d1bd1..78796391 100644 --- a/includes/pages/admin_active.php +++ b/includes/pages/admin_active.php @@ -145,14 +145,23 @@ 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' => '' . _("Sum") . '', + 'count' => '' . sql_select_single_cell("SELECT count(*) FROM `User` WHERE `Tshirt`=1") . '' + ); + $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' => '' . _("Sum") . '', 'count' => '' . sql_select_single_cell("SELECT count(*) FROM `User` WHERE `Tshirt`=1") . '' ); @@ -178,11 +187,22 @@ function admin_active() { 'tshirt' => _("T-shirt?"), 'actions' => "" ), $matched_users), - '

' . _("Given shirts") . '

', - table(array( - 'Size' => _("Size"), - 'count' => _("Count") - ), $shirt_statistics) + div('row', [ + div('col-md-6', [ + '

' . _("Needed shirts") . '

' , + table(array( + 'Size' => _("Size"), + 'count' => _("Count") + ), $needed_shirt_statistics) + ]), + div('col-md-6', [ + '

' . _("Given shirts") . '

', + table(array( + 'Size' => _("Size"), + 'count' => _("Count") + ), $given_shirt_statistics) + ]) + ]) )); } ?> diff --git a/includes/view/User_view.php b/includes/view/User_view.php index 99a70ba9..3ab5f816 100644 --- a/includes/view/User_view.php +++ b/includes/view/User_view.php @@ -268,7 +268,7 @@ function User_angeltypes_render($user_angeltypes) { $class = 'text-warning'; else $class = 'text-success'; - $output[] = '' . ($angeltype['coordinator'] ? ' ' : '') . $angeltype['name'] . ''; + $output[] = '' . ($angeltype['coordinator'] ? glyph('education') : '') . $angeltype['name'] . ''; } return join('
', $output); } diff --git a/locale/de_DE.UTF-8/LC_MESSAGES/default.mo b/locale/de_DE.UTF-8/LC_MESSAGES/default.mo index 0734c65150691ad1eb83f5fb6d164cac117f66aa..d0f7967b72397477de364cfd9ea729f227c510ab 100644 GIT binary patch delta 9157 zcmZA534D)NzQ^&CRfr@a8%bm#2x3XZ5`@@mX@XeBULSB zrJX3Px~0R|=3Y82Rb{H1(uL|`?&q6xdSCZ-pO;_WzjMyBob7r3oq4##`;DdEo@>>8 z*BOq3UdF`Y2SLX4@-}92jB1TppJYsJ+<tSGBW9nd=PmR%#$&2+HHnEr-8c>_VG8&y5GmAfdxDj>!cIPgvLiu&9 zj0Z6RkD)q#9g}#z@vd)74JztmP0Ye-I0QA~NvI1}pg-VFQFdzE$X}n zsQWy^KnzJXraH!8RcxX%&o^yJDq%JT<3Q9*tDFX{esJM@@Mz)YA0D zMmXNJuSMNw8)_g2T=_U^1}>mFbh9D-^dCas?!YUYsq0YLf&6RcR)8JrL8_mfK(| z5~s138VFiH}ho{TeIdLkvP6PZK-RP}B@Wpl%e6y0A9tM$NG* zcE;`42Q@=KqDK4x1F;&zio#e_2h&jY2y@27kA2;Jk)OmSndXHIq)TS-QYIq1WfDdsnUPN^$rMbPXHCEMo(t$)H>y5f# zpev6;Jzx^5BZaPh4r=O`px%PzsPk4~FusUd!kwt=N?rRQSAP`soRcc+Jv~pN6R)5~ z_&Mr^_fb>*2dabK>9$-IbzUfH6V*dKINg;yqdM3ZwL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ioG2vD5Z}6sL@1Hx%H6o`I(ZXpO0*;v5(UHz z>K{QJkK;!+HIHHl<)?|ik+&jxll%CT@b3o_9Y=_8m#=kh!;!>ioV!E3M!Z0|9qK3D zk2p#AyX*Ut|AnYaIhVLk-jUc{k)0Br8%@nXB9@p>t&TT{)|7R$ByJF4lqb2mU6pfE jJ_@bu+k9e7wVc+?vMY}EPEnFmd8hZo;gv\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"