diff --git a/README-LABINVENT.md b/README-LABINVENT.md index b67ece8..f9053f3 100755 --- a/README-LABINVENT.md +++ b/README-LABINVENT.md @@ -50,9 +50,9 @@ Logiciel testé et validé sur les configurations suivantes : VERSION ACTUELLE -Date: 18/05/2016 -Version: 2.2.2.1 -Demande (terminée): Bugfixes nombre catégorie/sous-catégorie associé +Date: 19/05/2016 +Version: 2.2.3.0 +Demande (terminée): https://projects.irap.omp.eu/issues/3642 Version majeure en cours (2.2): https://projects.irap.omp.eu/versions/106 diff --git a/src/Controller/MaterielsController.php b/src/Controller/MaterielsController.php index fbec810..584c5b8 100755 --- a/src/Controller/MaterielsController.php +++ b/src/Controller/MaterielsController.php @@ -204,6 +204,8 @@ class MaterielsController extends AppController $this->set(compact('s_sur_categories', 's_categories', 's_sous_categories', 's_groupes_thematiques', 's_groupes_metiers', 's_organismes')); + $resultTri = $this->request->session()->read("resultTri"); + // some data POSTED (au moins le champ de recherche generale) ? if ( isset($this->request->data['s_all']) || isset($this->request->data['s_all_2']) || isset($this->request->data['s_designation'])) { $generalFieldConditions = NULL; @@ -316,12 +318,6 @@ class MaterielsController extends AppController // CONSTRUCTION DE LA REQUETE SQL COMPLETE = $specificFieldsConditions OR $generalFieldConditions (mais entre chaque champ, c'est un AND) // by default, no sort - $order = []; - - if (isset($this->passedArgs[0]) && isset($this->passedArgs[1])) { - $order = $this->passedArgs[0]; - $order .= ' '.$this->passedArgs[1]; - } if (isset($this->request->data['s_all_2']) && $this->request->data['s_all_2'] != '') { $conditions = $generalFieldConditions; @@ -333,19 +329,34 @@ class MaterielsController extends AppController $conditions = $specificFieldsConditions; } - $lastResults = $this->Materiels->find('all', ['limit' => 1000, 'order' => $order, 'conditions' => $conditions])->toArray(); - - $this->set('_results', $lastResults); - $this->request->session()->write("result", $lastResults); + $lastResults = $this->Materiels->find('all', ['limit' => 1000, 'conditions' => $conditions]); - $getSortLinkForColumnTitle = function ($label, $fieldName) { - return "
= $this->Paginator->sort('designation','Désignation') ?> | += $this->Paginator->sort('numero_laboratoire', 'N° interne (labo)') ?> | += $this->Paginator->sort('categorie_id', 'Catégorie') ?> | += $this->Paginator->sort('nom_responsable', 'Responsable') ?> | += $this->Paginator->sort('status', 'Statut') ?> | += $this->Paginator->sort('date_acquisition', 'Date') ?> | -- libgit2 0.21.2 |
---|