Loading module/Application/src/Application/Form/CentreCout/CentreCoutSaisieForm.php +14 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ class CentreCoutSaisieForm extends AbstractForm $this->add([ 'name' => 'libelle', 'options' => [ 'label' => "Libelle", 'label' => "Libellé", ], 'type' => 'Text', ]); Loading Loading @@ -97,7 +97,7 @@ class CentreCoutSaisieForm extends AbstractForm ]); $this->get('parent') ->setEmptyOption("(Aucun)") ->setValueOptions(\UnicaenApp\Util::collectionAsOptions($this->getServiceCentreCout()->getList())); ->setValueOptions(\UnicaenApp\Util::collectionAsOptions($this->getParent())); $this->add(new Csrf('security')); $this->add([ Loading @@ -114,6 +114,18 @@ class CentreCoutSaisieForm extends AbstractForm public function getParent() { $serviceCentreCout = $this->getServiceCentreCout(); $qb = $serviceCentreCout->finderByHistorique(); $qb->andWhere('parent' == Null); $centreCouts = $serviceCentreCout->getList($qb); return $centreCouts; } /** * Should return an array specification compatible with * {@link Zend\InputFilter\Factory::createInputFilter()}. Loading module/Application/view/application/centre-cout/index.phtml +114 −135 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ while ($i < $nTblListe) { <table class="table table-bordered table-sort"> <thead> <th style="word-wrap: break-word ; ">Code</th> <th style="word-wrap: break-word ; ">Libelle</th> <th style="word-wrap: break-word ; ">Libellé</th> <th style="word-wrap: break-word ; ">Activité</th> <th style="word-wrap: break-word ; ">Type de ressource</th> <th style="word-wrap: break-word ; ">Unité budgétaire</th> Loading @@ -51,7 +51,6 @@ while ($i < $nTblListe) { $i++) { $fr = $tblRef[$i]; $nFr = count($tblListe[$i]); ?> <tr> <td data-order="<?= $fr->getCode() ?>"><?= $fr->getCode() ?><br></td> <td><?= $fr->getLibelle() . '<br>' ?></td> <td><?= $fr->getActivite()->getLibelle() . '<br>' ?></td> Loading Loading @@ -85,20 +84,10 @@ while ($i < $nTblListe) { } } if ($tblOk) { ?> <table class="table table-bordered"> <thead> <th>Désignation</th> <th> Actions</th> <?php // if ($okActions) echo '<th>Actions</th>' ?> </thead> <tbody> <?php foreach ($centreCoutStructures as $ccs) { if ($ccs->getCentreCout()->getId() == $fr->getId()) { ?> <tr> <td><?= $ccs->getStructure() ?></td> <td> <?= $ccs->getStructure() ?> <?php if (($ccs->getSource()->getLibelle() == 'OSE') && $canEdit) { ?> <td> <a class="ajax-modal" data-event="centre-cout-saisie" href="<?= $this->url('centre-cout/saisie-structure', ['centre-cout' => $fr->getId(), 'centre-cout-structure' => $ccs->getId()]) ?>" title="Modifier la structure"> Loading @@ -115,15 +104,18 @@ while ($i < $nTblListe) { <span class="glyphicon glyphicon-remove"></span> </a> <?php } ?> </td> </tr> <br> <?php } } ?> </tbody> </table> <?php } ?> <?php if ($canEdit) { ?> <a class="ajax-modal" data-event="centre-cout-saisie" href="<?= $this->url('centre-cout/saisie-structure', ['centre-cout' => $fr->getId()]) ?>" title="Ajouter une structure"> <button type="button" class="btn btn-xs btn-primary">Ajouter une structure</button> </a> <?php } ?> </td> </tr> <?php if ($nFr) { ?> <?php Loading @@ -131,7 +123,6 @@ while ($i < $nTblListe) { $j < $nFr; $j++) { $frf = $tblListe[$i][$j]; ?> <tr> <td data-order="<?= $fr->getCode() ?>" style="word-wrap: break-word; padding-left:30px; "><?= $frf->getCode() ?></td> <td style="word-wrap: break-word ; "><?= $frf->getLibelle() ?></td> Loading Loading @@ -166,19 +157,10 @@ while ($i < $nTblListe) { if (($ccs->getSource()->getLibelle() == 'OSE') && $canEdit) $okActions = true; } } if ($tblOk) { ?> <table class="table table-bordered"> <thead> <th>Désignation</th> <th> Actions</th> <?php // if ($okActions) echo '<th>Actions</th>' ?> </thead> <tbody> <?php foreach ($centreCoutStructures as $ccs) { if ($tblOk) { foreach ($centreCoutStructures as $ccs) { if ($ccs->getCentreCout()->getId() == $frf->getId()) { ?> <tr> <td><?= $ccs->getStructure() ?></td> <td> <?= $ccs->getStructure() ?> <?php if (($ccs->getSource()->getLibelle() == 'OSE') && $canEdit) { ?> <a class="ajax-modal" data-event="centre-cout-saisie" href="<?= $this->url('centre-cout/saisie-structure', ['centre-cout' => $fr->getId(), 'centre-cout-structure' => $ccs->getId()]) ?>" Loading @@ -196,14 +178,11 @@ while ($i < $nTblListe) { <span class="glyphicon glyphicon-remove"></span> </a> <?php } ?> </td> </tr> <br> <?php } } ?> </tbody> </table> <?php } ?> <?php if (($canEdit) && ($frf->getSource()->getLibelle() == 'OSE')) { ?> <?php if ($canEdit) { ?> <a class="ajax-modal" data-event="centre-cout-saisie" href="<?= $this->url('centre-cout/saisie-structure', ['centre-cout' => $frf->getId()]) ?>" title="Ajouter une structure"> Loading Loading
module/Application/src/Application/Form/CentreCout/CentreCoutSaisieForm.php +14 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ class CentreCoutSaisieForm extends AbstractForm $this->add([ 'name' => 'libelle', 'options' => [ 'label' => "Libelle", 'label' => "Libellé", ], 'type' => 'Text', ]); Loading Loading @@ -97,7 +97,7 @@ class CentreCoutSaisieForm extends AbstractForm ]); $this->get('parent') ->setEmptyOption("(Aucun)") ->setValueOptions(\UnicaenApp\Util::collectionAsOptions($this->getServiceCentreCout()->getList())); ->setValueOptions(\UnicaenApp\Util::collectionAsOptions($this->getParent())); $this->add(new Csrf('security')); $this->add([ Loading @@ -114,6 +114,18 @@ class CentreCoutSaisieForm extends AbstractForm public function getParent() { $serviceCentreCout = $this->getServiceCentreCout(); $qb = $serviceCentreCout->finderByHistorique(); $qb->andWhere('parent' == Null); $centreCouts = $serviceCentreCout->getList($qb); return $centreCouts; } /** * Should return an array specification compatible with * {@link Zend\InputFilter\Factory::createInputFilter()}. Loading
module/Application/view/application/centre-cout/index.phtml +114 −135 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ while ($i < $nTblListe) { <table class="table table-bordered table-sort"> <thead> <th style="word-wrap: break-word ; ">Code</th> <th style="word-wrap: break-word ; ">Libelle</th> <th style="word-wrap: break-word ; ">Libellé</th> <th style="word-wrap: break-word ; ">Activité</th> <th style="word-wrap: break-word ; ">Type de ressource</th> <th style="word-wrap: break-word ; ">Unité budgétaire</th> Loading @@ -51,7 +51,6 @@ while ($i < $nTblListe) { $i++) { $fr = $tblRef[$i]; $nFr = count($tblListe[$i]); ?> <tr> <td data-order="<?= $fr->getCode() ?>"><?= $fr->getCode() ?><br></td> <td><?= $fr->getLibelle() . '<br>' ?></td> <td><?= $fr->getActivite()->getLibelle() . '<br>' ?></td> Loading Loading @@ -85,20 +84,10 @@ while ($i < $nTblListe) { } } if ($tblOk) { ?> <table class="table table-bordered"> <thead> <th>Désignation</th> <th> Actions</th> <?php // if ($okActions) echo '<th>Actions</th>' ?> </thead> <tbody> <?php foreach ($centreCoutStructures as $ccs) { if ($ccs->getCentreCout()->getId() == $fr->getId()) { ?> <tr> <td><?= $ccs->getStructure() ?></td> <td> <?= $ccs->getStructure() ?> <?php if (($ccs->getSource()->getLibelle() == 'OSE') && $canEdit) { ?> <td> <a class="ajax-modal" data-event="centre-cout-saisie" href="<?= $this->url('centre-cout/saisie-structure', ['centre-cout' => $fr->getId(), 'centre-cout-structure' => $ccs->getId()]) ?>" title="Modifier la structure"> Loading @@ -115,15 +104,18 @@ while ($i < $nTblListe) { <span class="glyphicon glyphicon-remove"></span> </a> <?php } ?> </td> </tr> <br> <?php } } ?> </tbody> </table> <?php } ?> <?php if ($canEdit) { ?> <a class="ajax-modal" data-event="centre-cout-saisie" href="<?= $this->url('centre-cout/saisie-structure', ['centre-cout' => $fr->getId()]) ?>" title="Ajouter une structure"> <button type="button" class="btn btn-xs btn-primary">Ajouter une structure</button> </a> <?php } ?> </td> </tr> <?php if ($nFr) { ?> <?php Loading @@ -131,7 +123,6 @@ while ($i < $nTblListe) { $j < $nFr; $j++) { $frf = $tblListe[$i][$j]; ?> <tr> <td data-order="<?= $fr->getCode() ?>" style="word-wrap: break-word; padding-left:30px; "><?= $frf->getCode() ?></td> <td style="word-wrap: break-word ; "><?= $frf->getLibelle() ?></td> Loading Loading @@ -166,19 +157,10 @@ while ($i < $nTblListe) { if (($ccs->getSource()->getLibelle() == 'OSE') && $canEdit) $okActions = true; } } if ($tblOk) { ?> <table class="table table-bordered"> <thead> <th>Désignation</th> <th> Actions</th> <?php // if ($okActions) echo '<th>Actions</th>' ?> </thead> <tbody> <?php foreach ($centreCoutStructures as $ccs) { if ($tblOk) { foreach ($centreCoutStructures as $ccs) { if ($ccs->getCentreCout()->getId() == $frf->getId()) { ?> <tr> <td><?= $ccs->getStructure() ?></td> <td> <?= $ccs->getStructure() ?> <?php if (($ccs->getSource()->getLibelle() == 'OSE') && $canEdit) { ?> <a class="ajax-modal" data-event="centre-cout-saisie" href="<?= $this->url('centre-cout/saisie-structure', ['centre-cout' => $fr->getId(), 'centre-cout-structure' => $ccs->getId()]) ?>" Loading @@ -196,14 +178,11 @@ while ($i < $nTblListe) { <span class="glyphicon glyphicon-remove"></span> </a> <?php } ?> </td> </tr> <br> <?php } } ?> </tbody> </table> <?php } ?> <?php if (($canEdit) && ($frf->getSource()->getLibelle() == 'OSE')) { ?> <?php if ($canEdit) { ?> <a class="ajax-modal" data-event="centre-cout-saisie" href="<?= $this->url('centre-cout/saisie-structure', ['centre-cout' => $frf->getId()]) ?>" title="Ajouter une structure"> Loading