Replaced labels with badges

This commit is contained in:
Igor Scheller 2021-07-23 15:37:11 +02:00 committed by Michael Weimann
parent 36ba619d5a
commit 08790b0b2e
No known key found for this signature in database
GPG Key ID: 34F0524D4DA694A1
2 changed files with 7 additions and 7 deletions

View File

@ -82,9 +82,9 @@ function mute($text)
* @param string $class default, primary, info, success, warning, danger * @param string $class default, primary, info, success, warning, danger
* @return string * @return string
*/ */
function label($content, $class = 'default') function badge($content, $class = 'default')
{ {
return '<span class="label label-' . $class . '">' . $content . '</span>'; return '<span class="badge rounded-pill bg-' . $class . '">' . $content . '</span>';
} }
/** /**

View File

@ -312,11 +312,11 @@ class ShiftCalendarRenderer
private function renderLegend() private function renderLegend()
{ {
return div('legend', [ return div('legend', [
label(__('Your shift'), 'primary'), badge(__('Your shift'), 'primary'),
label(__('Help needed'), 'danger'), badge(__('Help needed'), 'danger'),
label(__('Other angeltype needed / collides with my shifts'), 'warning'), badge(__('Other angeltype needed / collides with my shifts'), 'warning'),
label(__('Shift is full'), 'success'), badge(__('Shift is full'), 'success'),
label(__('Shift running/ended or user not arrived/allowed'), 'default') badge(__('Shift running/ended or user not arrived/allowed'), 'default')
]); ]);
} }
} }