Loading src/UnicaenIndicateur/Controller/IndexController.php +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ class IndexController extends AbstractActionController { foreach ($abonnements as $abonnement) { $indicateur = $abonnement->getIndicateur(); $data = $this->getIndicateurService()->getIndicateurData($indicateur, $perimetres); $result[$indicateur->getId()] = count($data[1]); $result[$indicateur->getId()] = isset($data[1])?count($data[1]):"Non disponible"; } return new ViewModel([ Loading view/unicaen-indicateur/index/index.phtml +24 −12 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ use UnicaenIndicateur\Entity\Db\Abonnement; use UnicaenIndicateur\Provider\Privilege\AbonnementPrivileges; use UnicaenIndicateur\Provider\Privilege\IndicateurPrivileges; /** * @see \UnicaenIndicateur\Controller\IndexController::indexAction() Loading @@ -9,8 +10,10 @@ use UnicaenIndicateur\Provider\Privilege\AbonnementPrivileges; * @var int[] $result */ $canLister = $this->isAllowed(AbonnementPrivileges::getResourceId(AbonnementPrivileges::AFFICHER_ABONNEMENT)); $canAfficher = $this->isAllowed(AbonnementPrivileges::getResourceId(AbonnementPrivileges::AFFICHER_ABONNEMENT)); $canLister = $this->isAllowed(IndicateurPrivileges::getResourceId(IndicateurPrivileges::AFFICHER_INDICATEUR)) AND $this->isAllowed(AbonnementPrivileges::getResourceId(AbonnementPrivileges::EDITER_ABONNEMENT)) ; $canAfficher = $this->isAllowed(IndicateurPrivileges::getResourceId(IndicateurPrivileges::AFFICHER_INDICATEUR)); $canDesabonnement = $this->isAllowed(AbonnementPrivileges::getResourceId(AbonnementPrivileges::DETRUIRE_ABONNEMENT)); ?> Loading @@ -21,7 +24,7 @@ $canDesabonnement = $this->isAllowed(AbonnementPrivileges::getResourceId(Abonnem <?php if ($canLister) : ?> <a href="<?php echo $this->url('mes-indicateurs/abonnement', [], [], true); ?>" class="btn btn-primary action ajax-modal" data-event="modification"> class="btn btn-primary ajax-modal" data-event="modification"> <span class="icon icon-ajouter"></span> S'abonner à un indicateur </a> Loading @@ -30,10 +33,10 @@ $canDesabonnement = $this->isAllowed(AbonnementPrivileges::getResourceId(Abonnem <table class="table table-condensed table-hover"> <thead> <tr> <th> Indicateurs</th> <th> Effectifs</th> <th> Dernière maj</th> <th> Action</th> <th class="col-md-6"> Indicateurs</th> <th class="col-md-2"> Effectifs</th> <th class="col-md-2"> Dernière maj</th> <th class="action col-md-2"> Action</th> </tr> </thead> <tbody> Loading @@ -42,16 +45,25 @@ $canDesabonnement = $this->isAllowed(AbonnementPrivileges::getResourceId(Abonnem <td> <?php echo $abonnement->getIndicateur()->getTitre(); ?> </td> <td> <?php echo $result[$abonnement->getIndicateur()->getId()]; ?> </td> <td> <?php echo $abonnement->getIndicateur()->getDernierRafraichissement()->format('d/m/Y à H:i'); ?> </td> <td> <td class="action"> <?php if ($canAfficher) : ?> <?php /** @see IndicateurController::afficherAction() */ ?> <a href="<?php echo $this->url('indicateur/afficher', ['indicateur' => $abonnement->getIndicateur()->getId()], [], true); ?>"> <span class="icon icon-voir"></span></a> <a href="<?php echo $this->url('indicateur/afficher', ['indicateur' => $abonnement->getIndicateur()->getId()], [], true); ?>" class="action secondary" > <span class="icon icon-voir"></span> Afficher l'indicateur </a> <?php endif; ?> <?php if ($canDesabonnement) : ?> <br> <?php /** @see AbonnementController::resilierAction() */ ?> <a href="<?php echo $this->url('abonnement/resilier', ['indicateur' => $abonnement->getIndicateur()->getId()], ['query' => ['retour' => $this->url('mes-indicateurs', [], [], true)]], true); ?>"> <span class="icon icon-unchecked"></span></a> <a href="<?php echo $this->url('abonnement/resilier', ['indicateur' => $abonnement->getIndicateur()->getId()], ['query' => ['retour' => $this->url('mes-indicateurs', [], [], true)]], true); ?>" class="action danger" > <span class="icon icon-unchecked"></span> Se désabonner </a> <?php endif; ?> </td> </tr> Loading Loading
src/UnicaenIndicateur/Controller/IndexController.php +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ class IndexController extends AbstractActionController { foreach ($abonnements as $abonnement) { $indicateur = $abonnement->getIndicateur(); $data = $this->getIndicateurService()->getIndicateurData($indicateur, $perimetres); $result[$indicateur->getId()] = count($data[1]); $result[$indicateur->getId()] = isset($data[1])?count($data[1]):"Non disponible"; } return new ViewModel([ Loading
view/unicaen-indicateur/index/index.phtml +24 −12 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ use UnicaenIndicateur\Entity\Db\Abonnement; use UnicaenIndicateur\Provider\Privilege\AbonnementPrivileges; use UnicaenIndicateur\Provider\Privilege\IndicateurPrivileges; /** * @see \UnicaenIndicateur\Controller\IndexController::indexAction() Loading @@ -9,8 +10,10 @@ use UnicaenIndicateur\Provider\Privilege\AbonnementPrivileges; * @var int[] $result */ $canLister = $this->isAllowed(AbonnementPrivileges::getResourceId(AbonnementPrivileges::AFFICHER_ABONNEMENT)); $canAfficher = $this->isAllowed(AbonnementPrivileges::getResourceId(AbonnementPrivileges::AFFICHER_ABONNEMENT)); $canLister = $this->isAllowed(IndicateurPrivileges::getResourceId(IndicateurPrivileges::AFFICHER_INDICATEUR)) AND $this->isAllowed(AbonnementPrivileges::getResourceId(AbonnementPrivileges::EDITER_ABONNEMENT)) ; $canAfficher = $this->isAllowed(IndicateurPrivileges::getResourceId(IndicateurPrivileges::AFFICHER_INDICATEUR)); $canDesabonnement = $this->isAllowed(AbonnementPrivileges::getResourceId(AbonnementPrivileges::DETRUIRE_ABONNEMENT)); ?> Loading @@ -21,7 +24,7 @@ $canDesabonnement = $this->isAllowed(AbonnementPrivileges::getResourceId(Abonnem <?php if ($canLister) : ?> <a href="<?php echo $this->url('mes-indicateurs/abonnement', [], [], true); ?>" class="btn btn-primary action ajax-modal" data-event="modification"> class="btn btn-primary ajax-modal" data-event="modification"> <span class="icon icon-ajouter"></span> S'abonner à un indicateur </a> Loading @@ -30,10 +33,10 @@ $canDesabonnement = $this->isAllowed(AbonnementPrivileges::getResourceId(Abonnem <table class="table table-condensed table-hover"> <thead> <tr> <th> Indicateurs</th> <th> Effectifs</th> <th> Dernière maj</th> <th> Action</th> <th class="col-md-6"> Indicateurs</th> <th class="col-md-2"> Effectifs</th> <th class="col-md-2"> Dernière maj</th> <th class="action col-md-2"> Action</th> </tr> </thead> <tbody> Loading @@ -42,16 +45,25 @@ $canDesabonnement = $this->isAllowed(AbonnementPrivileges::getResourceId(Abonnem <td> <?php echo $abonnement->getIndicateur()->getTitre(); ?> </td> <td> <?php echo $result[$abonnement->getIndicateur()->getId()]; ?> </td> <td> <?php echo $abonnement->getIndicateur()->getDernierRafraichissement()->format('d/m/Y à H:i'); ?> </td> <td> <td class="action"> <?php if ($canAfficher) : ?> <?php /** @see IndicateurController::afficherAction() */ ?> <a href="<?php echo $this->url('indicateur/afficher', ['indicateur' => $abonnement->getIndicateur()->getId()], [], true); ?>"> <span class="icon icon-voir"></span></a> <a href="<?php echo $this->url('indicateur/afficher', ['indicateur' => $abonnement->getIndicateur()->getId()], [], true); ?>" class="action secondary" > <span class="icon icon-voir"></span> Afficher l'indicateur </a> <?php endif; ?> <?php if ($canDesabonnement) : ?> <br> <?php /** @see AbonnementController::resilierAction() */ ?> <a href="<?php echo $this->url('abonnement/resilier', ['indicateur' => $abonnement->getIndicateur()->getId()], ['query' => ['retour' => $this->url('mes-indicateurs', [], [], true)]], true); ?>"> <span class="icon icon-unchecked"></span></a> <a href="<?php echo $this->url('abonnement/resilier', ['indicateur' => $abonnement->getIndicateur()->getId()], ['query' => ['retour' => $this->url('mes-indicateurs', [], [], true)]], true); ?>" class="action danger" > <span class="icon icon-unchecked"></span> Se désabonner </a> <?php endif; ?> </td> </tr> Loading