Skip to content
Snippets Groups Projects

Hotline master

Merged Patrick Barroca requested to merge hotline-master into master
Compare and
+ 681
246
Preferences
Compare changes
Files
@@ -18,54 +18,52 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//////////////////////////////////////////////////////////////////////////////////////////
// OPAC3 - Propriétés des modules des notices
//////////////////////////////////////////////////////////////////////////////////////////
class Admin_ModulesnoticeController extends ZendAfi_Controller_Action {
private $id_profil; // Profil a modifier
private $type_module; // Identifiant du module à traiter
//------------------------------------------------------------------------------------------------------
// Initialisation des parametres et du layout
//------------------------------------------------------------------------------------------------------
function init() {
public function init() {
// Changer le layout
$viewRenderer = $this->getHelper('ViewRenderer');
$viewRenderer->setLayoutScript('subModal.phtml');
// Recup des parametres
$this->type_module=$this->_getParam('action');
$this->type_module = $this->_getParam('action');
$this->id_profil = $this->_getParam("id_profil");
// Lire la definition du module
$module=new Class_Systeme_ModulesNotice();
$def_module=$module->getModule($this->type_module);
$module = new Class_Systeme_ModulesNotice();
$def_module = $module->getModule($this->type_module);
// On initalise les proprietes
$profil = Class_Profil::getLoader()->find($this->id_profil);
$profil = Class_Profil::find($this->id_profil);
$cfg = $profil->getCfgNoticeAsArray();
$preferences=$cfg[$this->type_module];
$preferences = $cfg[$this->type_module];
// Variables de vue
$this->view->titre_module=$def_module["libelle"];
$this->view->preferences=$preferences;
$this->view->url=$this->_request->getRequestUri();
$this->view->id_profil=$this->id_profil;
$this->view->titre_module = $def_module["libelle"];
$this->view->preferences = $preferences;
$this->view->url = $this->_request->getRequestUri();
$this->view->id_profil = $this->id_profil;
}
function preDispatch(){
public function preDispatch(){
parent::preDispatch();
if (!$this->isPopupRequest())
Zend_Layout::startMvc();
}
function exemplairesAction() {
public function exemplairesAction() {
$this->view->titre = $this->view->_('Propriété du bloc des exemplaires');
if ($this->_request->isPost()) {
$enreg=$_POST;
$enreg = $_POST;
if (!$enreg['grouper']) {
$enreg['section'] = 0;
$enreg['emplacement'] = 0;
@@ -75,20 +73,16 @@ class Admin_ModulesnoticeController extends ZendAfi_Controller_Action {
}
}
//------------------------------------------------------------------------------------------------------
// Validation et retour config admin de la page d'accueil
//------------------------------------------------------------------------------------------------------
private function updateEtRetour($data) {
$profil = Class_Profil::getLoader()->find($this->id_profil);
$profil = Class_Profil::find($this->id_profil);
$enreg = $profil->getCfgNoticeAsArray();
$enreg[$this->type_module]=$data;
$enreg[$this->type_module] = $data;
$profil->setCfgNotice($enreg)->save();
// Execute le script de retour
$this->view->reload="SITE";
$this->view->reload = 'SITE';
$viewRenderer = $this->getHelper('ViewRenderer');
$viewRenderer->renderScript('modulesnotice/_retour.phtml');
}
}
\ No newline at end of file