summaryrefslogtreecommitdiff
path: root/includes/view
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-12-30 12:07:10 +0100
committermsquare <msquare@notrademark.de>2017-12-30 12:07:10 +0100
commitc961269bb718cfc5b5889af88fd12bfc86563d09 (patch)
treee357a3571b7a3472cfaba2887fb1fffaa6d98dd9 /includes/view
parentd66dc43aecf10e53acded391c196752444f9d70e (diff)
better hour formatting
Diffstat (limited to 'includes/view')
-rw-r--r--includes/view/PublicDashboard_view.php2
-rw-r--r--includes/view/User_view.php10
2 files changed, 6 insertions, 6 deletions
diff --git a/includes/view/PublicDashboard_view.php b/includes/view/PublicDashboard_view.php
index 83cf0e5f..6fef8f54 100644
--- a/includes/view/PublicDashboard_view.php
+++ b/includes/view/PublicDashboard_view.php
@@ -68,7 +68,7 @@ function public_dashboard_view($stats, $free_shifts)
function public_dashboard_shift_render($shift)
{
$panel_body = glyph('time') . $shift['start'] . ' - ' . $shift['end'];
- $panel_body .= ' (' . $shift['duration'] . ' h)';
+ $panel_body .= ' (' . $shift['duration'] . '&nbsp;h)';
$panel_body .= '<br>' . glyph('tasks') . $shift['shifttype_name'];
if (!empty($shift['title'])) {
diff --git a/includes/view/User_view.php b/includes/view/User_view.php
index 4dc78f05..745bc6d5 100644
--- a/includes/view/User_view.php
+++ b/includes/view/User_view.php
@@ -356,7 +356,7 @@ function User_view_myshift($shift, $user_source, $its_me)
. glyph('time') . date('H:i', $shift['start'])
. ' - '
. date('H:i', $shift['end']),
- 'duration' => sprintf('%.2f', round(($shift['end'] - $shift['start']) / 3600, 2)) . ' h',
+ 'duration' => sprintf('%.2f', ($shift['end'] - $shift['start']) / 3600) . '&nbsp;h',
'room' => Room_name_render($shift),
'shift_info' => $shift_info,
'comment' => ''
@@ -368,7 +368,7 @@ function User_view_myshift($shift, $user_source, $its_me)
if ($shift['freeloaded']) {
$myshift['duration'] = '<p class="text-danger">'
- . round(-($shift['end'] - $shift['start']) / 3600 * 2, 2) . ' h'
+ . round(-($shift['end'] - $shift['start']) / 3600 * 2, 2) . '&nbsp;h'
. '</p>';
if (in_array('user_shifts_admin', $privileges)) {
$myshift['comment'] .= '<br />'
@@ -431,7 +431,7 @@ function User_view_myshifts($shifts, $user_source, $its_me, $tshirt_score, $tshi
ksort($myshifts_table);
$myshifts_table[] = [
'date' => '<b>' . _('Sum:') . '</b>',
- 'duration' => '<b>' . sprintf('%.2f', round($timesum / 3600, 2)) . ' h</b>',
+ 'duration' => '<b>' . sprintf('%.2f', round($timesum / 3600, 2)) . '&nbsp;h</b>',
'room' => '',
'shift_info' => '',
'comment' => '',
@@ -440,7 +440,7 @@ function User_view_myshifts($shifts, $user_source, $its_me, $tshirt_score, $tshi
if (config('enable_tshirt_size', false) && ($its_me || $tshirt_admin)) {
$myshifts_table[] = [
'date' => '<b>' . _('Your t-shirt score') . '&trade;:</b>',
- 'duration' => '<b>' . sprintf('%.2f', $tshirt_score) . ' h</b>',
+ 'duration' => '<b>' . $tshirt_score . '</b>',
'room' => '',
'shift_info' => '',
'comment' => '',
@@ -475,7 +475,7 @@ function User_view_worklog($worklog, $admin_user_worklog_privilege) {
return [
'date' => glyph('calendar') . date('Y-m-d', $worklog['work_timestamp']),
- 'duration' => '<b>' . sprintf('%.2f', $worklog['work_hours']) . ' h</b>',
+ 'duration' => '<b>' . sprintf('%.2f', $worklog['work_hours']) . '</b>',
'room' => '',
'shift_info' => _('Work log entry'),
'comment' => $worklog['comment'] . '<br>'