Skip to content
Snippets Groups Projects
Commit 3c495ecc authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Correction du problème d'affichage des plafonds

parent 13cc1019
No related branches found
No related tags found
No related merge requests found
......@@ -71,7 +71,7 @@ class PlafondsViewHelper extends AbstractHtmlElement
];
$attrs = [
'class' => 'plafonds alert alert-info',
'class' => 'plafonds',
'data-url' => $this->getView()->url('plafond/plafonds', $params),
];
......@@ -85,18 +85,19 @@ class PlafondsViewHelper extends AbstractHtmlElement
public function affichage(): string
{
if (empty($this->plafonds)) {
return '';
}
$aff = false;
$html = $this->getView()->tag('h4')->text('Plafonds');
foreach ($this->plafonds as $plafond) {
if ($plafond->getHeures() > 0) {
$html .= $this->affichagePlafond($plafond);
$aff = true;
}
}
return $html;
if (!$aff) return '';
return $this->getView()->tag('div', ['class' => 'alert alert-info'])->html($html);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment