parent
1af6b8cf20
commit
e4bd324801
|
@ -21,12 +21,12 @@ function mail_shift_change($old_shift, $new_shift) {
|
|||
}
|
||||
|
||||
if ($old_shift["start"] != $new_shift["start"]) {
|
||||
$message .= sprintf(_("* Shift Start changed from %s to %s"), date("y-m-d H:i", $old_shift["start"]), date("y-m-d H:i", $new_shift["start"])) . "\n";
|
||||
$message .= sprintf(_("* Shift Start changed from %s to %s"), date("Y-m-d H:i", $old_shift["start"]), date("Y-m-d H:i", $new_shift["start"])) . "\n";
|
||||
$noticable_changes = true;
|
||||
}
|
||||
|
||||
if ($old_shift["end"] != $new_shift["end"]) {
|
||||
$message .= sprintf(_("* Shift End changed from %s to %s"), date("y-m-d H:i", $old_shift["end"]), date("y-m-d H:i", $new_shift["end"])) . "\n";
|
||||
$message .= sprintf(_("* Shift End changed from %s to %s"), date("Y-m-d H:i", $old_shift["end"]), date("Y-m-d H:i", $new_shift["end"])) . "\n";
|
||||
$noticable_changes = true;
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ function mail_shift_change($old_shift, $new_shift) {
|
|||
|
||||
$message .= $new_shift["name"] . "\n";
|
||||
$message .= $new_shift["title"] . "\n";
|
||||
$message .= date("y-m-d H:i", $new_shift["start"]) . " - " . date("H:i", $new_shift["end"]) . "\n";
|
||||
$message .= date("Y-m-d H:i", $new_shift["start"]) . " - " . date("H:i", $new_shift["end"]) . "\n";
|
||||
$message .= $new_room["Name"] . "\n";
|
||||
|
||||
foreach ($users as $user)
|
||||
|
@ -61,7 +61,7 @@ function mail_shift_delete($shift) {
|
|||
|
||||
$message .= $shift["name"] . "\n";
|
||||
$message .= $new_shift["title"] . "\n";
|
||||
$message .= date("y-m-d H:i", $shift["start"]) . " - " . date("H:i", $shift["end"]) . "\n";
|
||||
$message .= date("Y-m-d H:i", $shift["start"]) . " - " . date("H:i", $shift["end"]) . "\n";
|
||||
$message .= $room["Name"] . "\n";
|
||||
|
||||
foreach ($users as $user)
|
||||
|
@ -76,7 +76,7 @@ function mail_shift_assign($user, $shift) {
|
|||
$message = _("You have been assigned to a Shift:") . "\n";
|
||||
$message .= $shift["name"] . "\n";
|
||||
$message .= $shift["title"] . "\n";
|
||||
$message .= date("y-m-d H:i", $shift["start"]) . " - " . date("H:i", $shift["end"]) . "\n";
|
||||
$message .= date("Y-m-d H:i", $shift["start"]) . " - " . date("H:i", $shift["end"]) . "\n";
|
||||
$message .= $room["Name"] . "\n";
|
||||
|
||||
engelsystem_email_to_user($user, '[engelsystem] ' . _("Assigned to Shift"), $message, true);
|
||||
|
@ -90,7 +90,7 @@ function mail_shift_removed($user, $shift) {
|
|||
$message = _("You have been removed from a Shift:") . "\n";
|
||||
$message .= $shift["name"] . "\n";
|
||||
$message .= $shift["title"] . "\n";
|
||||
$message .= date("y-m-d H:i", $shift["start"]) . " - " . date("H:i", $shift["end"]) . "\n";
|
||||
$message .= date("Y-m-d H:i", $shift["start"]) . " - " . date("H:i", $shift["end"]) . "\n";
|
||||
$message .= $room["Name"] . "\n";
|
||||
|
||||
engelsystem_email_to_user($user, '[engelsystem] ' . _("Removed from Shift"), $message, true);
|
||||
|
|
|
@ -68,7 +68,7 @@ function user_myshifts() {
|
|||
if ($result === false)
|
||||
engelsystem_error('Unable to update shift entr.');
|
||||
|
||||
engelsystem_log("Updated " . User_Nick_render($user_source) . "'s shift " . $shift['name'] . " from " . date("y-m-d H:i", $shift['start']) . " to " . date("y-m-d H:i", $shift['end']) . " with comment " . $comment . ". Freeloaded: " . ($freeloaded ? "YES Comment: " . $freeload_comment : "NO"));
|
||||
engelsystem_log("Updated " . User_Nick_render($user_source) . "'s shift " . $shift['name'] . " from " . date("Y-m-d H:i", $shift['start']) . " to " . date("Y-m-d H:i", $shift['end']) . " with comment " . $comment . ". Freeloaded: " . ($freeloaded ? "YES Comment: " . $freeload_comment : "NO"));
|
||||
success(_("Shift saved."));
|
||||
redirect(page_link_to('users') . '&action=view&user_id=' . $shifts_user['UID']);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ function user_myshifts() {
|
|||
$angeltype = AngelType($shift['TID']);
|
||||
$shifttype = ShiftType($shift['shifttype_id']);
|
||||
|
||||
engelsystem_log("Deleted own shift: " . $shifttype['name'] . " at " . $room['Name'] . " from " . date("y-m-d H:i", $shift['start']) . " to " . date("y-m-d H:i", $shift['end']) . " as " . $angeltype['name']);
|
||||
engelsystem_log("Deleted own shift: " . $shifttype['name'] . " at " . $room['Name'] . " from " . date("Y-m-d H:i", $shift['start']) . " to " . date("Y-m-d H:i", $shift['end']) . " as " . $angeltype['name']);
|
||||
success(_("You have been signed off from the shift."));
|
||||
} else
|
||||
error(_("It's too late to sign yourself off the shift. If neccessary, ask the dispatcher to do so."));
|
||||
|
|
|
@ -39,7 +39,7 @@ function user_shifts() {
|
|||
if ($result === false)
|
||||
engelsystem_error('Unable to delete shift entry.');
|
||||
|
||||
engelsystem_log("Deleted " . User_Nick_render($shift_entry_source) . "'s shift: " . $shift_entry_source['name'] . " at " . $shift_entry_source['Name'] . " from " . date("y-m-d H:i", $shift_entry_source['start']) . " to " . date("y-m-d H:i", $shift_entry_source['end']) . " as " . $shift_entry_source['angel_type']);
|
||||
engelsystem_log("Deleted " . User_Nick_render($shift_entry_source) . "'s shift: " . $shift_entry_source['name'] . " at " . $shift_entry_source['Name'] . " from " . date("Y-m-d H:i", $shift_entry_source['start']) . " to " . date("Y-m-d H:i", $shift_entry_source['end']) . " as " . $shift_entry_source['angel_type']);
|
||||
success(_("Shift entry deleted."));
|
||||
} else
|
||||
error(_("Entry not found."));
|
||||
|
@ -162,7 +162,7 @@ function user_shifts() {
|
|||
$needed_angel_types_info[] = $angel_types[$type_id]['name'] . ": " . $count;
|
||||
}
|
||||
|
||||
engelsystem_log("Updated shift '" . $name . "' from " . date("y-m-d H:i", $start) . " to " . date("y-m-d H:i", $end) . " with angel types " . join(", ", $needed_angel_types_info));
|
||||
engelsystem_log("Updated shift '" . $name . "' from " . date("Y-m-d H:i", $start) . " to " . date("Y-m-d H:i", $end) . " with angel types " . join(", ", $needed_angel_types_info));
|
||||
success(_("Shift updated."));
|
||||
|
||||
redirect(shift_link([
|
||||
|
@ -294,7 +294,7 @@ function user_shifts() {
|
|||
sql_query("INSERT INTO `UserAngelTypes` (`user_id`, `angeltype_id`) VALUES ('" . sql_escape($user_id) . "', '" . sql_escape($selected_type_id) . "')");
|
||||
|
||||
$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']));
|
||||
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(_("You are subscribed. Thank you!") . ' <a href="' . page_link_to('user_myshifts') . '">' . _("My shifts") . ' »</a>');
|
||||
redirect(shift_link($shift));
|
||||
}
|
||||
|
@ -530,7 +530,7 @@ function view_user_shifts() {
|
|||
$thistime = $first + ($i * 15 * 60);
|
||||
if ($thistime % (24 * 60 * 60) == 23 * 60 * 60 && $endtime - $starttime > 24 * 60 * 60) {
|
||||
$shifts_table .= "<tr class=\"row-day\"><th class=\"row-header\">";
|
||||
$shifts_table .= date('y-m-d<b\r />H:i', $thistime);
|
||||
$shifts_table .= date('Y-m-d<b\r />H:i', $thistime);
|
||||
} elseif ($thistime % (60 * 60) == 0) {
|
||||
$shifts_table .= "<tr class=\"row-hour\"><th>";
|
||||
$shifts_table .= date("H:i", $thistime);
|
||||
|
|
|
@ -87,7 +87,7 @@ function Shift_view($shift, $shifttype, $room, $shift_admin, $angeltypes_source,
|
|||
div('col-sm-3 col-xs-6', [
|
||||
'<h4>' . _('Start') . '</h4>',
|
||||
'<p class="lead' . (time() >= $shift['start'] ? ' text-success' : '') . '">',
|
||||
glyph('calendar') . date('y-m-d', $shift['start']),
|
||||
glyph('calendar') . date('Y-m-d', $shift['start']),
|
||||
'<br />',
|
||||
glyph('time') . date('H:i', $shift['start']),
|
||||
'</p>'
|
||||
|
@ -95,7 +95,7 @@ function Shift_view($shift, $shifttype, $room, $shift_admin, $angeltypes_source,
|
|||
div('col-sm-3 col-xs-6', [
|
||||
'<h4>' . _('End') . '</h4>',
|
||||
'<p class="lead' . (time() >= $shift['end'] ? ' text-success' : '') . '">',
|
||||
glyph('calendar') . date('y-m-d', $shift['end']),
|
||||
glyph('calendar') . date('Y-m-d', $shift['end']),
|
||||
'<br />',
|
||||
glyph('time') . date('H:i', $shift['end']),
|
||||
'</p>'
|
||||
|
|
Loading…
Reference in New Issue