Skip to content
Snippets Groups Projects
Commit 23a77035 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Utilisation du optionify pour les filtre d'UR

parent 38f8de41
No related branches found
No related tags found
No related merge requests found
...@@ -636,7 +636,7 @@ class StructureService extends BaseService ...@@ -636,7 +636,7 @@ class StructureService extends BaseService
->andWhere('substitutionTo.id IS NULL OR pasHistorise(substitutionTo) != 1'); ->andWhere('substitutionTo.id IS NULL OR pasHistorise(substitutionTo) != 1');
if ($order) $qb->orderBy(' structure.' . $order); if ($order) $qb->orderBy(' structure.' . $order);
else { else {
if ($type === TypeStructure::CODE_ECOLE_DOCTORALE) $qb->orderBy('structure.ferme, structureConcrete.sourceCode'); if ($type === TypeStructure::CODE_ECOLE_DOCTORALE || $type === TypeStructure::CODE_UNITE_RECHERCHE) $qb->orderBy('structure.ferme, structureConcrete.sourceCode');
} }
$result = $qb->getQuery()->getResult(); $result = $qb->getQuery()->getResult();
......
...@@ -545,20 +545,20 @@ class TheseRechercheService ...@@ -545,20 +545,20 @@ class TheseRechercheService
private function fetchUnitesRecherchesOptions() private function fetchUnitesRecherchesOptions()
{ {
//$urs = $this->getStructureService()->getAllStructuresAffichablesByType(TypeStructure::CODE_UNITE_RECHERCHE, 'libelle'); $urs = $this->getStructureService()->getAllStructuresAffichablesByType(TypeStructure::CODE_UNITE_RECHERCHE);
$all = $this->getStructureService()->getUnitesRechercheSelection(); // $all = $this->getStructureService()->getUnitesRechercheSelection();
$options = []; $options = [];
// foreach ($urs as $ur) { foreach ($urs as $ur) {
// $options[] = $this->optionify($ur); $options[] = $this->optionify($ur);
}
// foreach ($all as $a) {
// $options[] = [
// 'value' => $a[4], //['sourceCode'],
// 'label' => $a[3], //['sigle'],
// 'subtext' => $a[2], //['libelle']
// ];
// } // }
foreach ($all as $a) {
$options[] = [
'value' => $a[4], //['sourceCode'],
'label' => $a[3], //['sigle'],
'subtext' => $a[2], //['libelle']
];
}
// usort($options, function($a, $b) { // usort($options, function($a, $b) {
// return strcmp($a['label'], $b['label']); // return strcmp($a['label'], $b['label']);
// }); // });
...@@ -785,7 +785,7 @@ class TheseRechercheService ...@@ -785,7 +785,7 @@ class TheseRechercheService
} elseif ($value instanceof UniteRecherche) { } elseif ($value instanceof UniteRecherche) {
$subtext = $value->getLibelle(); $subtext = $value->getLibelle();
if ($value->getStructure()->isFerme()) $subtext.= "&nbsp; <span class='label' style='color:darkred;'>FERMEE</span>"; if ($value->getStructure()->isFerme()) $subtext.= "&nbsp; <span class='label' style='color:darkred;'>FERMEE</span>";
return ['value' => $value->getSourceCode(), 'label' => $value->getCode(), 'subtext' => $subtext]; return ['value' => $value->getSourceCode(), 'label' => $value->getSigle(), 'subtext' => $subtext];
} elseif ($value instanceof DomaineScientifique) { } elseif ($value instanceof DomaineScientifique) {
return ['value' => (string) $value->getId(), 'label' => $value->getLibelle()]; return ['value' => (string) $value->getId(), 'label' => $value->getLibelle()];
} elseif ($value instanceof OrigineFinancement) { } elseif ($value instanceof OrigineFinancement) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment