From ad36ad7f1e8ae185dae97f1c12b7e45766bbedab Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 6 Apr 2012 09:08:13 +0000 Subject: [PATCH] Affichage des profils --- application/Bootstrap.php | 13 ++ application/controllers/ProfilController.php | 9 +- application/views/scripts/profil/detail.phtml | 130 +----------------- application/views/scripts/profil/index.phtml | 2 +- 4 files changed, 27 insertions(+), 127 deletions(-) diff --git a/application/Bootstrap.php b/application/Bootstrap.php index 018c15c6..82dc2c99 100644 --- a/application/Bootstrap.php +++ b/application/Bootstrap.php @@ -46,5 +46,18 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap } + protected function _initCache() + { + //MetadataCache pour la base de données + $frontendOptions = array( + 'lifetime' => 14400, + 'automatic_serialization' => true + ); + $backendOptions = array(); + $cache = Zend_Cache::factory('Core','Apc', $frontendOptions, $backendOptions); + Zend_Db_Table_Abstract::setDefaultMetadataCache($cache); + + //Cache pour les données de la base à stocker + } } diff --git a/application/controllers/ProfilController.php b/application/controllers/ProfilController.php index 200ae5ea..b4c8b7b6 100644 --- a/application/controllers/ProfilController.php +++ b/application/controllers/ProfilController.php @@ -24,8 +24,13 @@ class ProfilController extends Zend_Controller_Action if ( $id != null ) { $profilM = new Application_Model_Profil(); $profil = $profilM->find($id); - } - + $criteres = json_decode($profil->current()->criteres, true); + $tmp = array(); + foreach ($criteres as $critere) { + $tmp[] = $data->getDicoLib($critere); + } + $this->view->assign('profil', $tmp); + } } diff --git a/application/views/scripts/profil/detail.phtml b/application/views/scripts/profil/detail.phtml index b69b9560..0a60fffd 100644 --- a/application/views/scripts/profil/detail.phtml +++ b/application/views/scripts/profil/detail.phtml @@ -1,125 +1,7 @@ - - -
-

Entete

-
-
    - Placer les elements ici -
-
-
- -
-

Elements disponibles

- -
- -
-Référence -Sauvegarder -
- - \ No newline at end of file + + \ No newline at end of file diff --git a/application/views/scripts/profil/index.phtml b/application/views/scripts/profil/index.phtml index 7ca381b5..12d8f75b 100644 --- a/application/views/scripts/profil/index.phtml +++ b/application/views/scripts/profil/index.phtml @@ -11,7 +11,7 @@ profils as $profil) {?> - reference?> + reference?>