Loading public/css/unicaen-etat.css +9 −0 Original line number Diff line number Diff line Loading @@ -20,3 +20,12 @@ border-radius: 0 0.25rem 0.25rem 0; height: 1.5rem; } .etat-solo { border-radius: 0.25rem; width:4rem; color:white; display: inline-block; text-align: center; height: 1.75rem; } No newline at end of file src/UnicaenEtat/View/Helper/EtatInstanceViewHelper.php +4 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,10 @@ class EtatInstanceViewHelper extends AbstractHelper * @param EtatInstance $instance * @param array $options * @return string|Partial * * -- OPTIONS -- * 'display-categorie' affiche la partie catégorie default:true; * 'display-type' affiche la partie type default:true; */ public function __invoke(?EtatInstance $instance, array $options = []) { Loading src/UnicaenEtat/View/Helper/EtatTypeViewHelper.php +4 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,10 @@ class EtatTypeViewHelper extends AbstractHelper * @param EtatType $type * @param array $options * @return string|Partial * * -- OPTIONS -- * 'display-categorie' affiche la partie catégorie default:true; * 'display-type' affiche la partie type default:true; */ public function __invoke(?EtatType $type, array $options = []) { Loading src/UnicaenEtat/View/Helper/partial/etat-instance.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -41,5 +41,5 @@ else $type = null; </div> </div> <?php else : ?> <?php echo $this->etattype($type); ?> <?php echo $this->etattype($type, $options); ?> <?php endif; ?> src/UnicaenEtat/View/Helper/partial/etat-type.phtml +16 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,9 @@ use UnicaenEtat\Entity\Db\EtatType; * @var array $options */ $displayCategorie = (isset($options['display-categorie'])?$options['display-categorie']!==false:true); $displayType = (isset($options['display-type'])?$options['display-type']!==false:true); $type_couleur = ($type)?$type->getCouleur():"gray"; $type_icone = ($type)?$type->getIcone():"white"; $type_libelle = ($type)?$type->getLibelle():"Vide"; Loading @@ -16,6 +19,7 @@ $categorie_icone = ($type AND $type->getCategorie())?$type->getCategorie()->getI $categorie_libelle = ($type AND $type->getCategorie())?$type->getCategorie()->getLibelle():"Vide"; ?> <?php if ($displayType && $displayCategorie) : ?> <div style="display: inline-block;min-width: 6rem;"> <div class="etat-leftpart" title="<?php echo str_replace("'", "", $type_libelle); ?>" style="background: <?php echo $type_couleur; ?>;"> <span class="<?php echo ($type_icone)?:"fas fa-question"; ?>" aria-hidden="true"></span> Loading @@ -24,3 +28,15 @@ $categorie_libelle = ($type AND $type->getCategorie())?$type->getCategorie()->ge <span class="<?php echo ($categorie_icone)?:"fas fa-question"; ?>" aria-hidden="true"></span> </div> </div> <?php else : ?> <?php if ($displayType) : ?> <div class="etat-solo" style="display: inline-block; background: <?php echo $type_couleur; ?>" title="<?php echo str_replace("'", "", $type_libelle); ?>"> <span class="<?php echo ($type_icone)?:"fas fa-question"; ?>" aria-hidden="true"></span> </div> <?php endif; ?> <?php if ($displayCategorie) : ?> <div class="etat-solo" style="display: inline-block; background: <?php echo $categorie_couleur; ?>" title="<?php echo str_replace("'", "", $categorie_libelle); ?>"> <span class="<?php echo ($categorie_icone)?:"fas fa-question"; ?>" aria-hidden="true"></span> </div> <?php endif; ?> <?php endif; ?> Loading
public/css/unicaen-etat.css +9 −0 Original line number Diff line number Diff line Loading @@ -20,3 +20,12 @@ border-radius: 0 0.25rem 0.25rem 0; height: 1.5rem; } .etat-solo { border-radius: 0.25rem; width:4rem; color:white; display: inline-block; text-align: center; height: 1.75rem; } No newline at end of file
src/UnicaenEtat/View/Helper/EtatInstanceViewHelper.php +4 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,10 @@ class EtatInstanceViewHelper extends AbstractHelper * @param EtatInstance $instance * @param array $options * @return string|Partial * * -- OPTIONS -- * 'display-categorie' affiche la partie catégorie default:true; * 'display-type' affiche la partie type default:true; */ public function __invoke(?EtatInstance $instance, array $options = []) { Loading
src/UnicaenEtat/View/Helper/EtatTypeViewHelper.php +4 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,10 @@ class EtatTypeViewHelper extends AbstractHelper * @param EtatType $type * @param array $options * @return string|Partial * * -- OPTIONS -- * 'display-categorie' affiche la partie catégorie default:true; * 'display-type' affiche la partie type default:true; */ public function __invoke(?EtatType $type, array $options = []) { Loading
src/UnicaenEtat/View/Helper/partial/etat-instance.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -41,5 +41,5 @@ else $type = null; </div> </div> <?php else : ?> <?php echo $this->etattype($type); ?> <?php echo $this->etattype($type, $options); ?> <?php endif; ?>
src/UnicaenEtat/View/Helper/partial/etat-type.phtml +16 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,9 @@ use UnicaenEtat\Entity\Db\EtatType; * @var array $options */ $displayCategorie = (isset($options['display-categorie'])?$options['display-categorie']!==false:true); $displayType = (isset($options['display-type'])?$options['display-type']!==false:true); $type_couleur = ($type)?$type->getCouleur():"gray"; $type_icone = ($type)?$type->getIcone():"white"; $type_libelle = ($type)?$type->getLibelle():"Vide"; Loading @@ -16,6 +19,7 @@ $categorie_icone = ($type AND $type->getCategorie())?$type->getCategorie()->getI $categorie_libelle = ($type AND $type->getCategorie())?$type->getCategorie()->getLibelle():"Vide"; ?> <?php if ($displayType && $displayCategorie) : ?> <div style="display: inline-block;min-width: 6rem;"> <div class="etat-leftpart" title="<?php echo str_replace("'", "", $type_libelle); ?>" style="background: <?php echo $type_couleur; ?>;"> <span class="<?php echo ($type_icone)?:"fas fa-question"; ?>" aria-hidden="true"></span> Loading @@ -24,3 +28,15 @@ $categorie_libelle = ($type AND $type->getCategorie())?$type->getCategorie()->ge <span class="<?php echo ($categorie_icone)?:"fas fa-question"; ?>" aria-hidden="true"></span> </div> </div> <?php else : ?> <?php if ($displayType) : ?> <div class="etat-solo" style="display: inline-block; background: <?php echo $type_couleur; ?>" title="<?php echo str_replace("'", "", $type_libelle); ?>"> <span class="<?php echo ($type_icone)?:"fas fa-question"; ?>" aria-hidden="true"></span> </div> <?php endif; ?> <?php if ($displayCategorie) : ?> <div class="etat-solo" style="display: inline-block; background: <?php echo $categorie_couleur; ?>" title="<?php echo str_replace("'", "", $categorie_libelle); ?>"> <span class="<?php echo ($categorie_icone)?:"fas fa-question"; ?>" aria-hidden="true"></span> </div> <?php endif; ?> <?php endif; ?>