diff --git a/module/Application/src/Application/Controller/AgrementController.php b/module/Application/src/Application/Controller/AgrementController.php
index e8d11e9afcfd64e587b30448bef05f8b17913281..462e78b5e23078a9197c0ad0910196f2407c6bfa 100755
--- a/module/Application/src/Application/Controller/AgrementController.php
+++ b/module/Application/src/Application/Controller/AgrementController.php
@@ -102,7 +102,7 @@ class AgrementController extends AbstractController
$tas = $this->getServiceTblAgrement()->getList($qb);
- $test = false;
+ $test = false;
$needStructure = false;
$hasActions = false;
$data = [];
@@ -113,14 +113,14 @@ class AgrementController extends AbstractController
$params = [
'agrement' => $a->getId(),
- 'intervenant' => $ta->getIntervenant()->getRouteParam(),
+ 'intervenant' => $ta->getIntervenant()->getId(),
];
$actionUrl = $this->url()->fromRoute('intervenant/agrement/supprimer', $params);
$actionLabel = '<span class="glyphicon glyphicon-trash"></span> Retirer l\'agrément';
} elseif (!$ta->getAgrement() && $this->isAllowed($ta, $ta->getTypeAgrement()->getPrivilegeEdition())) {
$params = [
'typeAgrement' => $ta->getTypeAgrement()->getId(),
- 'intervenant' => $ta->getIntervenant()->getRouteParam(),
+ 'intervenant' => $ta->getIntervenant()->getId(),
];
if ($ta->getStructure()) $params['structure'] = $ta->getStructure()->getId();
diff --git a/module/Application/src/Application/Controller/ContratController.php b/module/Application/src/Application/Controller/ContratController.php
index ccaf7e9d5c7de163b3dd94a166675b0ca74cb076..887004d2b51978a3680f13d4e678948801cae338 100755
--- a/module/Application/src/Application/Controller/ContratController.php
+++ b/module/Application/src/Application/Controller/ContratController.php
@@ -111,8 +111,8 @@ class ContratController extends AbstractController
//Récupération email intervenant (Perso puis unicaen)
$dossierIntervenant = $this->getServiceDossier()->getByIntervenant($intervenant);
- $emailPerso = ($dossierIntervenant) ? $dossierIntervenant->getEmailPerso() : '';
- $emailIntervenant = (!empty($emailPerso)) ? $emailPerso : $intervenant->getEmail();
+ $emailPerso = ($dossierIntervenant) ? $dossierIntervenant->getEmailPerso() : '';
+ $emailIntervenant = (!empty($emailPerso)) ? $emailPerso : $intervenant->getEmail();
/* Récupération des services par contrat et par structure (pour les non contractualisés) */
$services = [
@@ -169,7 +169,7 @@ class ContratController extends AbstractController
}
}
- return $this->redirect()->toRoute('intervenant/contrat', ['intervenant' => $intervenant->getRouteParam()]);
+ return $this->redirect()->toRoute('intervenant/contrat', ['intervenant' => $intervenant->getId()]);
}
@@ -349,18 +349,17 @@ class ContratController extends AbstractController
if (!empty($contrat->getIntervenant()->getEmail())) {
//Utilisation ici du parametre email
- $html = $this->getServiceParametres()->get('contrat_modele_mail');
+ $html = $this->getServiceParametres()->get('contrat_modele_mail');
//Ajout pour transformer les sauts de lignes en html <br/>
$html = nl2br($html);
//Personnalisation des variables
- $vIntervenant = $contrat->getIntervenant()->getCivilite()->getLibelleCourt() . " ". $contrat->getIntervenant()->getNomUsuel();
+ $vIntervenant = $contrat->getIntervenant()->getCivilite()->getLibelleCourt() . " " . $contrat->getIntervenant()->getNomUsuel();
$vUtilisateur = $this->getServiceContext()->getUtilisateur()->getDisplayName();
- $html = str_replace([':intervenant', ':utilisateur'], [$vIntervenant, $vUtilisateur], $html);
- $subject = $this->getServiceParametres()->get('contrat_modele_mail_objet');
- $subject = str_replace(':intervenant', $vIntervenant, $subject);
- $message = $this->getServiceModeleContrat()->prepareMail($contrat, $html, $subject);
- $mail = $this->mail()->send($message);
-
+ $html = str_replace([':intervenant', ':utilisateur'], [$vIntervenant, $vUtilisateur], $html);
+ $subject = $this->getServiceParametres()->get('contrat_modele_mail_objet');
+ $subject = str_replace(':intervenant', $vIntervenant, $subject);
+ $message = $this->getServiceModeleContrat()->prepareMail($contrat, $html, $subject);
+ $mail = $this->mail()->send($message);
}
return $this->getResponse();
diff --git a/module/Application/src/Application/Controller/IntervenantController.php b/module/Application/src/Application/Controller/IntervenantController.php
index 29a163eb9059aee77bbe9cf9ef27f67d716d8a7f..fb8ccb7868758d319ff15e1665fcc67cefd72815 100755
--- a/module/Application/src/Application/Controller/IntervenantController.php
+++ b/module/Application/src/Application/Controller/IntervenantController.php
@@ -68,7 +68,7 @@ class IntervenantController extends AbstractController
return $this->redirect()->toUrl($url);
}
} else {
- return $this->redirect()->toRoute('intervenant/voir', ['intervenant' => $intervenant->getRouteParam()]);
+ return $this->redirect()->toRoute('intervenant/voir', ['intervenant' => $intervenant->getId()]);
}
}
@@ -376,21 +376,25 @@ class IntervenantController extends AbstractController
return compact('intervenant', 'data');
}
+
+
public function validationVolumeHoraireTypeIntervenantAction()
{
$serviceRVS = $this->getServiceRegleStructureValidation();
- $listeRsv = $serviceRVS->getList();
- return compact('listeRsv');
+ $listeRsv = $serviceRVS->getList();
+ return compact('listeRsv');
}
+
+
public function validationVolumeHoraireTypeIntervenantSaisieAction()
{
$regleStructureValidation = $this->getEvent()->getParam('regleStructureValidation');
- $form = $this->getFormRegleStructureValidationSaisie();
+ $form = $this->getFormRegleStructureValidationSaisie();
if (empty($regleStructureValidation)) {
- $title = 'Création d\'une nouvelle régle';
+ $title = 'Création d\'une nouvelle régle';
$regleStructureValidation = $this->getServiceRegleStructureValidation()->newEntity();
} else {
$title = 'Édition d\'une règle';
@@ -405,8 +409,7 @@ class IntervenantController extends AbstractController
if (false !== strpos($message, 'ORA-00001')) {
$this->flashMessenger()->addErrorMessage("Règle non enregistrée car elle existe déjà dans OSE");
- }
- else{
+ } else {
$this->flashMessenger()->addErrorMessage($this->translate($e));
}
}
@@ -415,6 +418,8 @@ class IntervenantController extends AbstractController
return compact('form', 'title');
}
+
+
public function validationVolumeHoraireTypeIntervenantDeleteAction()
{
$regleStructureValidation = $this->getEvent()->getParam('regleStructureValidation');
@@ -430,6 +435,7 @@ class IntervenantController extends AbstractController
}
+
/**
*
* @return array
diff --git a/module/Application/src/Application/Entity/Db/Indicateur/AbstractIndicateur.php b/module/Application/src/Application/Entity/Db/Indicateur/AbstractIndicateur.php
index 01eb83f6f6b3136ff1a113fdbf612960ddadb5c9..7c42771104288e69eb722c63d24505236d4e6133 100755
--- a/module/Application/src/Application/Entity/Db/Indicateur/AbstractIndicateur.php
+++ b/module/Application/src/Application/Entity/Db/Indicateur/AbstractIndicateur.php
@@ -83,7 +83,7 @@ abstract class AbstractIndicateur
public function getUrlParams()
{
return [
- 'intervenant' => $this->getIntervenant()->getRouteParam(),
+ 'intervenant' => $this->getIntervenant()->getId(),
];
}
diff --git a/module/Application/src/Application/Entity/Db/Intervenant.php b/module/Application/src/Application/Entity/Db/Intervenant.php
index 628ce02cd956cd12dcd230f8d961e1bc1fa92e8a..e1b6d39812e9ee7b03cf77f128c2ebe5591d2f03 100755
--- a/module/Application/src/Application/Entity/Db/Intervenant.php
+++ b/module/Application/src/Application/Entity/Db/Intervenant.php
@@ -313,18 +313,6 @@ class Intervenant implements HistoriqueAwareInterface, ResourceInterface, Import
- /**
- * retourne le paramètre de route
- *
- * @return string
- */
- public function getRouteParam()
- {
- return $this->getCode();
- }
-
-
-
public function getAdresseIdentite(): ?string
{
$identite = [];
diff --git a/module/Application/src/Application/Form/Service/RechercheForm.php b/module/Application/src/Application/Form/Service/RechercheForm.php
index b759264ec8bf0c936658a0388bb7d0bb248996d5..07fc6916029ade18678b91211ccdd95832898478 100755
--- a/module/Application/src/Application/Form/Service/RechercheForm.php
+++ b/module/Application/src/Application/Form/Service/RechercheForm.php
@@ -262,8 +262,8 @@ class RechercheFormHydrator implements HydratorInterface
/**
* Hydrate $object with the provided $data.
*
- * @param array $data
- * @param object $object
+ * @param array $data
+ * @param object $object
*
* @return object
*/
@@ -306,7 +306,7 @@ class RechercheFormHydrator implements HydratorInterface
/**
* Extract values from an object
*
- * @param \Application\Entity\Service\Recherche $object
+ * @param \Application\Entity\Service\Recherche $object
*
* @return array
*/
@@ -316,7 +316,7 @@ class RechercheFormHydrator implements HydratorInterface
'type-intervenant' => $object->getTypeIntervenant() ? $object->getTypeIntervenant()->getId() : null,
'structure-aff' => $object->getStructureAff() ? $object->getStructureAff()->getId() : null,
'intervenant' => [
- 'id' => $object->getIntervenant() ? $object->getIntervenant()->getRouteParam() : null,
+ 'id' => $object->getIntervenant() ? $object->getIntervenant()->getId() : null,
'label' => $object->getIntervenant() ? (string)$object->getIntervenant() : null,
],
'element-pedagogique' => [
diff --git a/module/Application/src/Application/Form/Service/SaisieFieldset.php b/module/Application/src/Application/Form/Service/SaisieFieldset.php
index c26c3a755069230ad8acd1cdecebd8e14a70dd30..0189bfbbafe8fa287d4826d11366ce6a2b9675aa 100755
--- a/module/Application/src/Application/Form/Service/SaisieFieldset.php
+++ b/module/Application/src/Application/Form/Service/SaisieFieldset.php
@@ -123,7 +123,7 @@ class SaisieFieldset extends AbstractFieldset
/* Peuple le formulaire avec les valeurs issues du contexte local */
if ($this->has('intervenant') && $this->getServiceLocalContext()->getIntervenant()) {
$this->get('intervenant')->setValue([
- 'id' => $this->getServiceLocalContext()->getIntervenant()->getRouteParam(),
+ 'id' => $this->getServiceLocalContext()->getIntervenant()->getId(),
'label' => (string)$this->getServiceLocalContext()->getIntervenant(),
]);
}
@@ -212,8 +212,8 @@ class SaisieFieldset extends AbstractFieldset
$canSaisieExterieur = $this->getServiceAuthorize()->isAllowed($this->getIntervenant(), Privileges::ENSEIGNEMENT_EXTERIEUR);
$this->remove('intervenant');
$this->add([
- 'name' => 'intervenant-id',
- 'type' => 'Hidden',
+ 'name' => 'intervenant-id',
+ 'type' => 'Hidden',
'attributes' => [
'value' => $this->getIntervenant()->getId(),
],
@@ -251,16 +251,16 @@ class SaisieFieldsetHydrator implements HydratorInterface
/**
* Hydrate $object with the provided $data.
*
- * @param array $data
- * @param Service $object
+ * @param array $data
+ * @param Service $object
*
* @return object
*/
public function hydrate(array $data, $object)
{
$intervenant = isset($data['intervenant']['id']) ? $data['intervenant']['id'] : null;
- if ($intervenant){
- $object->setIntervenant( $this->getServiceIntervenant()->getBySourceCode($intervenant));
+ if ($intervenant) {
+ $object->setIntervenant($this->getServiceIntervenant()->getBySourceCode($intervenant));
}
if (isset($data['element-pedagogique']) && $data['element-pedagogique'] instanceof ElementPedagogique) {
@@ -283,7 +283,7 @@ class SaisieFieldsetHydrator implements HydratorInterface
/**
* Extract values from an object
*
- * @param Service $object
+ * @param Service $object
*
* @return array
*/
@@ -297,7 +297,7 @@ class SaisieFieldsetHydrator implements HydratorInterface
if ($object->getIntervenant()) {
$data['intervenant'] = [
- 'id' => $object->getIntervenant()->getRouteParam(),
+ 'id' => $object->getIntervenant()->getId(),
'label' => (string)$object->getIntervenant(),
];
} else {
diff --git a/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php b/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php
index cc22638751c530349f116d1743299b55a31684e5..43c6b5ff4fb35ca9b294e25f4bc4f6de0a1e359c 100755
--- a/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php
+++ b/module/Application/src/Application/Form/ServiceReferentiel/SaisieFieldset.php
@@ -164,7 +164,7 @@ class SaisieFieldset extends AbstractFieldset implements EntityManagerAwareInter
public function getFonctions()
{
- $fncs = $this->getServiceFonctionReferentiel()->getList();
+ $fncs = $this->getServiceFonctionReferentiel()->getList();
$fonctions = [];
foreach ($fncs as $id => $fonction) {
if ($fonction->getFille()->count() > 0) {
@@ -190,7 +190,7 @@ class SaisieFieldset extends AbstractFieldset implements EntityManagerAwareInter
$cl = $this->getServiceLocalContext();
if ($this->has('intervenant') && $cl->getIntervenant()) {
$this->get('intervenant')->setValue([
- 'id' => $cl->getIntervenant()->getRouteParam(),
+ 'id' => $cl->getIntervenant()->getId(),
'label' => (string)$cl->getIntervenant(),
]);
}
@@ -344,8 +344,8 @@ class SaisieFieldsetHydrator implements HydratorInterface
/**
* Hydrate $object with the provided $data.
*
- * @param array $data
- * @param ServiceReferentiel $object
+ * @param array $data
+ * @param ServiceReferentiel $object
*
* @return object
*/
@@ -379,7 +379,7 @@ class SaisieFieldsetHydrator implements HydratorInterface
/**
* Extract values from an object
*
- * @param ServiceReferentiel $object
+ * @param ServiceReferentiel $object
*
* @return array
*/
@@ -393,7 +393,7 @@ class SaisieFieldsetHydrator implements HydratorInterface
if ($object->getIntervenant()) {
$data['intervenant'] = [
- 'id' => $object->getIntervenant()->getRouteParam(),
+ 'id' => $object->getIntervenant()->getId(),
'label' => (string)$object->getIntervenant(),
];
} else {
diff --git a/module/Application/src/Application/Processus/Intervenant/RechercheProcessus.php b/module/Application/src/Application/Processus/Intervenant/RechercheProcessus.php
index b38e50b33dd4632c8e5adf8d8c2117b905493d9c..b2c88a006812111ec64807645eed012f2664e618 100644
--- a/module/Application/src/Application/Processus/Intervenant/RechercheProcessus.php
+++ b/module/Application/src/Application/Processus/Intervenant/RechercheProcessus.php
@@ -33,7 +33,7 @@ class RechercheProcessus
WITH vrec AS (
SELECT
i.id,
- i.source_code,
+ i.code,
i.nom_usuel,
i.nom_patronymique,
i.prenom,
@@ -53,7 +53,7 @@ class RechercheProcessus
SELECT
null id,
- i.source_code,
+ i.code,
i.nom_usuel,
i.nom_patronymique,
i.prenom,
@@ -96,13 +96,13 @@ class RechercheProcessus
try {
$stmt = $this->getEntityManager()->getConnection()->executeQuery($sql);
while ($r = $stmt->fetch()) {
- $intervenants[$r['SOURCE_CODE']] = [
+ $intervenants[$r['CODE']] = [
'civilite' => $r['CIVILITE'],
'nom' => $r['NOM_USUEL'],
'prenom' => $r['PRENOM'],
'date-naissance' => new \DateTime($r['DATE_NAISSANCE']),
'structure' => $r['STRUCTURE'],
- 'numero-personnel' => $r['SOURCE_CODE'],
+ 'numero-personnel' => $r['CODE'],
];
}
} catch (\Exception $e) {
diff --git a/module/Application/src/Application/Service/WorkflowService.php b/module/Application/src/Application/Service/WorkflowService.php
index a9f94bfcad0b31772572120b98481c76d399bbf9..8af789dd6871b730950583eb2a57c2cb316b37d3 100755
--- a/module/Application/src/Application/Service/WorkflowService.php
+++ b/module/Application/src/Application/Service/WorkflowService.php
@@ -83,7 +83,7 @@ class WorkflowService extends AbstractService
*/
public function getEtape($etape, Intervenant $intervenant = null, Structure $structure = null)
{
- list($etapeCode, $intervenant, $structure) = $this->prepareEtapeParams($etape, $intervenant, $structure);
+ [$etapeCode, $intervenant, $structure] = $this->prepareEtapeParams($etape, $intervenant, $structure);
$fdr = $this->getFeuilleDeRoute($intervenant, $structure);
if ($fdr) {
@@ -108,7 +108,7 @@ class WorkflowService extends AbstractService
*/
public function getNextEtape($etape, Intervenant $intervenant = null, Structure $structure = null)
{
- list($etapeCode, $intervenant, $structure) = $this->prepareEtapeParams($etape, $intervenant, $structure);
+ [$etapeCode, $intervenant, $structure] = $this->prepareEtapeParams($etape, $intervenant, $structure);
$fdr = $this->getFeuilleDeRoute($intervenant, $structure);
$isCurrent = false;
@@ -135,7 +135,7 @@ class WorkflowService extends AbstractService
*/
public function getPreviousAccessibleEtape($etape, Intervenant $intervenant = null, Structure $structure = null)
{
- list($etapeCode, $intervenant, $structure) = $this->prepareEtapeParams($etape, $intervenant, $structure);
+ [$etapeCode, $intervenant, $structure] = $this->prepareEtapeParams($etape, $intervenant, $structure);
$fdr = $this->getFeuilleDeRoute($intervenant, $structure);
$isCurrent = false;
@@ -162,7 +162,7 @@ class WorkflowService extends AbstractService
*/
public function getNextAccessibleEtape($etape, Intervenant $intervenant = null, Structure $structure = null)
{
- list($etapeCode, $intervenant, $structure) = $this->prepareEtapeParams($etape, $intervenant, $structure);
+ [$etapeCode, $intervenant, $structure] = $this->prepareEtapeParams($etape, $intervenant, $structure);
$fdr = $this->getFeuilleDeRoute($intervenant, $structure);
$isCurrent = false;
@@ -198,7 +198,7 @@ class WorkflowService extends AbstractService
/**
* @param Intervenant|null $intervenant
- * @param Structure|null $structure
+ * @param Structure|null $structure
*
* @return WorkflowEtape|null
*/
@@ -218,7 +218,7 @@ class WorkflowService extends AbstractService
/**
*
* @param Intervenant|null $intervenant
- * @param Structure|null $structure
+ * @param Structure|null $structure
*
* @return WorkflowEtape[]
*/
@@ -255,7 +255,7 @@ class WorkflowService extends AbstractService
$we->setStructure($structure);
$we->setEtape($e->getEtape());
- $url = $this->getUrl($e->getEtape()->getRoute(), ['intervenant' => $intervenant->getRouteParam()]);
+ $url = $this->getUrl($e->getEtape()->getRoute(), ['intervenant' => $intervenant->getId()]);
$we->setUrl($url);
$this->feuillesDeRoute[$iid][$sid][$eid] = $we;
@@ -287,48 +287,49 @@ class WorkflowService extends AbstractService
* @return int
* @throws \Doctrine\DBAL\DBALException
*/
- public function calculerTousTableauxBord($beforeTrigger=null, $afterTrigger=null)
+ public function calculerTousTableauxBord($beforeTrigger = null, $afterTrigger = null)
{
- $sql = "SELECT tbl_name FROM tbl WHERE tbl_name <> 'formule' ORDER BY ordre";
- $tbls = $this->getEntityManager()->getConnection()->fetchAll($sql);
+ $sql = "SELECT tbl_name FROM tbl WHERE tbl_name <> 'formule' ORDER BY ordre";
+ $tbls = $this->getEntityManager()->getConnection()->fetchAll($sql);
$result = true;
- foreach( $tbls as $tbl ){
+ foreach ($tbls as $tbl) {
$begin = microtime(true);
- $tbl = $tbl['TBL_NAME'];
- $sql = 'BEGIN UNICAEN_TBL.CALCULER(\''.$tbl.'\'); END;';
- if (is_callable($beforeTrigger)){
+ $tbl = $tbl['TBL_NAME'];
+ $sql = 'BEGIN UNICAEN_TBL.CALCULER(\'' . $tbl . '\'); END;';
+ if (is_callable($beforeTrigger)) {
$beforeTrigger([
'tableau-bord' => $tbl,
]);
}
- try{
+ try {
$this->getEntityManager()->getConnection()->exec($sql);
- if (is_callable($afterTrigger)){
+ if (is_callable($afterTrigger)) {
$afterTrigger([
'tableau-bord' => $tbl,
- 'result' => true,
- 'duree' => microtime(true) - $begin,
+ 'result' => true,
+ 'duree' => microtime(true) - $begin,
]);
}
- }catch(\Exception $e){
- if (is_callable($afterTrigger)){
+ } catch (\Exception $e) {
+ if (is_callable($afterTrigger)) {
$afterTrigger([
'tableau-bord' => $tbl,
- 'result' => false,
- 'exception' => $e,
- 'duree' => microtime(true) - $begin,
+ 'result' => false,
+ 'exception' => $e,
+ 'duree' => microtime(true) - $begin,
]);
}
$result = false;
}
}
+
return $result;
}
/**
- * @param array $tableauxBords
+ * @param array $tableauxBords
* @param Intervenant|Intervenant[]|string $intervenant
*/
public function calculerTableauxBord($tableauxBords = [], $intervenant): array
@@ -385,7 +386,7 @@ class WorkflowService extends AbstractService
$dep,
$params
);
- }catch(\Exception $e ){
+ } catch (\Exception $e) {
$errors[$dep] = $e;
}
}
@@ -491,14 +492,14 @@ class WorkflowService extends AbstractService
/**
* Generates a url given the name of a route.
*
- * @see \Zend\Mvc\Router\RouteInterface::assemble()
- *
- * @param string $name Name of the route
- * @param array $params Parameters for the link
- * @param array|Traversable $options Options for the route
- * @param bool $reuseMatchedParams Whether to reuse matched parameters
+ * @param string $name Name of the route
+ * @param array $params Parameters for the link
+ * @param array|Traversable $options Options for the route
+ * @param bool $reuseMatchedParams Whether to reuse matched parameters
*
* @return string Url For the link href attribute
+ * @see \Zend\Mvc\Router\RouteInterface::assemble()
+ *
*/
protected function getUrl($name = null, $params = [], $options = [], $reuseMatchedParams = false)
{
diff --git a/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php b/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php
index 8702f38afb9e7bd0fc05cf601d4c798fc470e94a..e7fdfed18e4e8e49e573ecd0a8aa737de4b075a9 100755
--- a/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php
+++ b/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php
@@ -117,7 +117,7 @@ class IntervenantViewHelper extends AbstractHtmlElement
return '<span class="bg-danger"><abbr title="Cet intervenant a été supprimé de OSE">' . $intervenant . '</abbr></span>';
}
- $pourl = $this->getView()->url('intervenant/voir', ['intervenant' => $intervenant->getRouteParam()]);
+ $pourl = $this->getView()->url('intervenant/voir', ['intervenant' => $intervenant->getId()]);
$out = '<a href="' . $pourl . '" data-po-href="' . $pourl . '" class="ajax-modal">' . $intervenant . '</a>';
return $out;
diff --git a/module/Application/src/Application/View/Helper/Intervenant/TotauxHetdViewHelper.php b/module/Application/src/Application/View/Helper/Intervenant/TotauxHetdViewHelper.php
index 95f0cec5491212ad5aae6820bea5d785c79810e3..004acdb9c9eef375ee36a39eb684b348101c570b 100755
--- a/module/Application/src/Application/View/Helper/Intervenant/TotauxHetdViewHelper.php
+++ b/module/Application/src/Application/View/Helper/Intervenant/TotauxHetdViewHelper.php
@@ -16,18 +16,24 @@ class TotauxHetdViewHelper extends AbstractHtmlElement implements FormuleResulta
{
use FormuleResultatAwareTrait;
+
+
/**
* Helper entry point.
*
* @param FormuleResultat $formuleResultat
+ *
* @return self
*/
- final public function __invoke( FormuleResultat $formuleResultat )
+ final public function __invoke(FormuleResultat $formuleResultat)
{
- $this->setFormuleResultat( $formuleResultat );
+ $this->setFormuleResultat($formuleResultat);
+
return $this;
}
+
+
/**
* Retourne le code HTML généré par cette aide de vue.
*
@@ -38,91 +44,120 @@ class TotauxHetdViewHelper extends AbstractHtmlElement implements FormuleResulta
return $this->render();
}
+
+
public function getRefreshUrl()
{
$fr = $this->getFormuleResultat();
+
return $this->getView()->url(
'intervenant/formule-totaux-hetd', [
- 'intervenant' => $fr->getIntervenant()->getRouteParam(),
- 'typeVolumeHoraire' => $fr->getTypeVolumeHoraire()->getId(),
- 'etatVolumeHoraire' => $fr->getEtatVolumeHoraire()->getId()
- ] );
+ 'intervenant' => $fr->getIntervenant()->getId(),
+ 'typeVolumeHoraire' => $fr->getTypeVolumeHoraire()->getId(),
+ 'etatVolumeHoraire' => $fr->getEtatVolumeHoraire()->getId(),
+ ]);
}
+
+
public function render()
{
$fr = $this->getFormuleResultat();
$attrs = [
- 'id' => 'formule-totaux-hetd',
- 'data-url' => $this->getRefreshUrl()
+ 'id' => 'formule-totaux-hetd',
+ 'data-url' => $this->getRefreshUrl(),
];
ob_start();
?>
<div <?= $this->htmlAttribs($attrs) ?>>
- <h1>Totaux <abbr title="Heures Équivalent TD">HETD</abbr></h1>
-
- <table class="table table-bordered" style="width:auto;">
- <?php if ($fr->getServiceDu() > 0): ?>
- <tr><th>Service Dû</th>
- <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getServiceDu()) ?></td></tr>
- <?php endif; ?>
-
- <?php if ($fr->getHeuresService() > 0): ?>
- <tr><th>Service assuré</th>
- <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresService()) ?></td></tr>
-
- <?php if ($fr->getHeuresServiceFa() + $fr->getHeuresServiceFc() + $fr->getHeuresServiceFi() > 0): ?>
- <tr><th style="padding-left:5em">Dont enseignements</th>
- <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresServiceFa() + $fr->getHeuresServiceFc() + $fr->getHeuresServiceFi()) ?></td></tr>
- <?php endif; ?>
-
- <?php if ($fr->getHeuresServiceReferentiel() > 0): ?>
- <tr><th style="padding-left:5em">Dont référentiel</th>
- <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresServiceReferentiel()) ?></td></tr>
+ <h1>Totaux <abbr title="Heures Équivalent TD">HETD</abbr></h1>
+
+ <table class="table table-bordered" style="width:auto;">
+ <?php if ($fr->getServiceDu() > 0): ?>
+ <tr>
+ <th>Service Dû</th>
+ <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getServiceDu()) ?></td>
+ </tr>
<?php endif; ?>
- <?php endif; ?>
-
- <?php if ($fr->getHeuresCompl() > 0) : ?>
-
- <tr><th><?= ($fr->getServiceDu() > 0) ? 'Heures complémentaires' : 'Service assuré' ?></th>
- <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresCompl()) ?></td></tr>
+ <?php if ($fr->getHeuresService() > 0): ?>
+ <tr>
+ <th>Service assuré</th>
+ <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresService()) ?></td>
+ </tr>
+
+ <?php if ($fr->getHeuresServiceFa() + $fr->getHeuresServiceFc() + $fr->getHeuresServiceFi() > 0): ?>
+ <tr>
+ <th style="padding-left:5em">Dont enseignements</th>
+ <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresServiceFa() + $fr->getHeuresServiceFc() + $fr->getHeuresServiceFi()) ?></td>
+ </tr>
+ <?php endif; ?>
+
+ <?php if ($fr->getHeuresServiceReferentiel() > 0): ?>
+ <tr>
+ <th style="padding-left:5em">Dont référentiel</th>
+ <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresServiceReferentiel()) ?></td>
+ </tr>
+ <?php endif; ?>
- <?php if ($fr->getHeuresComplFi() > 0): ?>
- <tr><th style="padding-left:5em">Dont <abbr title="Formation initiale">FI</abbr></th>
- <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresComplFi()) ?></td></tr>
<?php endif; ?>
- <?php if ($fr->getHeuresComplFa() > 0): ?>
- <tr><th style="padding-left:5em">Dont <abbr title="Formation en apprentissage">FA</abbr></th>
- <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresComplFa()) ?></td></tr>
- <?php endif; ?>
+ <?php if ($fr->getHeuresCompl() > 0) : ?>
+
+ <tr>
+ <th><?= ($fr->getServiceDu() > 0) ? 'Heures complémentaires' : 'Service assuré' ?></th>
+ <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresCompl()) ?></td>
+ </tr>
+
+ <?php if ($fr->getHeuresComplFi() > 0): ?>
+ <tr>
+ <th style="padding-left:5em">Dont <abbr title="Formation initiale">FI</abbr></th>
+ <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresComplFi()) ?></td>
+ </tr>
+ <?php endif; ?>
+
+ <?php if ($fr->getHeuresComplFa() > 0): ?>
+ <tr>
+ <th style="padding-left:5em">Dont <abbr title="Formation en apprentissage">FA</abbr></th>
+ <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresComplFa()) ?></td>
+ </tr>
+ <?php endif; ?>
+
+ <?php if ($fr->getHeuresComplFc() > 0): ?>
+ <tr>
+ <th style="padding-left:5em">Dont <abbr title="Formation continue">FC</abbr></th>
+ <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresComplFc()) ?></td>
+ </tr>
+ <?php endif; ?>
+
+ <?php if ($fr->getHeuresComplFcMajorees() > 0): ?>
+ <tr>
+ <th style="padding-left:5em">Dont <abbr
+ title="Rémunération FC au titre de l'article D714-60 du code de l’Éducation">rémunération
+ FC D714-60</abbr></th>
+ <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresComplFcMajorees()) ?></td>
+ </tr>
+ <?php endif; ?>
+
+ <?php if ($fr->getHeuresComplReferentiel() > 0): ?>
+ <tr>
+ <th style="padding-left:5em">Dont référentiel</th>
+ <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresComplReferentiel()) ?></td>
+ </tr>
+ <?php endif; ?>
- <?php if ($fr->getHeuresComplFc() > 0): ?>
- <tr><th style="padding-left:5em">Dont <abbr title="Formation continue">FC</abbr></th>
- <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresComplFc()) ?></td></tr>
<?php endif; ?>
+ <?php if ($fr->getSousService() > 0) : ?>
- <?php if ($fr->getHeuresComplFcMajorees() > 0): ?>
- <tr><th style="padding-left:5em">Dont <abbr title="Rémunération FC au titre de l'article D714-60 du code de l’Éducation">rémunération FC D714-60</abbr></th>
- <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresComplFcMajorees()) ?></td></tr>
- <?php endif; ?>
+ <tr>
+ <th>Sous-service</th>
+ <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getSousService()) ?></td>
+ </tr>
- <?php if ($fr->getHeuresComplReferentiel() > 0): ?>
- <tr><th style="padding-left:5em">Dont référentiel</th>
- <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getHeuresComplReferentiel()) ?></td></tr>
<?php endif; ?>
-
- <?php endif; ?>
- <?php if ($fr->getSousService() > 0) : ?>
-
- <tr><th>Sous-service</th>
- <td style="text-align: right"><?= \UnicaenApp\Util::formattedNumber($fr->getSousService()) ?></td></tr>
-
- <?php endif; ?>
- </table>
+ </table>
</div>
<?php
$result = ob_get_clean();
diff --git a/module/Application/src/Application/View/Helper/Service/Ligne.php b/module/Application/src/Application/View/Helper/Service/Ligne.php
index e3c76aa5001f03a7ce59546d24ee165dd0dbed05..8cbc17d14d77cffc5126bdebf452249dcb3dfe0c 100755
--- a/module/Application/src/Application/View/Helper/Service/Ligne.php
+++ b/module/Application/src/Application/View/Helper/Service/Ligne.php
@@ -284,7 +284,7 @@ class Ligne extends AbstractViewHelper
'type-volume-horaire' => $this->getListe()->getTypeVolumeHoraire()->getId(),
];
if ($this->getListe()->getIntervenant()) {
- $query['intervenant'] = $this->getListe()->getIntervenant()->getRouteParam();
+ $query['intervenant'] = $this->getListe()->getIntervenant()->getId();
}
$url = $this->getView()->url('service/saisie', ['id' => $this->getService()->getId()], ['query' => $query]);
diff --git a/module/Application/src/Application/View/Helper/Service/Liste.php b/module/Application/src/Application/View/Helper/Service/Liste.php
index 5dcedbf9887232f094e7101fbbb8e6aa8d2ae5dd..b2b158276933bf978aca95967744e9b93cc64dbf 100755
--- a/module/Application/src/Application/View/Helper/Service/Liste.php
+++ b/module/Application/src/Application/View/Helper/Service/Liste.php
@@ -155,8 +155,8 @@ class Liste extends AbstractViewHelper
$params = [
'type-volume-horaire' => $this->getTypeVolumeHoraire()->getId(),
];
- if ($this->getIntervenant()){
- $params['intervenant'] = $this->getIntervenant()->getRouteParam();
+ if ($this->getIntervenant()) {
+ $params['intervenant'] = $this->getIntervenant()->getId();
}
return $this->getView()->url('service/saisie', [], ['query' => $params]);
@@ -212,12 +212,12 @@ class Liste extends AbstractViewHelper
}
$style = $this->getTotaux()['total_general'] == 0 ? ' style="display:none"' : '';
- $out .= '<tfoot ' . $style . '>' . "\n";
- $out .= $this->renderTotaux();
- $out .= '</tfoot>' . "\n";
- $out .= '</table>' . "\n";
- $out .= $this->renderShowHide();
- $out .= '</div>' . "\n";
+ $out .= '<tfoot ' . $style . '>' . "\n";
+ $out .= $this->renderTotaux();
+ $out .= '</tfoot>' . "\n";
+ $out .= '</table>' . "\n";
+ $out .= $this->renderShowHide();
+ $out .= '</div>' . "\n";
return $out;
}
@@ -237,27 +237,27 @@ class Liste extends AbstractViewHelper
'title' => "Saisir comme réalisées l'ensemble des heures prévisionnelles"
. ". Attention toutefois : si des heures réalisées ont déjà été saisies alors ces dernières seront écrasées!",
];
- $out .= '<button type="button" ' . $this->htmlAttribs($attribs) . '>Prévu <span class="glyphicon glyphicon-arrow-right"></span> réalisé</button> ';
- $out .= '<div class="modal fade" id="prevu-to-realise-modal" tabindex="-1" role="dialog" aria-hidden="true">';
- $out .= '<div class="modal-dialog modal-md">';
- $out .= '<div class="modal-content">';
- $out .= '<div class="modal-header">';
- $out .= '<button type="button" class="close" data-dismiss="modal" aria-label="Annuler"><span aria-hidden="true">×</span></button>';
- $out .= '<h4 class="modal-title">Saisir comme réalisées l\'ensemble des heures prévisionnelles</h4>';
- $out .= '</div>';
- $out .= '<div class="modal-body">';
- $out .= '<p>Souhaitez-vous réellement saisir comme réalisées l\'ensemble des heures prévisionnelles ?</p>';
- $out .= '<div class="alert alert-warning" role="alert">Attention : si des heures réalisées ont déjà été saisies alors ces dernières seront écrasées!</div>';
- $out .= '</div>';
- $out .= '<div class="modal-footer">';
- $out .= '<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>';
- $out .= '<button type="button" class="btn btn-primary prevu-to-realise">OK</button>';
- $out .= '</div>';
- $out .= '</div>';
- $out .= '</div>';
- $out .= '</div>';
- } elseif ($this->prevuToPrevu){
- if ($this->getProcessusIntervenant()->service()->canPrevuToPrevu($this->prevuToPrevu )) {
+ $out .= '<button type="button" ' . $this->htmlAttribs($attribs) . '>Prévu <span class="glyphicon glyphicon-arrow-right"></span> réalisé</button> ';
+ $out .= '<div class="modal fade" id="prevu-to-realise-modal" tabindex="-1" role="dialog" aria-hidden="true">';
+ $out .= '<div class="modal-dialog modal-md">';
+ $out .= '<div class="modal-content">';
+ $out .= '<div class="modal-header">';
+ $out .= '<button type="button" class="close" data-dismiss="modal" aria-label="Annuler"><span aria-hidden="true">×</span></button>';
+ $out .= '<h4 class="modal-title">Saisir comme réalisées l\'ensemble des heures prévisionnelles</h4>';
+ $out .= '</div>';
+ $out .= '<div class="modal-body">';
+ $out .= '<p>Souhaitez-vous réellement saisir comme réalisées l\'ensemble des heures prévisionnelles ?</p>';
+ $out .= '<div class="alert alert-warning" role="alert">Attention : si des heures réalisées ont déjà été saisies alors ces dernières seront écrasées!</div>';
+ $out .= '</div>';
+ $out .= '<div class="modal-footer">';
+ $out .= '<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>';
+ $out .= '<button type="button" class="btn btn-primary prevu-to-realise">OK</button>';
+ $out .= '</div>';
+ $out .= '</div>';
+ $out .= '</div>';
+ $out .= '</div>';
+ } elseif ($this->prevuToPrevu) {
+ if ($this->getProcessusIntervenant()->service()->canPrevuToPrevu($this->prevuToPrevu)) {
$attribs = [
'class' => 'btn btn-warning prevu-to-prevu-show',
'data-toggle' => 'modal',
@@ -266,28 +266,28 @@ class Liste extends AbstractViewHelper
//'href' => $this->getAddUrl(),
'title' => "Initialiser le service prévisionnel avec le service prévisionnel validé l'année dernière",
];
- $out .= '<button type="button" ' . $this->htmlAttribs($attribs) . '>Prévu ' . $this->getServiceContext()->getAnneePrecedente() . ' <span class="glyphicon glyphicon-arrow-right"></span> Prévu ' . $this->getServiceContext()->getAnnee() . '</button> ';
- $out .= '<div class="modal fade" id="prevu-to-prevu-modal" tabindex="-1" role="dialog" aria-hidden="true">';
- $out .= '<div class="modal-dialog modal-md">';
- $out .= '<div class="modal-content">';
- $out .= '<div class="modal-header">';
- $out .= '<button type="button" class="close" data-dismiss="modal" aria-label="Annuler"><span aria-hidden="true">×</span></button>';
- $out .= '<h4 class="modal-title">Reporter ici le service prévisionnel validé de l\'année précédente.</h4>';
- $out .= '</div>';
- $out .= '<div class="modal-body">';
- $out .= '<p>Souhaitez-vous réellement initialiser votre service prévisionnel à partir de votre service prévisionnel validé de l\'an dernier ?</p>';
- $out .= '<div class="alert alert-info" id="prevu-to-prevu-attente" style="display:none">';
- $out .= '<img src="'.$this->getView()->basePath().'/images/wait.gif" alt="Attente..."/>';
- $out .= '<div>Reprise des enseignements de l\'année dernière en cours... Merci de patienter.</div>';
- $out .= '</div>';
- $out .= '</div>';
- $out .= '<div class="modal-footer">';
- $out .= '<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>';
- $out .= '<button type="button" class="btn btn-primary prevu-to-prevu" data-intervenant="' . $this->prevuToPrevu->getRouteParam() . '">OK</button>';
- $out .= '</div>';
- $out .= '</div>';
- $out .= '</div>';
- $out .= '</div>';
+ $out .= '<button type="button" ' . $this->htmlAttribs($attribs) . '>Prévu ' . $this->getServiceContext()->getAnneePrecedente() . ' <span class="glyphicon glyphicon-arrow-right"></span> Prévu ' . $this->getServiceContext()->getAnnee() . '</button> ';
+ $out .= '<div class="modal fade" id="prevu-to-prevu-modal" tabindex="-1" role="dialog" aria-hidden="true">';
+ $out .= '<div class="modal-dialog modal-md">';
+ $out .= '<div class="modal-content">';
+ $out .= '<div class="modal-header">';
+ $out .= '<button type="button" class="close" data-dismiss="modal" aria-label="Annuler"><span aria-hidden="true">×</span></button>';
+ $out .= '<h4 class="modal-title">Reporter ici le service prévisionnel validé de l\'année précédente.</h4>';
+ $out .= '</div>';
+ $out .= '<div class="modal-body">';
+ $out .= '<p>Souhaitez-vous réellement initialiser votre service prévisionnel à partir de votre service prévisionnel validé de l\'an dernier ?</p>';
+ $out .= '<div class="alert alert-info" id="prevu-to-prevu-attente" style="display:none">';
+ $out .= '<img src="' . $this->getView()->basePath() . '/images/wait.gif" alt="Attente..."/>';
+ $out .= '<div>Reprise des enseignements de l\'année dernière en cours... Merci de patienter.</div>';
+ $out .= '</div>';
+ $out .= '</div>';
+ $out .= '<div class="modal-footer">';
+ $out .= '<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>';
+ $out .= '<button type="button" class="btn btn-primary prevu-to-prevu" data-intervenant="' . $this->prevuToPrevu->getId() . '">OK</button>';
+ $out .= '</div>';
+ $out .= '</div>';
+ $out .= '</div>';
+ $out .= '</div>';
}
}
$attribs = [
@@ -296,7 +296,7 @@ class Liste extends AbstractViewHelper
'href' => $this->getAddUrl(),
'title' => 'Ajouter un nouvel enseignement',
];
- $out .= '<a ' . $this->htmlAttribs($attribs) . '><span class="glyphicon glyphicon-plus"></span> Je saisis</a>';
+ $out .= '<a ' . $this->htmlAttribs($attribs) . '><span class="glyphicon glyphicon-plus"></span> Je saisis</a>';
return $out;
}
@@ -309,7 +309,7 @@ class Liste extends AbstractViewHelper
$evhSaisi = $this->getServiceEtatVolumeHoraire()->getSaisi();
$ligneView = $this->getView()->serviceLigne($this, $service);
- $attribs = [
+ $attribs = [
'id' => 'service-' . $service->getId() . '-ligne',
'data-id' => $service->getId(),
'class' => 'service-ligne',
@@ -322,7 +322,7 @@ class Liste extends AbstractViewHelper
$out .= '<tr class="volume-horaire" id="service-' . $service->getId() . '-volume-horaire-tr"' . ($details ? '' : ' style="display:none"') . '>';
if ($this->isInRealise()) {
$tvhRealise = $this->getServiceTypeVolumeHoraire()->getRealise();
- $evhValide = $this->getServiceEtatVolumeHoraire()->getValide();
+ $evhValide = $this->getServiceEtatVolumeHoraire()->getValide();
$vhlViewHelper = $this->getVhlViewHelper($service, $tvhPrevu, $evhValide);
$vhlViewHelper->setReadOnly(true);
@@ -362,10 +362,10 @@ class Liste extends AbstractViewHelper
$volumeHoraireListe->setTypeVolumeHoraire($typeVolumeHoraire);
$volumeHoraireListe->setEtatVolumeHoraire($etatVolumeHoraire);
- if ($this->getServiceContext()->isModaliteServicesSemestriel($typeVolumeHoraire)){
+ if ($this->getServiceContext()->isModaliteServicesSemestriel($typeVolumeHoraire)) {
$vhlvh = $this->getView()->volumeHoraireListe($volumeHoraireListe);
/* @var $vhlvh \Application\View\Helper\VolumeHoraire\Liste */
- }else{
+ } else {
$vhlvh = $this->getView()->volumeHoraireListeCalendaire($volumeHoraireListe);
/* @var $vhlvh \Application\View\Helper\VolumeHoraire\ListeCalendaire */
}
@@ -392,8 +392,8 @@ class Liste extends AbstractViewHelper
$data = $this->getTotaux();
- $out = '<tr>';
- $out .= "<th colspan='$colspan' style=\"text-align:right\">Totaux par type d'intervention :</th>\n";
+ $out = '<tr>';
+ $out .= "<th colspan='$colspan' style=\"text-align:right\">Totaux par type d'intervention :</th>\n";
$typesInterventionDisplayed = 0;
foreach ($typesIntervention as $ti) {
if ($this->getTypeInterventionVisibility($ti)) {
@@ -408,7 +408,7 @@ class Liste extends AbstractViewHelper
$out .= "</tr>\n";
$out .= '<tr>';
$out .= "<th colspan=\"$colspan\" style=\"text-align:right\">Total des heures de service :</th>\n";
- $out .= "<td id=\"total-general\" style=\"text-align:right\" data-total=\"".$data['total_general']."\" colspan=\"" . $typesInterventionDisplayed . "\">" . \UnicaenApp\Util::formattedNumber($data['total_general']) . "</td>\n";
+ $out .= "<td id=\"total-general\" style=\"text-align:right\" data-total=\"" . $data['total_general'] . "\" colspan=\"" . $typesInterventionDisplayed . "\">" . \UnicaenApp\Util::formattedNumber($data['total_general']) . "</td>\n";
$out .= "<td> </td>\n";
$out .= "</tr>\n";
@@ -465,7 +465,7 @@ class Liste extends AbstractViewHelper
$data[$ti->getCode()] = 0;
foreach ($this->getServices() as $service) {
- $h = $service->getVolumeHoraireListe()->setTypeVolumeHoraire($this->getTypeVolumehoraire())->setTypeIntervention($ti)->getHeures();
+ $h = $service->getVolumeHoraireListe()->setTypeVolumeHoraire($this->getTypeVolumehoraire())->setTypeIntervention($ti)->getHeures();
$data[$ti->getCode()] += $h;
}
}
@@ -488,10 +488,10 @@ class Liste extends AbstractViewHelper
public function exportParams()
{
$params = [
- 'read-only' => $this->getReadOnly(),
- 'type-volume-horaire' => $this->getTypeVolumeHoraire()->getId(),
- 'columns-visibility' => [],
- 'in-realise' => $this->isInRealise(),
+ 'read-only' => $this->getReadOnly(),
+ 'type-volume-horaire' => $this->getTypeVolumeHoraire()->getId(),
+ 'columns-visibility' => [],
+ 'in-realise' => $this->isInRealise(),
];
foreach ($this->getColumnsList() as $columnName) {
$params['columns-visibility'][$columnName] = $this->getColumnVisibility($columnName);
@@ -544,19 +544,21 @@ class Liste extends AbstractViewHelper
$multiAnnees = false;
$intervenant = null;
$multiIntervenants = false;
- foreach ($services as $service) if ($service){
- if (empty($annee)) {
- $annee = $service->getIntervenant()->getAnnee();
- } elseif ($annee !== $service->getIntervenant()->getAnnee()) {
- $multiAnnees = true;
- break;
- }
+ foreach ($services as $service) {
+ if ($service) {
+ if (empty($annee)) {
+ $annee = $service->getIntervenant()->getAnnee();
+ } elseif ($annee !== $service->getIntervenant()->getAnnee()) {
+ $multiAnnees = true;
+ break;
+ }
- if (empty($intervenant)) {
- $intervenant = $service->getIntervenant();
- } elseif ($intervenant !== $service->getIntervenant()) {
- $multiIntervenants = true;
- break;
+ if (empty($intervenant)) {
+ $intervenant = $service->getIntervenant();
+ } elseif ($intervenant !== $service->getIntervenant()) {
+ $multiIntervenants = true;
+ break;
+ }
}
}
$this->setColumnVisibility('annee', $multiAnnees);
@@ -677,7 +679,7 @@ class Liste extends AbstractViewHelper
if (!isset($this->typesIntervention)) {
$qb = $this->getServiceTypeIntervention()->finderByContext();
$this->getServiceTypeIntervention()->finderByHistorique($qb);
- $this->typesIntervention = $this->getServiceTypeIntervention()->getList( $qb );
+ $this->typesIntervention = $this->getServiceTypeIntervention()->getList($qb);
}
return $this->typesIntervention;
diff --git a/module/Application/src/Application/View/Helper/ServiceReferentiel/Liste.php b/module/Application/src/Application/View/Helper/ServiceReferentiel/Liste.php
index aaea95111cb100abdd855ec61eca7243b495f882..969832720c283a99dd5acd9401a3670b14bbb591 100755
--- a/module/Application/src/Application/View/Helper/ServiceReferentiel/Liste.php
+++ b/module/Application/src/Application/View/Helper/ServiceReferentiel/Liste.php
@@ -128,7 +128,7 @@ class Liste extends AbstractViewHelper
return $this->getView()->url($route,
[
- 'intervenant' => $intervenant->getRouteParam(),
+ 'intervenant' => $intervenant->getId(),
],
[
'query' => ['totaux' => 1],
@@ -214,25 +214,25 @@ class Liste extends AbstractViewHelper
'title' => "Saisir comme réalisées l'ensemble des heures prévisionnelles de référentiel"
. ". Attention toutefois : si des heures réalisées ont déjà été saisies alors ces dernières seront écrasées!",
];
- $out .= '<button type="button" ' . $this->htmlAttribs($attribs) . '>Prévu <span class="glyphicon glyphicon-arrow-right"></span> réalisé</button> ';
- $out .= '<div class="modal fade" id="referentiel-prevu-to-realise-modal" tabindex="-1" role="dialog" aria-hidden="true">';
- $out .= '<div class="modal-dialog modal-md">';
- $out .= '<div class="modal-content">';
- $out .= '<div class="modal-header">';
- $out .= '<button type="button" class="close" data-dismiss="modal" aria-label="Annuler"><span aria-hidden="true">×</span></button>';
- $out .= '<h4 class="modal-title">Saisir comme réalisées l\'ensemble des heures prévisionnelles</h4>';
- $out .= '</div>';
- $out .= '<div class="modal-body">';
- $out .= '<p>Souhaitez-vous réellement saisir comme réalisées l\'ensemble des heures prévisionnelles ?</p>';
- $out .= '<div class="alert alert-warning" role="alert">Attention : si des heures réalisées ont déjà été saisies alors ces dernières seront écrasées!</div>';
- $out .= '</div>';
- $out .= '<div class="modal-footer">';
- $out .= '<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>';
- $out .= '<button type="button" class="btn btn-primary referentiel-prevu-to-realise">OK</button>';
- $out .= '</div>';
- $out .= '</div>';
- $out .= '</div>';
- $out .= '</div>';
+ $out .= '<button type="button" ' . $this->htmlAttribs($attribs) . '>Prévu <span class="glyphicon glyphicon-arrow-right"></span> réalisé</button> ';
+ $out .= '<div class="modal fade" id="referentiel-prevu-to-realise-modal" tabindex="-1" role="dialog" aria-hidden="true">';
+ $out .= '<div class="modal-dialog modal-md">';
+ $out .= '<div class="modal-content">';
+ $out .= '<div class="modal-header">';
+ $out .= '<button type="button" class="close" data-dismiss="modal" aria-label="Annuler"><span aria-hidden="true">×</span></button>';
+ $out .= '<h4 class="modal-title">Saisir comme réalisées l\'ensemble des heures prévisionnelles</h4>';
+ $out .= '</div>';
+ $out .= '<div class="modal-body">';
+ $out .= '<p>Souhaitez-vous réellement saisir comme réalisées l\'ensemble des heures prévisionnelles ?</p>';
+ $out .= '<div class="alert alert-warning" role="alert">Attention : si des heures réalisées ont déjà été saisies alors ces dernières seront écrasées!</div>';
+ $out .= '</div>';
+ $out .= '<div class="modal-footer">';
+ $out .= '<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>';
+ $out .= '<button type="button" class="btn btn-primary referentiel-prevu-to-realise">OK</button>';
+ $out .= '</div>';
+ $out .= '</div>';
+ $out .= '</div>';
+ $out .= '</div>';
} elseif ($this->prevuToPrevu && $this->getServiceServiceReferentiel()->getPrevusFromPrevusData($this->prevuToPrevu)) {
$attribs = [
'class' => 'btn btn-warning referentiel-prevu-to-prevu-show',
@@ -242,24 +242,24 @@ class Liste extends AbstractViewHelper
//'href' => $this->getAddUrl(),
'title' => "Initialiser le service référentiel prévisionnel avec le service référentiel prévisionnel validé l'année dernière",
];
- $out .= '<button type="button" ' . $this->htmlAttribs($attribs) . '>Prévu ' . $this->getServiceContext()->getAnneePrecedente() . ' <span class="glyphicon glyphicon-arrow-right"></span> Prévu ' . $this->getServiceContext()->getAnnee() . '</button> ';
- $out .= '<div class="modal fade" id="referentiel-prevu-to-prevu-modal" tabindex="-1" role="dialog" aria-hidden="true">';
- $out .= '<div class="modal-dialog modal-md">';
- $out .= '<div class="modal-content">';
- $out .= '<div class="modal-header">';
- $out .= '<button type="button" class="close" data-dismiss="modal" aria-label="Annuler"><span aria-hidden="true">×</span></button>';
- $out .= '<h4 class="modal-title">Reporter ici le service prévisionnel validé de l\'année précédente.</h4>';
- $out .= '</div>';
- $out .= '<div class="modal-body">';
- $out .= '<p>Souhaitez-vous réellement initialiser votre service prévisionnel à partir de votre service prévisionnel validé de l\'an dernier ?</p>';
- $out .= '</div>';
- $out .= '<div class="modal-footer">';
- $out .= '<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>';
- $out .= '<button type="button" class="btn btn-primary referentiel-prevu-to-prevu" data-intervenant="' . $this->prevuToPrevu->getRouteParam() . '">OK</button>';
- $out .= '</div>';
- $out .= '</div>';
- $out .= '</div>';
- $out .= '</div>';
+ $out .= '<button type="button" ' . $this->htmlAttribs($attribs) . '>Prévu ' . $this->getServiceContext()->getAnneePrecedente() . ' <span class="glyphicon glyphicon-arrow-right"></span> Prévu ' . $this->getServiceContext()->getAnnee() . '</button> ';
+ $out .= '<div class="modal fade" id="referentiel-prevu-to-prevu-modal" tabindex="-1" role="dialog" aria-hidden="true">';
+ $out .= '<div class="modal-dialog modal-md">';
+ $out .= '<div class="modal-content">';
+ $out .= '<div class="modal-header">';
+ $out .= '<button type="button" class="close" data-dismiss="modal" aria-label="Annuler"><span aria-hidden="true">×</span></button>';
+ $out .= '<h4 class="modal-title">Reporter ici le service prévisionnel validé de l\'année précédente.</h4>';
+ $out .= '</div>';
+ $out .= '<div class="modal-body">';
+ $out .= '<p>Souhaitez-vous réellement initialiser votre service prévisionnel à partir de votre service prévisionnel validé de l\'an dernier ?</p>';
+ $out .= '</div>';
+ $out .= '<div class="modal-footer">';
+ $out .= '<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>';
+ $out .= '<button type="button" class="btn btn-primary referentiel-prevu-to-prevu" data-intervenant="' . $this->prevuToPrevu->getId() . '">OK</button>';
+ $out .= '</div>';
+ $out .= '</div>';
+ $out .= '</div>';
+ $out .= '</div>';
}
$attribs = [
'class' => 'ajax-modal services btn btn-primary',
@@ -267,7 +267,7 @@ class Liste extends AbstractViewHelper
'href' => $this->getAddUrl(),
'title' => 'Ajouter une nouvelle fonction',
];
- $out .= '<a ' . $this->htmlAttribs($attribs) . '><span class="glyphicon glyphicon-plus"></span> Je saisis</a>';
+ $out .= '<a ' . $this->htmlAttribs($attribs) . '><span class="glyphicon glyphicon-plus"></span> Je saisis</a>';
return $out;
}
@@ -276,7 +276,7 @@ class Liste extends AbstractViewHelper
public function mustRenderLigne(ServiceReferentiel $service)
{
- $vhSum = 0;
+ $vhSum = 0;
$vhSum2 = 0;
$vhs = $service->getVolumeHoraireReferentiel();
@@ -334,11 +334,11 @@ class Liste extends AbstractViewHelper
$typesInterventionDisplayed = 0;
$out = '';
- $out .= '<tr>';
- $out .= "<th colspan=\"$colspan\" style=\"text-align:right\">Total des heures de référentiel :</th>\n";
- $out .= "<td id=\"total-referentiel\" style=\"text-align:right\" colspan=\"" . $typesInterventionDisplayed . "\">" . \UnicaenApp\Util::formattedNumber($data['total_general']) . "</td>\n";
- $out .= "<td> </td>\n";
- $out .= "</tr>\n";
+ $out .= '<tr>';
+ $out .= "<th colspan=\"$colspan\" style=\"text-align:right\">Total des heures de référentiel :</th>\n";
+ $out .= "<td id=\"total-referentiel\" style=\"text-align:right\" colspan=\"" . $typesInterventionDisplayed . "\">" . \UnicaenApp\Util::formattedNumber($data['total_general']) . "</td>\n";
+ $out .= "<td> </td>\n";
+ $out .= "</tr>\n";
return $out;
}
@@ -389,7 +389,7 @@ class Liste extends AbstractViewHelper
'total_general' => 0,
];
foreach ($this->getServices() as $service) {
- $h = $service->getVolumeHoraireReferentielListe()->setTypeVolumeHoraire($this->getTypeVolumehoraire())->getHeures();
+ $h = $service->getVolumeHoraireReferentielListe()->setTypeVolumeHoraire($this->getTypeVolumehoraire())->getHeures();
$data['total_general'] += $h;
}
$this->totaux = $data;
diff --git a/module/Application/view/application/contrat/index.phtml b/module/Application/view/application/contrat/index.phtml
index f6706f84708b06836edad057b0172bce0f9a807d..1547fb7ac84088159a5e631512287cba4d06d3a6 100755
--- a/module/Application/view/application/contrat/index.phtml
+++ b/module/Application/view/application/contrat/index.phtml
@@ -10,8 +10,8 @@ use Application\Provider\Privilege\Privileges;
*/
$hasContrat = false;
-foreach( $contrats as $contrat ){
- if (!$contrat->estUnProjet()){
+foreach ($contrats as $contrat) {
+ if (!$contrat->estUnProjet()) {
$hasContrat = true;
}
}
@@ -21,7 +21,7 @@ $this->headTitle()->append($intervenant->getNomUsuel())->append("Contrat/avenant
$this->messenger()->addMessagesFromFlashMessenger();
if ($services['non-contractualises']) {
$this->messenger()->addMessage('Des heures prévisionnelles d\'enseignement validées ne font l\'objet d\'aucun contrat ou avenant. En voici la liste ci-dessous :', 'danger');
-}else{
+} else {
$this->messenger()->addMessage('Tous les enseignements prévisionnels validés ont fait l\'objet d\'un contrat ou d\'un avenant.', 'success');
}
@@ -68,7 +68,7 @@ if ($services['non-contractualises']) {
<td>
<?php if ($canCreer): ?>
<a class="btn btn-primary"
- href="<?= $this->url('contrat/creer', ['intervenant' => $intervenant->getRouteParam(), 'structure' => $structure->getId()]); ?>">
+ href="<?= $this->url('contrat/creer', ['intervenant' => $intervenant->getId(), 'structure' => $structure->getId()]); ?>">
<span class="glyphicon glyphicon-file"></span> Créer un
projet <?= $hasContrat ? 'd\'avenant' : 'de contrat' ?>
</a>
@@ -84,7 +84,8 @@ if ($services['non-contractualises']) {
data-toggle="collapse"
>Afficher/masquer</a></small>
</p>
- <div class="collapse <?php if ($canCreer): ?>in<?php endif; ?>" id="details-enseignements-structure-<?= $sid ?>">
+ <div class="collapse <?php if ($canCreer): ?>in<?php endif; ?>"
+ id="details-enseignements-structure-<?= $sid ?>">
<?= $this->serviceListe($servicesNC)->setReadonly(true)->setColumnVisibility('structure-ens', false)->render(); ?>
</div>
</td>
@@ -93,12 +94,12 @@ if ($services['non-contractualises']) {
</table>
<?php endif; ?>
<div class="well">
- <h2>Contrats et avenants</h2>
- <?php foreach ($contrats as $contrat): ?>
+ <h2>Contrats et avenants</h2>
+ <?php foreach ($contrats as $contrat): ?>
- <?= $this->partial('application/contrat/partial/contrat', ['contrat' => $contrat, 'services' => $services['contractualises'][$contrat->getId()], 'emailIntervenant' => $emailIntervenant]) ?>
+ <?= $this->partial('application/contrat/partial/contrat', ['contrat' => $contrat, 'services' => $services['contractualises'][$contrat->getId()], 'emailIntervenant' => $emailIntervenant]) ?>
- <?php endforeach; ?>
+ <?php endforeach; ?>
</div>
<?php else: ?>
<p>Aucun contrat/avenant trouvé.</p>
diff --git a/module/Application/view/application/dossier/differences.phtml b/module/Application/view/application/dossier/differences.phtml
index a451e25a63adf283c23d00d9ea2a93a612c02c69..569e5ce523f1cfc323ef9bb75d3bcdd348cc0384 100755
--- a/module/Application/view/application/dossier/differences.phtml
+++ b/module/Application/view/application/dossier/differences.phtml
@@ -12,7 +12,7 @@ use Application\Provider\Privilege\Privileges;
$canPurge = $this->isAllowed(Privileges::getResourceId(Privileges::DOSSIER_PURGER_DIFFERENCES));
if ($canPurge) {
- $urlPurge = $this->url('intervenant/dossier/purger-differences', ['intervenant' => $this->intervenant->getRouteParam()]);
+ $urlPurge = $this->url('intervenant/dossier/purger-differences', ['intervenant' => $this->intervenant->getId()]);
} else {
$urlPurge = null;
}
@@ -62,7 +62,7 @@ if ($canPurge) {
</a>
<a class="btn btn-warning"
- href="<?= $this->url('intervenant/dossier', ['intervenant' => $intervenant->getRouteParam()]) ?>"
+ href="<?= $this->url('intervenant/dossier', ['intervenant' => $intervenant->getId()]) ?>"
>Voir les données personnelles de <?= $intervenant ?></a>
<?php if ($canPurge): ?>
diff --git a/module/Application/view/application/indicateur/depassement-charges.phtml b/module/Application/view/application/indicateur/depassement-charges.phtml
index 090de11b41129f909a2684bdb7b8f0277b5aa808..d96330c31b9d5a3dad4c3049a3df19b1db96ef09 100755
--- a/module/Application/view/application/indicateur/depassement-charges.phtml
+++ b/module/Application/view/application/indicateur/depassement-charges.phtml
@@ -10,7 +10,7 @@ use Application\Entity\Db\Intervenant;
* @var $idcs IndicateurDepassementCharges[]
*/
-$servicesUrl = $this->url('intervenant/services', ['intervenant' => $intervenant->getRouteParam()]);
+$servicesUrl = $this->url('intervenant/services', ['intervenant' => $intervenant->getId()]);
?>
<h1 class="page-header"><?= $title ?></h1>
diff --git a/module/Application/view/application/intervenant/fiche.phtml b/module/Application/view/application/intervenant/fiche.phtml
index be1931bcd0d0e69618e1bd758ebfefa625c05a29..06978e863e766d2bdaec1bfd30dcc078003e6264 100755
--- a/module/Application/view/application/intervenant/fiche.phtml
+++ b/module/Application/view/application/intervenant/fiche.phtml
@@ -4,17 +4,17 @@
echo $this->intervenant($intervenant);
-$urlRefresh = $this->url('workflow/feuille-de-route-refresh', ['intervenant' => $intervenant->getRouteParam()]);
+$urlRefresh = $this->url('workflow/feuille-de-route-refresh', ['intervenant' => $intervenant->getId()]);
?>
<script>
$(function () {
$('#feuille-de-route-refresh').popAjax({
change: function (event, popAjax) {
- if (0 == popAjax.popDiv.find('.alert-danger').length){
+ if (0 == popAjax.popDiv.find('.alert-danger').length) {
window.location.reload();
- }else{
+ } else {
console.log(popAjax.popDiv);
popAjax.popDiv.find('.popover-content').append(
'<button onclick="window.location.reload();" type="button" class="btn btn-primary">J\'ai lu, recharger la page</button>'
diff --git a/module/Application/view/application/intervenant/liste.phtml b/module/Application/view/application/intervenant/liste.phtml
index bdd75d90936faf21ceacd2f8105310408f8052c3..3fd9cc9e9dd71e5a3a9500e2418278b0a6fdff57 100755
--- a/module/Application/view/application/intervenant/liste.phtml
+++ b/module/Application/view/application/intervenant/liste.phtml
@@ -1,5 +1,5 @@
<?php
- /* @var $intervenants array */
+/* @var $intervenants array */
?>
<table class="table table-bordered table-condensed">
<thead>
@@ -14,9 +14,11 @@
</tr>
</thead>
<tbody class="table-hover">
- <?php foreach($intervenants as $sourceCode => $intervenant): ?>
+ <?php foreach ($intervenants
+
+ as $code => $intervenant): ?>
<tr>
- <td style="white-space: nowrap"><a href="<?= $this->url('intervenant/voir', ['intervenant' => $sourceCode]); ?>">
+ <td style="white-space: nowrap"><a href="<?= $this->url('intervenant/voir', ['intervenant' => $code]); ?>">
<span class="glyphicon glyphicon-eye-open"></span> Fiche
</a></td>
<td><?= $intervenant['civilite'] ?></td>
diff --git a/module/Application/view/application/intervenant/partial/cloture.phtml b/module/Application/view/application/intervenant/partial/cloture.phtml
index 9bce79229767e398b911eb0de8d39072afd06d0d..09ee34f7ac20cdaf836032590dd9dea5ae55a90e 100755
--- a/module/Application/view/application/intervenant/partial/cloture.phtml
+++ b/module/Application/view/application/intervenant/partial/cloture.phtml
@@ -29,35 +29,35 @@ $canEditAfter = $this->isAllowed(Privileges::getResourceId(Privileges::CLOTURE_
</div>
<a
- href="<?= $this->url('intervenant/cloturer', ['intervenant' => $cloture->getIntervenant()->getRouteParam()]) ?>"
- class="pop-ajax btn-cloturer-saisie btn btn-lg btn-info"
- data-title="Clôture des services réalisés"
- data-content="
+ href="<?= $this->url('intervenant/cloturer', ['intervenant' => $cloture->getIntervenant()->getId()]) ?>"
+ class="pop-ajax btn-cloturer-saisie btn btn-lg btn-info"
+ data-title="Clôture des services réalisés"
+ data-content="
<p class='lead text-danger'><strong>Attention!</strong></p>
<p>Confirmez-vous avoir saisi la totalité de vos services réalisés (enseignements et référentiel),
quelle que soit la composante d'intervention ?</p>
<p>Cliquer sur “Je clôture” vous empêchera de revenir sur votre saisie.</p>
"
- data-confirm="true"
- data-confirm-button="<span class='glyphicon glyphicon-ok'></span> Je clôture mes services"
- data-submit-reload="true"
+ data-confirm="true"
+ data-confirm-button="<span class='glyphicon glyphicon-ok'></span> Je clôture mes services"
+ data-submit-reload="true"
><?= $this->translate('J\'ai terminé la saisie de la totalité de mon service réalisé') ?></a>
<br/><br/>
<?php elseif (!$isSelf && !$isCloture): ?>
<a
- href="<?= $this->url('intervenant/cloturer', ['intervenant' => $cloture->getIntervenant()->getRouteParam()]) ?>"
- class="pop-ajax btn-cloturer-saisie btn btn-lg btn-info"
- data-title="Clôture des services réalisés"
- data-content="
+ href="<?= $this->url('intervenant/cloturer', ['intervenant' => $cloture->getIntervenant()->getId()]) ?>"
+ class="pop-ajax btn-cloturer-saisie btn btn-lg btn-info"
+ data-title="Clôture des services réalisés"
+ data-content="
<p class='lead text-danger'><strong>Attention!</strong></p>
<p>Confirmez-vous vouloir clôturer les services réalisés de <?= $cloture->getIntervenant() ?>
quelle que soit la composante d'intervention ?</p>
"
- data-confirm="true"
- data-confirm-button="<span class='glyphicon glyphicon-ok'></span> Clôture des services"
- data-submit-reload="true"
+ data-confirm="true"
+ data-confirm-button="<span class='glyphicon glyphicon-ok'></span> Clôture des services"
+ data-submit-reload="true"
><?= $this->translate('L\'intervenant a terminé la saisie de la totalité de son service réalisé') ?></a>
<br/><br/>
@@ -73,22 +73,23 @@ $canEditAfter = $this->isAllowed(Privileges::getResourceId(Privileges::CLOTURE_
<?php if ($cloture->getIntervenant()->hasMiseEnPaiement()): ?>
<p><strong>Vous ne pouvez plus modifier le service réalisé car outre la clôture de saisie,
des demandes de mise en paiement et/ou des mises en paiement ont été faites.
- Pour pouvoir modifier à nouveau le service, toutes les demandes de mise en paiement ET toutes les mises en paiement
+ Pour pouvoir modifier à nouveau le service, toutes les demandes de mise en paiement ET toutes les
+ mises en paiement
doivent être supprimées.
</strong></p>
<?php endif; ?>
<?php endif; ?>
<?php if ($canDecloturer): ?>
<a
- href="<?= $this->url('intervenant/cloturer', ['intervenant' => $cloture->getIntervenant()->getRouteParam()]) ?>"
- class="pop-ajax btn-decloturer-saisie btn btn-danger"
- data-content="
+ href="<?= $this->url('intervenant/cloturer', ['intervenant' => $cloture->getIntervenant()->getId()]) ?>"
+ class="pop-ajax btn-decloturer-saisie btn btn-danger"
+ data-content="
<p class='lead text-danger'><strong>Attention!</strong></p>
<p>Êtes-vous sûr de vouloir supprimer la clôture des services réalisés ?</p>
"
- data-confirm="true"
- data-confirm-button="<span class='glyphicon glyphicon-ok'></span> Oui, supprimer la clôture"
- data-submit-reload="true"
+ data-confirm="true"
+ data-confirm-button="<span class='glyphicon glyphicon-ok'></span> Oui, supprimer la clôture"
+ data-submit-reload="true"
>Supprimer la clôture</a>
<?php endif; ?>
<div style="clear:both"></div>
diff --git a/module/Application/view/application/intervenant/partial/horodatage.phtml b/module/Application/view/application/intervenant/partial/horodatage.phtml
index b4ced4c951dd1da8e329b6cb61e396be492449a2..ce30e28966a0f28b03a883a6e0c25722e4ba7cb8 100755
--- a/module/Application/view/application/intervenant/partial/horodatage.phtml
+++ b/module/Application/view/application/intervenant/partial/horodatage.phtml
@@ -9,13 +9,13 @@
?>
<div id="s<?= $referentiel ? 'r' : '' ?>-horodatage" data-url="<?= $this->url('service/horodatage', [
- 'intervenant' => $intervenant->getRouteParam(),
- 'typeVolumeHoraire' => $typeVolumeHoraire->getId(),
+ 'intervenant' => $intervenant->getId(),
+ 'typeVolumeHoraire' => $typeVolumeHoraire->getId(),
+ 'referentiel' => $referentiel,
+]); ?>">
+ <?= $this->partial('application/service/horodatage', [
+ 'intervenant' => $intervenant,
+ 'typeVolumeHoraire' => $typeVolumeHoraire,
'referentiel' => $referentiel,
- ]); ?>">
- <?= $this->partial('application/service/horodatage', [
- 'intervenant' => $intervenant,
- 'typeVolumeHoraire' => $typeVolumeHoraire,
- 'referentiel' => $referentiel,
- ]); ?>
+ ]); ?>
</div>
\ No newline at end of file
diff --git a/module/Application/view/application/intervenant/services.phtml b/module/Application/view/application/intervenant/services.phtml
index 2ae33fec5e6be7fdec3595930dbac6536c4f4ef6..1cce05afde2f1a9f5f854ffcc744954d9634921c 100755
--- a/module/Application/view/application/intervenant/services.phtml
+++ b/module/Application/view/application/intervenant/services.phtml
@@ -29,9 +29,9 @@ if ($typeVolumeHoraire->isPrevu()) {
$title = 'Constatation des enseignements réalisés';
}
-$menuUrl = $this->url('intervenant/services', ['intervenant' => $intervenant->getRouteParam()], ['query' => ['menu' => 1]]);
+$menuUrl = $this->url('intervenant/services', ['intervenant' => $intervenant->getId()], ['query' => ['menu' => 1]]);
-$btnNextUrl = $this->url('workflow/feuille-de-route-btn-next', ['intervenant' => $intervenant->getRouteParam(), 'wfEtapeCode' => $nextEtape]);
+$btnNextUrl = $this->url('workflow/feuille-de-route-btn-next', ['intervenant' => $intervenant->getId(), 'wfEtapeCode' => $nextEtape]);
$this->headTitle()->append($intervenant->getNomUsuel())->append($title);
$title .= ' <small>' . $intervenant . '</small>';
diff --git a/module/Application/view/application/intervenant/supprimer.phtml b/module/Application/view/application/intervenant/supprimer.phtml
index f9781f753f77cd3742369b51359bfce93e470d14..4d450f36127ad36583dd422c7e53cee690f47b8c 100755
--- a/module/Application/view/application/intervenant/supprimer.phtml
+++ b/module/Application/view/application/intervenant/supprimer.phtml
@@ -8,7 +8,7 @@
if ($intervenant) {
echo $this->tag('div', [
'id' => 'int-suppr-div',
- 'data-url' => $this->url('intervenant/supprimer', ['intervenant' => $intervenant->getRouteParam()]),
+ 'data-url' => $this->url('intervenant/supprimer', ['intervenant' => $intervenant->getId()]),
])->open();
}
@@ -52,21 +52,19 @@ if ($data) {
</script>
<?php
-
-}else{
+} else {
?>
<script>
- window.setTimeout(function(){
+ window.setTimeout(function () {
window.location.href = <?= json_encode($this->url('intervenant/rechercher')); ?>
- }, 2000 );
+ }, 2000);
</script>
<?php
-
}
if ($intervenant) echo '</div>';
\ No newline at end of file
diff --git a/module/Application/view/application/intervenant/voir.phtml b/module/Application/view/application/intervenant/voir.phtml
index f0c5a1771be47b8695fffb851db17aff01e9f7ff..f8603eef5d8a09e6325c9f687405461780e80dcb 100755
--- a/module/Application/view/application/intervenant/voir.phtml
+++ b/module/Application/view/application/intervenant/voir.phtml
@@ -20,7 +20,7 @@ $tabs = [
'id' => 'fiche',
'label' => '<span class="glyphicon glyphicon-eye-open"></span> Fiche',
'content' => $this->partial('application/intervenant/fiche.phtml', compact('intervenant', 'role')),
- 'url' => $this->url('intervenant/fiche', ['intervenant' => $intervenant->getRouteParam()]),
+ 'url' => $this->url('intervenant/fiche', ['intervenant' => $intervenant->getId()]),
'force-refresh' => true,
],
];
@@ -29,7 +29,7 @@ if ($this->isAllowed(Privileges::getResourceId(Privileges::INTERVENANT_EDITION))
$tabs[] = [
'id' => 'edition',
'label' => '<span class="glyphicon glyphicon-pencil"></span> Édition',
- 'url' => $this->url('intervenant/saisir', ['intervenant' => $intervenant->getRouteParam()]),
+ 'url' => $this->url('intervenant/saisir', ['intervenant' => $intervenant->getId()]),
];
}
@@ -37,7 +37,7 @@ if ($this->isAllowed(Privileges::getResourceId(Privileges::INTERVENANT_SUPPRESSI
$tabs[] = [
'id' => 'suppression',
'label' => '<span class="glyphicon glyphicon-trash"></span> Suppression',
- 'url' => $this->url('intervenant/supprimer', ['intervenant' => $intervenant->getRouteParam()]),
+ 'url' => $this->url('intervenant/supprimer', ['intervenant' => $intervenant->getId()]),
'force-refresh' => true,
];
}
diff --git a/module/Application/view/application/paiement/edition-mise-en-paiement.phtml b/module/Application/view/application/paiement/edition-mise-en-paiement.phtml
index c69681b155a132330e2c491c0d1dc233b54630f5..b5f6d84fe9b8b433b5b3a641e04b802c6a729585 100755
--- a/module/Application/view/application/paiement/edition-mise-en-paiement.phtml
+++ b/module/Application/view/application/paiement/edition-mise-en-paiement.phtml
@@ -13,85 +13,90 @@ $this->headTitle()->append($intervenant->getNomUsuel())->append("Mises en paieme
<small><?= $intervenant ?></small>
</h1>
<form method="post" id="mepform">
-<table class="table table-bordered table-condensed table-extra-condensed table-hover table-sort">
- <thead>
- <tr>
- <th> </th>
- <th>Composante</th>
- <th>Enseignement</th>
- <th>Centre de coûts</th>
- <th>Domaine fonctionel</th>
- <th>Période</th>
- <th>Type</th>
- <th>HETD</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($paiements as $paiement):
- if ($paiement->getFormuleResultatService()){
- $service = $paiement->getFormuleResultatService()->getService();
- if ($service->getElementPedagogique()) {
- $composante = $service->getElementPedagogique()->getStructure();
+ <table class="table table-bordered table-condensed table-extra-condensed table-hover table-sort">
+ <thead>
+ <tr>
+ <th> </th>
+ <th>Composante</th>
+ <th>Enseignement</th>
+ <th>Centre de coûts</th>
+ <th>Domaine fonctionel</th>
+ <th>Période</th>
+ <th>Type</th>
+ <th>HETD</th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($paiements as $paiement):
+ if ($paiement->getFormuleResultatService()) {
+ $service = $paiement->getFormuleResultatService()->getService();
+ if ($service->getElementPedagogique()) {
+ $composante = $service->getElementPedagogique()->getStructure();
+ } else {
+ $composante = $intervenant->getStructure();
+ }
} else {
- $composante = $intervenant->getStructure();
+ $service = null;
+ $serviceReferentiel = $paiement->getFormuleResultatServiceReferentiel()->getServiceReferentiel();
+ $composante = $serviceReferentiel->getStructure();
}
- }else{
- $service = null;
- $serviceReferentiel = $paiement->getFormuleResultatServiceReferentiel()->getServiceReferentiel();
- $composante = $serviceReferentiel->getStructure();
- }
- ?>
- <tr>
- <td style="text-align:center;vertical-align:middle"><?= $this->formCheckbox(new \Zend\Form\Element\Checkbox('mep['.$paiement->getId().']')) ?></td>
- <td><?= $this->structure($composante)->renderLink() ?></td>
- <td><?php
- if ($service){
- if ($service->getElementPedagogique()){
- echo $this->elementPedagogique($service->getElementPedagogique())->renderLink();
- }else{
- if ($service->getDescription()){
- echo $this->etablissement($service->getEtablissement())->renderLink().' - '.$service->getDescription();
- }else{
- echo $this->etablissement($service->getEtablissement())->renderLink();
+ ?>
+ <tr>
+ <td style="text-align:center;vertical-align:middle"><?= $this->formCheckbox(new \Zend\Form\Element\Checkbox('mep[' . $paiement->getId() . ']')) ?></td>
+ <td><?= $this->structure($composante)->renderLink() ?></td>
+ <td><?php
+ if ($service) {
+ if ($service->getElementPedagogique()) {
+ echo $this->elementPedagogique($service->getElementPedagogique())->renderLink();
+ } else {
+ if ($service->getDescription()) {
+ echo $this->etablissement($service->getEtablissement())->renderLink() . ' - ' . $service->getDescription();
+ } else {
+ echo $this->etablissement($service->getEtablissement())->renderLink();
+ }
}
-
+ } else {
+ echo $this->fonctionReferentiel($serviceReferentiel->getFonction())->renderLink();
}
- }else{
- echo $this->fonctionReferentiel($serviceReferentiel->getFonction())->renderLink();
- }
- ?></td>
- <td><?= $paiement->getCentreCout() ?></td>
- <td><?= $paiement->getDomaineFonctionnel() ?></td>
- <td data-order="<?= $paiement->getPeriodePaiement() ? $paiement->getPeriodePaiement()->getOrdre() : 999999999 ?>"><?= $paiement->getPeriodePaiement() ? $paiement->getPeriodePaiement()->getLibelleAnnuel($intervenant->getAnnee()) : '<i>Simple demande</i>' ?></td>
- <td><?= $paiement->getTypeHeures() ?></td>
- <td><?= \UnicaenApp\Util::formattedNumber($paiement->getHeures()) ?></td>
- </tr>
- <?php endforeach; ?>
- </tbody>
-</table>
-<div>
- <button class="btn btn-default btn-xs" type="button" onclick="$('.table-sort :checkbox').prop('checked', true);">Tout sélectionner</button>
- <button class="btn btn-default btn-xs" type="button" onclick="$('.table-sort :checkbox').prop('checked', false);">Ne rien sélectionner</button>
-</div>
-<div style="margin-top: .5em;margin-bottom: .5em">
- <button class="btn btn-danger pop-ajax" type="button"
- data-content="Voulez-vous réellement annuler ces mises en paiement ?
+ ?></td>
+ <td><?= $paiement->getCentreCout() ?></td>
+ <td><?= $paiement->getDomaineFonctionnel() ?></td>
+ <td data-order="<?= $paiement->getPeriodePaiement() ? $paiement->getPeriodePaiement()->getOrdre() : 999999999 ?>"><?= $paiement->getPeriodePaiement() ? $paiement->getPeriodePaiement()->getLibelleAnnuel($intervenant->getAnnee()) : '<i>Simple demande</i>' ?></td>
+ <td><?= $paiement->getTypeHeures() ?></td>
+ <td><?= \UnicaenApp\Util::formattedNumber($paiement->getHeures()) ?></td>
+ </tr>
+ <?php endforeach; ?>
+ </tbody>
+ </table>
+ <div>
+ <button class="btn btn-default btn-xs" type="button" onclick="$('.table-sort :checkbox').prop('checked', true);">Tout
+ sélectionner
+ </button>
+ <button class="btn btn-default btn-xs" type="button" onclick="$('.table-sort :checkbox').prop('checked', false);">Ne
+ rien sélectionner
+ </button>
+ </div>
+ <div style="margin-top: .5em;margin-bottom: .5em">
+ <button class="btn btn-danger pop-ajax" type="button"
+ data-content="Voulez-vous réellement annuler ces mises en paiement ?
<div class='alert alert-warning'>
<button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button>
Attention : Retirer les mises en paiement ne signifie pas qu'elles sont supprimées. Elles ne sont remises qu'à l'état de simples demandes de mises en paiement.
- Pour les supprimer définitivement, il convient de retirer également les <a class='no-intranavigation' href='<?= $this->url('intervenant/mise-en-paiement/demande', ['intervenant' => $intervenant->getRouteParam()]) ?>'>demandes de mises en paiement</a>.
+ Pour les supprimer définitivement, il convient de retirer également les <a class='no-intranavigation' href='<?= $this->url('intervenant/mise-en-paiement/demande', ['intervenant' => $intervenant->getId()]) ?>'>demandes de mises en paiement</a>.
</div>
<div style='text-align:right'>
<button type='button' class='btn btn-default pop-ajax-hide'>Non</button>
<button type='button' class='btn btn-primary' onclick='enregistrer()'>Oui</button></div>"
- ><span class="glyphicon glyphicon-trash"></span> Annuler les mises en paiement</button>
-</div>
-<?= $this->form()->closeTag() ?>
-<script type="text/javascript">
+ ><span class="glyphicon glyphicon-trash"></span> Annuler les mises en paiement
+ </button>
+ </div>
+ <?= $this->form()->closeTag() ?>
+ <script type="text/javascript">
- function enregistrer(){
- $("#mepform").submit();
- }
+ function enregistrer()
+ {
+ $("#mepform").submit();
+ }
-</script>
+ </script>
diff --git a/module/Application/view/application/piece-jointe/index.phtml b/module/Application/view/application/piece-jointe/index.phtml
index 4da0399ead1392b02d5eb3e37af8c60a28945b68..ddf163293a923ecb27ca9d7a9ef266547aa7c28a 100755
--- a/module/Application/view/application/piece-jointe/index.phtml
+++ b/module/Application/view/application/piece-jointe/index.phtml
@@ -18,9 +18,9 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUS
$canValider = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFICATIVE_VALIDATION));
$canDevalider = $this->isAllowed(Privileges::getResourceId(Privileges::PIECE_JUSTIFICATIVE_DEVALIDATION));
-$infosUrl = $this->url('piece-jointe/intervenant/infos', ['intervenant' => $intervenant->getRouteParam()]);
+$infosUrl = $this->url('piece-jointe/intervenant/infos', ['intervenant' => $intervenant->getId()]);
-$menuUrl = $this->url('intervenant/services', ['intervenant' => $intervenant->getRouteParam()], ['query' => ['menu' => 1]]);
+$menuUrl = $this->url('intervenant/services', ['intervenant' => $intervenant->getId()], ['query' => ['menu' => 1]]);
?>
<h1 class="page-header"><?= $title ?></h1>