Merge branch 'master' of github.com:planetcyborg/engelsystem

This commit is contained in:
Felix Favre 2014-08-24 16:55:35 +02:00
commit 64a341e084
4 changed files with 22 additions and 32 deletions

View File

@ -9,7 +9,7 @@ function user_unread_messages() {
if (isset($user)) { if (isset($user)) {
$new_messages = sql_num_query("SELECT * FROM `Messages` WHERE isRead='N' AND `RUID`=" . sql_escape($user['UID'])); $new_messages = sql_num_query("SELECT * FROM `Messages` WHERE isRead='N' AND `RUID`=" . sql_escape($user['UID']));
if ($new_messages > 0) if ($new_messages > 0)
return '<span class="badge">' . $new_messages . '</span>'; return '<span class="badge pull-right">' . $new_messages . '</span>';
} }
return ''; return '';
} }

View File

@ -36,9 +36,9 @@ function User_shift_state_render($user) {
$halfway = ($upcoming_shifts[0]['start'] + $upcoming_shifts[0]['end']) / 2; $halfway = ($upcoming_shifts[0]['start'] + $upcoming_shifts[0]['end']) / 2;
if (time() < $halfway) if (time() < $halfway)
return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Shift start %c") . '</span>'; return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['start'] . '">' . _("Shift starts %c") . '</span>';
else else
return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['end'] . '">' . _("Shift end %c") . '</span>'; return '<span class="text-danger moment-countdown" data-timestamp="' . $upcoming_shifts[0]['end'] . '">' . _("Shift ends %c") . '</span>';
} }
function User_view($user_source, $admin_user_privilege, $freeloader, $user_angeltypes, $user_groups, $shifts, $its_me) { function User_view($user_source, $admin_user_privilege, $freeloader, $user_angeltypes, $user_groups, $shifts, $its_me) {
@ -134,8 +134,8 @@ function User_view($user_source, $admin_user_privilege, $freeloader, $user_angel
buttons(array( buttons(array(
$admin_user_privilege ? button(page_link_to('admin_user') . '&id=' . $user_source['UID'], '<span class="glyphicon glyphicon-edit"></span> ' . _("edit")) : '', $admin_user_privilege ? button(page_link_to('admin_user') . '&id=' . $user_source['UID'], '<span class="glyphicon glyphicon-edit"></span> ' . _("edit")) : '',
! $user_source['Gekommen'] ? button(page_link_to('admin_arrive') . '&arrived=' . $user_source['UID'], _("arrived")) : '', ! $user_source['Gekommen'] ? button(page_link_to('admin_arrive') . '&arrived=' . $user_source['UID'], _("arrived")) : '',
button(page_link_to_absolute('ical') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-calendar"></span> ' . _("iCal Export")), $its_me ? button(page_link_to_absolute('ical') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-calendar"></span> ' . _("iCal Export")) : '',
button(page_link_to_absolute('shifts_json_export') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-export"></span> ' . _("JSON Export")) $its_me ? button(page_link_to_absolute('shifts_json_export') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-export"></span> ' . _("JSON Export")) : ''
)), )),
($its_me || $admin_user_privilege) ? '<h2>' . _("Shifts") . '</h2>' : '', ($its_me || $admin_user_privilege) ? '<h2>' . _("Shifts") . '</h2>' : '',
($its_me || $admin_user_privilege) ? table(array( ($its_me || $admin_user_privilege) ? table(array(
@ -146,13 +146,7 @@ function User_view($user_source, $admin_user_privilege, $freeloader, $user_angel
'comment' => _("Comment"), 'comment' => _("Comment"),
'actions' => _("Action") 'actions' => _("Action")
), $myshifts_table) : '', ), $myshifts_table) : '',
$its_me && count($shifts) == 0 ? error(sprintf(_("Go to the <a href=\"%s\">shifts table</a> to sign yourself up for some shifts."), page_link_to('user_shifts')), true) : '', $its_me && count($shifts) == 0 ? error(sprintf(_("Go to the <a href=\"%s\">shifts table</a> to sign yourself up for some shifts."), page_link_to('user_shifts')), true) : ''
($its_me || $admin_user_privilege) ? '<h2>' . _("Exports") . '</h2>' : '',
$its_me ? (sprintf(_("Export of shown shifts. <a href=\"%s\">iCal format</a> or <a href=\"%s\">JSON format</a> available (please keep secret, otherwise <a href=\"%s\">reset the api key</a>)."), page_link_to_absolute('ical') . '&key=' . $user_source['api_key'], page_link_to_absolute('shifts_json_export') . '&key=' . $user_source['api_key'], page_link_to('user_myshifts') . '&reset')) : '',
(! $its_me && $admin_user_privilege) ? buttons(array(
button(page_link_to_absolute('ical') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-calendar"></span> ' . _("iCal Export")),
button(page_link_to_absolute('shifts_json_export') . '&key=' . $user_source['api_key'], '<span class="glyphicon glyphicon-export"></span> ' . _("JSON Export"))
)) : ''
)); ));
} }

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: 2014-08-24 16:21+0100\n" "POT-Creation-Date: 2014-08-24 16:47+0100\n"
"PO-Revision-Date: 2014-08-24 16:22+0100\n" "PO-Revision-Date: 2014-08-24 16:47+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"
@ -555,7 +555,7 @@ msgstr "Jabber"
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_free.php:81 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/admin_free.php:81
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:153 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:153
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:180 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_settings.php:180
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:167 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:161
msgid "E-Mail" msgid "E-Mail"
msgstr "E-Mail" msgstr "E-Mail"
@ -598,7 +598,7 @@ msgstr "Privilegien"
#: /Users/msquare/workspace/projects/engelsystem/includes/view/AngelTypes_view.php:55 #: /Users/msquare/workspace/projects/engelsystem/includes/view/AngelTypes_view.php:55
#: /Users/msquare/workspace/projects/engelsystem/includes/view/Questions_view.php:32 #: /Users/msquare/workspace/projects/engelsystem/includes/view/Questions_view.php:32
#: /Users/msquare/workspace/projects/engelsystem/includes/view/ShiftEntry_view.php:32 #: /Users/msquare/workspace/projects/engelsystem/includes/view/ShiftEntry_view.php:32
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:183 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:177
msgid "Save" msgid "Save"
msgstr "Speichern" msgstr "Speichern"
@ -938,12 +938,12 @@ msgstr "T-Shirt Größe"
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:159 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:159
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:261 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:261
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:181 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:175
msgid "Password" msgid "Password"
msgstr "Passwort" msgstr "Passwort"
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:162 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/guest_login.php:162
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:182 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:176
msgid "Confirm password" msgid "Confirm password"
msgstr "Passwort wiederholen" msgstr "Passwort wiederholen"
@ -1433,7 +1433,6 @@ msgid "iCal export"
msgstr "iCal Export" msgstr "iCal Export"
#: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_shifts.php:747 #: /Users/msquare/workspace/projects/engelsystem/includes/pages/user_shifts.php:747
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:151
#, php-format #, php-format
msgid "" msgid ""
"Export of shown shifts. <a href=\"%s\">iCal format</a> or <a href=\"%s" "Export of shown shifts. <a href=\"%s\">iCal format</a> or <a href=\"%s"
@ -1643,12 +1642,12 @@ msgstr "Nächste Schicht %c"
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:39 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:39
#, php-format #, php-format
msgid "Shift start %c" msgid "Shift starts %c"
msgstr "Schicht start %c" msgstr "Schicht startet %c"
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:41 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:41
#, php-format #, fuzzy, php-format
msgid "Shift end %c" msgid "Shift ends %c"
msgstr "Schicht endet %c" msgstr "Schicht endet %c"
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:90 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:90
@ -1684,13 +1683,11 @@ msgid "Rights"
msgstr "Rechte" msgstr "Rechte"
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:137 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:137
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:153
#, fuzzy #, fuzzy
msgid "iCal Export" msgid "iCal Export"
msgstr "iCal Export" msgstr "iCal Export"
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:138 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:138
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:154
msgid "JSON Export" msgid "JSON Export"
msgstr "JSON Export" msgstr "JSON Export"
@ -1719,11 +1716,7 @@ msgstr ""
"Gehe zur <a href=\"%s\">Schicht-Tabelle</a>, um Dich für Schichten " "Gehe zur <a href=\"%s\">Schicht-Tabelle</a>, um Dich für Schichten "
"einzutragen." "einzutragen."
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:150 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:159
msgid "Exports"
msgstr "Exporte"
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:165
msgid "" msgid ""
"We will send you an e-mail with a password recovery link. Please use the " "We will send you an e-mail with a password recovery link. Please use the "
"email address you used for registration." "email address you used for registration."
@ -1732,11 +1725,11 @@ msgstr ""
"zurücksetzen kannst. Bitte benutze die Mailadresse, die du bei der Anmeldung " "zurücksetzen kannst. Bitte benutze die Mailadresse, die du bei der Anmeldung "
"verwendet hast." "verwendet hast."
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:168 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:162
msgid "Recover" msgid "Recover"
msgstr "Wiederherstellen" msgstr "Wiederherstellen"
#: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:179 #: /Users/msquare/workspace/projects/engelsystem/includes/view/User_view.php:173
msgid "Please enter a new password." msgid "Please enter a new password."
msgstr "Gib bitte ein neues Passwort ein." msgstr "Gib bitte ein neues Passwort ein."
@ -1824,6 +1817,9 @@ msgstr ""
"Du hast keinen Zugriff auf diese Seite. Registriere Dich und logge Dich " "Du hast keinen Zugriff auf diese Seite. Registriere Dich und logge Dich "
"bitte ein, um Zugriff zu erhalten!" "bitte ein, um Zugriff zu erhalten!"
#~ msgid "Exports"
#~ msgstr "Exporte"
#~ msgid "Current ends in %s min" #~ msgid "Current ends in %s min"
#~ msgstr "Ende in %s min" #~ msgstr "Ende in %s min"