From 98aac2a429f14d58bc6017195ff4c64209e325b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20H=C3=A4usler?= Date: Wed, 2 Jan 2013 14:17:34 +0100 Subject: [PATCH] brought back hour sum on my shifts --- includes/pages/user_myshifts.php | 4 ++-- public/css/base.css | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php index 346a74c0..4fec4872 100644 --- a/includes/pages/user_myshifts.php +++ b/includes/pages/user_myshifts.php @@ -101,8 +101,8 @@ function user_myshifts() { $timesum += $shift['end'] - $shift['start']; $myshifts_table[] = $myshift; } - if (count($shifts) == 0) - $html = '' . ucfirst(Get_Text('none')) . '...' . sprintf(Get_Text('pub_myshifts_goto_shifts'), page_link_to('user_shifts')) . ''; + if(count($myshifts_table) > 0) + $myshifts_table[] = array('date' => "Summe:", 'time' => "" . round($timesum / (60*60), 1) . " h", 'room' => "", 'shift_info' => "", 'comment' => "", 'actions' => ""); return page(array( msg(), diff --git a/public/css/base.css b/public/css/base.css index 9b6a03bb..8576f074 100644 --- a/public/css/base.css +++ b/public/css/base.css @@ -432,3 +432,7 @@ tr:hover .hidden { td .entries img { vertical-align: bottom; } + +td.time { + text-align: right; +}