Skip to content
Snippets Groups Projects

on bootstrap

Merged Ghislain Loas requested to merge dev#99489_magasin_de_themes_bases_sur_bootstrap into master
Compare and
120 files
+ 1484
81
Preferences
Compare changes
Files
120
@@ -77,4 +77,25 @@ class Admin_TemplateController extends ZendAfi_Controller_Action {
$this->_helper->notify($this->_('Thème %s mis à jour', $template->getId()));
return $this->_redirectClose($this->_getReferer());
}
public function applyAction() {
if(!$this->view->template = (new Class_Template_Loader)->find($this->_getParam('template'))) {
$this->_helper->notify($this->_('Une erreur c\'est produite. Vous ne pouvez pas tester le template'));
return $this->_redirectToIndex();
}
$this->view->titre = $this->_('Appliquer le thème %s à un profil',
$this->view->template->getTitle());
if(!$profile = Class_Profil::find($this->_getParam('on')))
return;
if(!$profile_id = $this->view->template->applyOn($profile)) {
$this->_helper->notify($this->_('Une erreur c\'est produite.'));
return $this->_redirectToIndex();
}
$this->_redirect('/opac/index/index/id_profil/' . $profile_id);
}
}
\ No newline at end of file