WIP Debootstrapify
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user