Commit b33c26ad authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Finalisation affichage plafonds

parent c2f6a4fb
Loading
Loading
Loading
Loading
+19 −5
Changes for module/Plafond/src/View/Helper/PlafondsViewHelper.php: 19 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -98,22 +98,28 @@ class PlafondsViewHelper extends AbstractHtmlElement
    {
        $t = $this->getView()->tag();

        $html = $t('div', ['class' => 'col-md-8'])->html(
            $plafond->getMessage()
            . ' '
            . $t('span', ['class' => 'label label-info'])->text('n° ' . $plafond->getNumero())
        );
        $labAttrs = ['class' => ['label']];
        if ($plafond->isBloquant()) {
            $labAttrs['class'][] = 'label-danger';
            $labAttrs['title']   = 'Plafond bloquant';
        } else {
            $labAttrs['class'][] = 'label-info';
            $labAttrs['title']   = 'Plafond informatif';
        }


        $text = '';

        $max = $plafond->getPlafond() + $plafond->getDerogation();
        if ($plafond->getHeures() >= $max) {
            $max = $plafond->getHeures();
            if ($plafond->getHeures() > 0) {
                if ($plafond->getPlafond() == 0) {
                    $text = floatToString($plafond->getHeures()) . 'h pour aucune autorisée';
                } else {
                    $text = floatToString($plafond->getHeures()) . 'h pour ' . floatToString($plafond->getPlafond()) . ' max.';
                }
            }

            if ($plafond->isBloquant()) {
                $color = 'danger';
@@ -143,6 +149,8 @@ class PlafondsViewHelper extends AbstractHtmlElement
            }
        }

        $html = '';

        $html .= $t('div', ['class' => 'col-md-4'])->html(
            $t('div', [
                'class' => 'progress',
@@ -158,6 +166,12 @@ class PlafondsViewHelper extends AbstractHtmlElement
            )
        );

        $html .= $t('div', ['class' => 'col-md-8'])->html(
            $plafond->getMessage()
            . ' '
            . $t('span', $labAttrs)->text('n° ' . $plafond->getNumero())
        );

        return $t('div', ['class' => 'row plafond'])->html($html);
    }
}
 No newline at end of file
+4 −0
Changes for public/css/app.css: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -889,5 +889,9 @@ form.statut fieldset legend {

/* Plafonds */
.plafonds .plafond .progress {
  margin-bottom: 0px;
}

.plafonds .plafond {
    margin-bottom: 10px;
}