Commit 41dc9496 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Affichage des heures restantes tout le temps

(cherry picked from commit 2a42121d)
parent 4168c3bb
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -149,16 +149,20 @@ class PlafondsViewHelper extends AbstractHtmlElement
        }

        if (!$text) {
            if ($progression > 49) {
            $text = floatToString($plafond->getHeures()) . 'h, '
                . floatToString($max - $plafond->getHeures()) . ' dispo.';
            } elseif ($progression > 10) {
                $text = floatToString($plafond->getHeures()) . 'h';
            }
        }

        $html = '';

        if ($progression > 49) {
            $text1 = $text;
            $text2 = '';
        } else {
            $text1 = '';
            $text2 = ' ' . $text;
        }

        $html .= $t('div', ['class' => 'col-md-4'])->html(
            $t('div', [
                'class' => 'progress',
@@ -170,7 +174,7 @@ class PlafondsViewHelper extends AbstractHtmlElement
                    'aria-valuemin' => 0,
                    'aria-valuemax' => 100,
                    'style'         => 'width:' . $progression . '%',
                ])->text($text)
                ])->text($text1) . $text2
            )
        );