diff options
author | leaneb <lea-e@bluewin.ch> | 2016-11-26 11:39:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-26 11:39:47 +0100 |
commit | e1cc80ec411d63a4a309fa76a53776c80c10e6f7 (patch) | |
tree | 01753d802435861ebd7c0624bb7050cf24e8c24d /includes/view/Shifts_view.php | |
parent | 67df8da061f74322863354490409666eb87935b0 (diff) | |
parent | 561e8ec36c50b2ace9fe7352dfb4e11f57d0e82e (diff) |
Merge pull request #2 from engelsystem/master
Merge Changes from esys Master to own Repo
Diffstat (limited to 'includes/view/Shifts_view.php')
-rw-r--r-- | includes/view/Shifts_view.php | 6 |
1 files changed, 4 insertions, 2 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', [ '<h4>' . _('Location') . '</h4>', - '<p class="lead">' . glyph('map-marker') . $room['Name'] . '</p>' + '<p class="lead">' . Room_name_render($room) . '</p>' ]) ]), div('row', [ @@ -113,7 +113,9 @@ function Shift_view_render_needed_angeltype($needed_angeltype, $angeltypes, $shi $needed_angels .= '<div class="pull-right">' . Shift_signup_button_render($shift, $angeltypes[$needed_angeltype['TID']]) . '</div>'; $needed_angels .= '<h3>' . AngelType_name_render($angeltypes[$needed_angeltype['TID']]) . '</h3>'; - $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) { |