diff options
Diffstat (limited to 'includes/view')
-rw-r--r-- | includes/view/AngelTypes_view.php | 6 | ||||
-rw-r--r-- | includes/view/ShiftTypes_view.php | 1 | ||||
-rw-r--r-- | includes/view/Shifts_view.php | 6 |
3 files changed, 8 insertions, 5 deletions
diff --git a/includes/view/AngelTypes_view.php b/includes/view/AngelTypes_view.php index a48f8d4c..04c0e286 100644 --- a/includes/view/AngelTypes_view.php +++ b/includes/view/AngelTypes_view.php @@ -49,7 +49,7 @@ function AngelType_delete_view($angeltype) { /** * Render angeltype edit form. - * + * * @param Angeltype $angeltype * The angeltype to edit * @param boolean $supporter_mode @@ -193,8 +193,8 @@ function AngelType_view_table_headers($angeltype, $supporter, $admin_angeltypes) */ function AngelType_view($angeltype, $members, $user_angeltype, $admin_user_angeltypes, $admin_angeltypes, $supporter, $user_driver_license, $user) { $page = [ - msg(), - AngelType_view_buttons($angeltype, $user_angeltype, $admin_angeltypes, $supporter, $user_driver_license, $user) + AngelType_view_buttons($angeltype, $user_angeltype, $admin_angeltypes, $supporter, $user_driver_license, $user), + msg() ]; $page[] = '<h3>' . _("Description") . '</h3>'; diff --git a/includes/view/ShiftTypes_view.php b/includes/view/ShiftTypes_view.php index 163d6646..3e4cccc6 100644 --- a/includes/view/ShiftTypes_view.php +++ b/includes/view/ShiftTypes_view.php @@ -55,6 +55,7 @@ function ShiftType_view($shifttype, $angeltype) { button(page_link_to('shifttypes') . '&action=edit&shifttype_id=' . $shifttype['id'], _('edit'), 'edit'), button(page_link_to('shifttypes') . '&action=delete&shifttype_id=' . $shifttype['id'], _('delete'), 'delete') ]), + heading(_("Description"), 2), $parsedown->parse($shifttype['description']) ]); } 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) { |