' . _("Needed angels") . '
', + $angel_types, + form_submit('submit', _("Save")) + )) )); } // Schicht komplett löschen (nur für admins/user mit user_shifts_admin privileg) elseif (isset($_REQUEST['delete_shift']) && in_array('user_shifts_admin', $privileges)) { @@ -170,15 +175,13 @@ function user_shifts() { sql_query("DELETE FROM `Shifts` WHERE `SID`=" . sql_escape($shift_id) . " LIMIT 1"); engelsystem_log("Deleted shift " . $shift['name'] . " from " . date("y-m-d H:i", $shift['start']) . " to " . date("y-m-d H:i", $shift['end'])); - success("Die Schicht wurde gelöscht."); + success(_("Shift deleted.")); redirect(page_link_to('user_shifts')); } - return template_render('../templates/user_shifts_admin_delete.html', array( - 'name' => $shift['name'], - 'start' => date("Y-m-d H:i", $shift['start']), - 'end' => date("H:i", $shift['end']), - 'id' => $shift_id + return page(array( + error(sprintf(_("Do you want to delete the shift %s from %s to %s?"), $shift['name'], date("Y-m-d H:i", $shift['start']), date("H:i", $shift['end'])), true), + '' . _("delete") . '' )); } elseif (isset($_REQUEST['shift_id'])) { if (isset($_REQUEST['shift_id']) && preg_match("/^[0-9]*$/", $_REQUEST['shift_id'])) @@ -198,13 +201,13 @@ function user_shifts() { // Schicht läuft schon, Eintragen für Engel nicht mehr möglich if (! in_array('user_shifts_admin', $privileges) && time() > $shift['start']) { - error("Diese Schicht läuft gerade oder ist bereits vorbei. Bitte kontaktiere den Schichtkoordinator um Dich eintragen zu lassen."); + error(_("This shift is running now or ended already. Please contact a dispatcher to join the shift.")); redirect(page_link_to('user_shifts')); } // Another shift the user is signed up for collides with this one if (! in_array('user_shifts_admin', $privileges) && sql_num_query("SELECT `Shifts`.`SID` FROM `Shifts` INNER JOIN `ShiftEntry` ON (`Shifts`.`SID` = `ShiftEntry`.`SID` AND `ShiftEntry`.`UID` = " . sql_escape($user['UID']) . ") WHERE `start` < '" . sql_escape($shift['end']) . "' AND `end` > '" . sql_escape($shift['start']) . "'") > 0) { - error("Du bist bereits in einer parallelen Schicht eingetragen. Bitte kontaktiere den Schichtkoordinator, um dich eintragen zu lassen."); + error(_("You already subscribed to shift in the same timeslot. Please contact a dispatcher to join the shift.")); redirect(page_link_to('user_shifts')); } @@ -243,7 +246,7 @@ function user_shifts() { $user_source = User($user_id); engelsystem_log("User " . User_Nick_render($user_source) . " signed up for shift " . $shift['name'] . " from " . date("y-m-d H:i", $shift['start']) . " to " . date("y-m-d H:i", $shift['end'])); - success("Du bist eingetragen. Danke!" . ' Meine Schichten »'); + success(_("You are subscribed. Thank you!") . ' ' . _("My shifts") . ' »'); redirect(page_link_to('user_shifts')); } @@ -521,7 +524,7 @@ function view_user_shifts() { if (time() > $shift['start']) $entry_list[] = $inner_text . ' (vorbei)'; elseif ($angeltype['restricted'] == 1 && isset($angeltype['user_id']) && ! isset($angeltype['confirm_user_id'])) - $entry_list[] = $inner_text . ' '; + $entry_list[] = $inner_text . ' '; elseif ($collides) $entry_list[] = $inner_text; else @@ -537,7 +540,7 @@ function view_user_shifts() { $shifts_row .= ''; } if (in_array('user_shifts_admin', $privileges)) { - $shifts_row .= 'Weitere Helfer eintragen »'; + $shifts_row .= '' . _("Add more angels") .' »'; } } if ($shift['own'] && ! in_array('user_shifts_admin', $privileges)) @@ -687,11 +690,11 @@ function view_user_shifts() { 'end_time' => $_SESSION['user_shifts']['end_time'], 'type_select' => make_select($types, $_SESSION['user_shifts']['types'], "types", _("Tasks") . '1'), 'filled_select' => make_select($filled, $_SESSION['user_shifts']['filled'], "filled", _("Occupancy")), - 'task_notice' => '1' . _("The tasks shown here are influenced by the preferences you defined in your settings! Description of the jobs."), + 'task_notice' => '1' . _("The tasks shown here are influenced by the preferences you defined in your settings!") . " " . _("Description of the jobs.") . "", 'new_style_checkbox' => '', 'shifts_table' => $shifts_table, - 'ical_text' => sprintf(_("Export of shown shifts. iCal format or JSON format available (please keep secret, otherwise reset the api key)."), page_link_to_absolute('ical') . '&key=' . $user['api_key'], page_link_to_absolute('shifts_json_export') . '&key=' . $user['api_key'], page_link_to('user_myshifts') . '&reset'), - 'filter' => _("Filter") + 'ical_text' => '
' . _("iCal export") . '
' . sprintf(_("Export of shown shifts. iCal format or JSON format available (please keep secret, otherwise reset the api key)."), page_link_to_absolute('ical') . '&key=' . $user['api_key'], page_link_to_absolute('shifts_json_export') . '&key=' . $user['api_key'], page_link_to('user_myshifts') . '&reset') . '
', + 'filter' => _("Filter") )); } diff --git a/public/css/base.css b/public/css/base.css index a08042fd..1088582a 100644 --- a/public/css/base.css +++ b/public/css/base.css @@ -336,14 +336,14 @@ tr:hover .hidden { text-decoration: line-through; } -.spinner a { +.form .form_input.spinner a { background: #f0f0f0; border: 1px solid #888; padding: 1px 5px; text-decoration: none; } -.spinner input { +.form .form_input.spinner input { border: 1px solid #888; border-left: none; border-right: none; diff --git a/templates/admin_shifts_angel_types.html b/templates/admin_shifts_angel_types.html index 04e31c81..9b54fb89 100644 --- a/templates/admin_shifts_angel_types.html +++ b/templates/admin_shifts_angel_types.html @@ -1,8 +1,8 @@ --