Skip to content
Snippets Groups Projects

Dev#16866 cacher formation

Merged Laurent requested to merge dev#16866_cacher_formation into WIP
Compare and
+ 259
101
Preferences
Compare changes
Files
@@ -223,6 +223,29 @@ class Admin_FormationController extends ZendAfi_Controller_Action {
$this->renderScript('formation/formation_form.phtml');
return false;
}
public function showAction() {
$this->_formationDoAndNotify('show', 'La formation "%s" est visible');
}
public function hideAction() {
$this->_formationDoAndNotify('hide', 'La formation "%s" n\'est plus visible');
}
protected function _formationDoAndNotify($action, $message) {
$formation = Class_Formation::find($this->_getParam('id'));
call_user_func([$formation, $action]);
$formation->save();
$this->_redirectToIndex();
$this->_helper->notify($this->_($message, $formation->getLibelle()));
}
}
?>
\ No newline at end of file