From 3b7290e04cf9132cc9871317105cef2336af3373 Mon Sep 17 00:00:00 2001 From: jgaimard <jgaimard@git-test.afi-sa.fr> Date: Fri, 31 May 2013 10:01:31 +0000 Subject: [PATCH] libelle facettes --- library/Class/AdminVar.php | 14 ++++++++++++-- library/Class/Codification.php | 19 ++++++++++++++----- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/library/Class/AdminVar.php b/library/Class/AdminVar.php index 6f46e7c4329..3fcb5f17512 100644 --- a/library/Class/AdminVar.php +++ b/library/Class/AdminVar.php @@ -51,8 +51,6 @@ class Class_AdminVar extends Storm_Model_Abstract { 'WORKFLOW', 'BIBNUM', 'FORMATIONS', - 'PCDM4_LIB', - 'DEWEY_LIB', 'VODECLIC_BMKEY', 'VODECLIC_BMID', 'CVS_BMKEY', @@ -75,6 +73,18 @@ class Class_AdminVar extends Storm_Model_Abstract { 'ROOT_URL_ECOUTE', 'URL_TYPO3', 'CHAMPS_FICHE_UTILISATEUR', + 'FACETTE_PCDM4_LIBELLE', + 'FACETTE_DEWEY_LIBELLE', + 'FACETTE_TYPE_DOC_LIBELLE', + 'FACETTE_LANGUE_LIBELLE', + 'FACETTE_GENRE_LIBELLE', + 'FACETTE_SITE_LIBELLE', + 'FACETTE_SECTION_LIBELLE', + 'FACETTE_BIBLIOTHEQUE_LIBELLE', + 'FACETTE_AUTEUR_LIBELLE', + 'FACETTE_INTERET_LIBELLE', + 'FACETTE_MATIERE_LIBELLE', + 'FACETTE_TAG_LIBELLE', ); diff --git a/library/Class/Codification.php b/library/Class/Codification.php index 2df82dfb40e..37c3f628bda 100644 --- a/library/Class/Codification.php +++ b/library/Class/Codification.php @@ -94,8 +94,8 @@ class Class_Codification { { case "X": $lib=array(" ","Dewey","Pcdm4"); - $l=getVar("PCDM4_LIB"); if(trim($l)) $lib[2]=$l; - $l=getVar("DEWEY_LIB"); if(trim($l)) $lib[1]=$l; + $l=getVar("FACETTE_PCDM4_LIBELLE"); if(trim($l)) $lib[2]=$l; + $l=getVar("FACETTE_DEWEY_LIBELLE"); if(trim($l)) $lib[1]=$l; return $lib[intval($id)]; case "D": return Class_Dewey::getLibelle($id); case "P": return Class_Pcdm4::getLibelle($id); @@ -145,11 +145,20 @@ class Class_Codification { "8" => array($translate->_("Lien internet"),$translate->_("Liens internet"))]; $this->addThesauriToNomChamps(); - $l=getVar("PCDM4_LIB"); if(trim($l)) {$this->_nom_champs["P"][0]=$l; $this->_nom_champs["P"][1]=$l; } - $l=getVar("DEWEY_LIB"); if(trim($l)) {$this->_nom_champs["D"][0]=$l; $this->_nom_champs["D"][1]=$l; } + $l=getVar("FACETTE_PCDM4_LIBELLE"); if(trim($l)) {$this->_nom_champs["P"][0]=$l; $this->_nom_champs["P"][1]=$l; } + $l=getVar("FACETTE_DEWEY_LIBELLE"); if(trim($l)) {$this->_nom_champs["D"][0]=$l; $this->_nom_champs["D"][1]=$l; } + $l=getVar("FACETTE_TYPE_DOC_LIBELLE"); if(trim($l)) {$this->_nom_champs["T"][0]=$l; $this->_nom_champs["T"][1]=$l; } + $l=getVar("FACETTE_LANGUE_LIBELLE"); if(trim($l)) {$this->_nom_champs["L"][0]=$l; $this->_nom_champs["L"][1]=$l; } + $l=getVar("FACETTE_GENRE_LIBELLE"); if(trim($l)) {$this->_nom_champs["G"][0]=$l; $this->_nom_champs["G"][1]=$l; } + $l=getVar("FACETTE_SITE_LIBELLE"); if(trim($l)) {$this->_nom_champs["B"][0]=$l; $this->_nom_champs["B"][1]=$l; } + $l=getVar("FACETTE_SECTION_LIBELLE"); if(trim($l)) {$this->_nom_champs["S"][0]=$l; $this->_nom_champs["S"][1]=$l; } + $l=getVar("FACETTE_BIBLIOTHEQUE_LIBELLE"); if(trim($l)) {$this->_nom_champs["Y"][0]=$l; $this->_nom_champs["Y"][1]=$l; } + $l=getVar("FACETTE_AUTEUR_LIBELLE"); if(trim($l)) {$this->_nom_champs["A"][0]=$l; $this->_nom_champs["A"][1]=$l; } + $l=getVar("FACETTE_INTERET_LIBELLE"); if(trim($l)) {$this->_nom_champs["F"][0]=$l; $this->_nom_champs["F"][1]=$l; } + $l=getVar("FACETTE_MATIERE_LIBELLE"); if(trim($l)) {$this->_nom_champs["M"][0]=$l; $this->_nom_champs["M"][1]=$l; } + $l=getVar("FACETTE_TAG_LIBELLE"); if(trim($l)) {$this->_nom_champs["Z"][0]=$l; $this->_nom_champs["Z"][1]=$l; } } - function addThesauriToNomChamps() { $thesauri=Class_CodifThesaurus::getIndices('root',true); foreach ($thesauri as $thesaurus) { -- GitLab