diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php
index 007a1681..caa92cce 100644
--- a/includes/pages/user_myshifts.php
+++ b/includes/pages/user_myshifts.php
@@ -71,6 +71,7 @@ function user_myshifts() {
$shifts = sql_select("SELECT * FROM `ShiftEntry` JOIN `Shifts` ON (`ShiftEntry`.`SID` = `Shifts`.`SID`) JOIN `Room` ON (`Shifts`.`RID` = `Room`.`RID`) WHERE `UID`=" . sql_escape($shifts_user['UID']) . " ORDER BY `start`");
$html = "";
+ $timesum = 0;
foreach ($shifts as $shift) {
if (time() > $shift['end'])
$html .= '
';
@@ -91,6 +92,7 @@ function user_myshifts() {
$shift_entries[] = $user_source['Nick'];
}
$html .= join(", ", $shift_entries);
+ $timesum += ($shift['end'] - $shift['start']) / (60*60);
}
$html .= '';
@@ -109,6 +111,7 @@ function user_myshifts() {
return msg().template_render('../templates/user_myshifts.html', array (
'intro' => sprintf(Get_Text('pub_myshifts_intro'), $LETZTES_AUSTRAGEN),
'shifts' => $html,
+ 'time_sum' => $timesum,
'msg' => $msg,
'ical_text' => sprintf(Get_Text('inc_schicht_ical_text'),
page_link_to_absolute('ical') . '&key=' . $shifts_user['ical_key'],
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index 7db94247..69c6b27f 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -262,8 +262,7 @@ function user_shifts() {
}
return template_render('../templates/user_shifts_add.html', array (
- //'date' => date("Y-m-d H:i", $shift['start']) . ', ' . date("H:i", $shift['end'] - $shift['start']) . 'h',
- 'date' => date("Y-m-d H:i", $shift['start']) . ', ' . shift_length($shift),
+ 'date' => date("Y-m-d H:i", $shift['start']) . ' – ' . date('Y-m-d H:i', $shift['end']) . ' (' . shift_length($shift) . ')',
'title' => $shift['name'],
'location' => $shift['Name'],
'angel' => $user_text,
diff --git a/includes/sys_menu.php b/includes/sys_menu.php
index 2ddc9b10..7eeaa70a 100644
--- a/includes/sys_menu.php
+++ b/includes/sys_menu.php
@@ -121,8 +121,8 @@ function make_langselect() {
else
$URL = $_SERVER["REQUEST_URI"] . "?SetLanguage=";
- $html = '';
- $html .= '
';
+ $html = '';
+ $html .= '
';
return '';
}
?>
diff --git a/templates/user_myshifts.html b/templates/user_myshifts.html
index 178ad684..fdb1631a 100644
--- a/templates/user_myshifts.html
+++ b/templates/user_myshifts.html
@@ -28,6 +28,16 @@
%shifts%
+
+
+ Summe |
+ %time_sum% Stunden |
+ |
+ |
+ |
+ |
+
+
iCal Export