Commit 8b2e193a authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Pas d'affichage du bandeau des plafonds s'il n'y a rien à afficher

parent 279f8e4f
Loading
Loading
Loading
Loading
+6 −1
Changes for module/Plafond/src/View/Helper/PlafondsViewHelper.php: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -62,6 +62,8 @@ class PlafondsViewHelper extends AbstractHtmlElement

    public function render(): string
    {
        $contenu = $this->affichage();
        if (!empty($contenu)) {
            $params = [
                'perimetre'         => $this->getServicePlafond()->entityToPerimetreCode($this->entity),
                'id'                => $this->entity->getId(),
@@ -73,7 +75,10 @@ class PlafondsViewHelper extends AbstractHtmlElement
                'data-url' => $this->getView()->url('plafond/plafonds', $params),
            ];

        return $this->getView()->tag('div', $attrs)->html($this->affichage());
            return $this->getView()->tag('div', $attrs)->html($contenu);
        } else {
            return '';
        }
    }