2012-02-02 17:29:14 +00:00
|
|
|
<?php
|
2012-05-02 18:19:07 +00:00
|
|
|
Class IndexController extends Zend_Controller_Action
|
2012-02-02 17:29:14 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public function init()
|
|
|
|
{
|
2012-02-22 19:17:11 +00:00
|
|
|
$this->view->headScript()
|
|
|
|
->appendFile('/themes/default/scripts/jquery.jstree.js', 'text/javascript')
|
2012-05-04 18:21:51 +00:00
|
|
|
->appendFile('/themes/default/scripts/fields.js', 'text/javascript');
|
2012-02-02 17:29:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function indexAction()
|
|
|
|
{
|
|
|
|
$auth = Zend_Auth::getInstance();
|
|
|
|
$user = $auth->getIdentity();
|
|
|
|
if ($user->customisation) {
|
|
|
|
$this->view->assign('preferences', $user->customisation);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-15 09:25:21 +00:00
|
|
|
public function criteresAction()
|
|
|
|
{
|
2012-03-08 15:25:27 +00:00
|
|
|
$ajax = $this->getRequest()->getParam('ajax');
|
|
|
|
if($ajax)
|
|
|
|
$this->_helper->layout()->disableLayout();
|
2012-05-04 18:21:51 +00:00
|
|
|
|
2012-05-11 12:26:16 +00:00
|
|
|
$session = new Scores_Fields();
|
2012-05-02 18:19:07 +00:00
|
|
|
|
2012-05-11 12:26:16 +00:00
|
|
|
$this->view->field = $session;
|
2012-02-15 09:25:21 +00:00
|
|
|
$this->view->criteres = $session->getCriteres();
|
|
|
|
}
|
2012-05-02 18:19:07 +00:00
|
|
|
|
2012-03-08 15:04:08 +00:00
|
|
|
public function removeAction()
|
|
|
|
{
|
|
|
|
$this->_helper->layout()->disableLayout();
|
2012-05-11 20:25:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$fields = new Scores_Fields();
|
|
|
|
$fields->unsetCritere($this->getRequest()->getParam('critere'));
|
|
|
|
|
|
|
|
|
2012-04-06 08:27:10 +00:00
|
|
|
$objet = new Object_Comptage();
|
|
|
|
$objet->count(null, null);
|
2012-03-08 15:04:08 +00:00
|
|
|
$this->_redirect('/');
|
|
|
|
}
|
2012-02-02 17:29:14 +00:00
|
|
|
}
|
|
|
|
|