From 4f6db20ae479576b221bc5269ef6734e9c869c6a Mon Sep 17 00:00:00 2001 From: msquare Date: Fri, 25 Nov 2016 13:03:25 +0100 Subject: [PATCH] fix shift view bars --- includes/view/Shifts_view.php | 6 ++++-- public/css/theme4.css | 4 +++- themes/theme4.less | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/includes/view/Shifts_view.php b/includes/view/Shifts_view.php index 885d1ad9..fbd71d54 100644 --- a/includes/view/Shifts_view.php +++ b/includes/view/Shifts_view.php @@ -81,7 +81,7 @@ function Shift_view($shift, $shifttype, $room, $angeltypes_source, ShiftSignupSt ]), div('col-sm-3 col-xs-6', [ '

' . _('Location') . '

', - '

' . glyph('map-marker') . $room['Name'] . '

' + '

' . Room_name_render($room) . '

' ]) ]), div('row', [ @@ -113,7 +113,9 @@ function Shift_view_render_needed_angeltype($needed_angeltype, $angeltypes, $shi $needed_angels .= '
' . Shift_signup_button_render($shift, $angeltypes[$needed_angeltype['TID']]) . '
'; $needed_angels .= '

' . AngelType_name_render($angeltypes[$needed_angeltype['TID']]) . '

'; - $needed_angels .= progress_bar(0, $needed_angeltype['count'], min($needed_angeltype['taken'], $needed_angeltype['count']), $class, $needed_angeltype['taken'] . ' / ' . $needed_angeltype['count']); + $bar_max = max($needed_angeltype['count']*10, $needed_angeltype['taken']*10, 10); + $bar_value = max(1, $needed_angeltype['taken'] * 10); + $needed_angels .= progress_bar(0, $bar_max, $bar_value, $class, $needed_angeltype['taken'] . ' / ' . $needed_angeltype['count']); $angels = []; foreach ($shift['ShiftEntry'] as $shift_entry) { diff --git a/public/css/theme4.css b/public/css/theme4.css index f4ff0d7b..4e641efb 100644 --- a/public/css/theme4.css +++ b/public/css/theme4.css @@ -7027,6 +7027,8 @@ a.thumbnail.active { color: #fff; } .label-warning, -.label-success { +.label-success, +.progress-bar-warning, +.progress-bar-success { color: #222222; } diff --git a/themes/theme4.less b/themes/theme4.less index 6e221bc1..750a35cc 100644 --- a/themes/theme4.less +++ b/themes/theme4.less @@ -1046,6 +1046,6 @@ a.thumbnail.active { } } -.label-warning, .label-success { +.label-warning, .label-success, .progress-bar-warning, .progress-bar-success { color: @gray-darker; }