WIP Debootstrapify

This commit is contained in:
Björn Fromme
2021-08-04 16:12:37 +02:00
parent 8772df6be1
commit acbc178819
13 changed files with 120 additions and 109 deletions
@@ -78,7 +78,7 @@ class ContingentViewHelper extends AbstractViewHelper
}
$now = new \DateTime('now');
if ($now > $day->getBegin()) {
$class = [ 'text-muted' ];
$class = [ 'text-gray-400' ];
return static::getHtml($class, $day->format('d'));
}
$contingents = $events->find($day);
@@ -132,20 +132,20 @@ class ContingentViewHelper extends AbstractViewHelper
*/
protected static function getTransientLabelClasses($levelFrom, $levelTo = null)
{
$classes = [ 'label' ];
$classes = [ 'block p-1 leading-none text-sm text-white' ];
if ($levelFrom === static::LEVEL_RED) {
$class = 'label-danger';
$class = 'full';
} elseif ($levelFrom === static::LEVEL_YELLOW) {
$class = 'label-warning';
$class = 'partial';
} else {
$class = 'label-success';
$class = 'free';
}
if ($levelTo === static::LEVEL_RED) {
$class .= '-danger';
$class .= '-to-full';
} elseif ($levelTo === static::LEVEL_YELLOW) {
$class .= '-warning';
$class .= '-to-partial';
} elseif ($levelTo !== null) {
$class .= '-success';
$class .= '-to-free';
}
$classes[] = $class;
return $classes;
@@ -162,7 +162,7 @@ class ContingentViewHelper extends AbstractViewHelper
if ($percentage <= 20 || $status === Contingent::STATUS_BLOCKED) {
return static::LEVEL_RED;
}
if (($percentage > 20 && $percentage <= 80) || $status === Contingent::STATUS_ONREQUEST) {
if ($percentage <= 80 || $status === Contingent::STATUS_ONREQUEST) {
return static::LEVEL_YELLOW;
}
return static::LEVEL_GREEN;