예제 #1
0
 public function addAction()
 {
     $form = new Application_Form_Analysis();
     $especialidad = new Application_Model_Specialties();
     $especialidades = $especialidad->getAll();
     $this->view->form = $form;
     $this->view->headScript()->appendFile("/js/libs/ember-0.9.5.min.js");
     $this->view->headScript()->appendFile("/js/libs/ember-rest.js");
     $this->view->headScript()->appendFile("/js/models/Prueba.js");
     $this->view->especialidades = $especialidades;
 }
예제 #2
0
 public function searchAction()
 {
     $auth = Zend_Auth::getInstance();
     if (!$auth->hasIdentity()) {
         return $this->_redirect('/Auth/login');
     }
     $model = new Application_Model_Tests();
     Zend_View_Helper_PaginationControl::setDefaultViewPartial('paginator/items.phtml');
     $filtrador = new PS_Filtrador($model, $this->_getAllParams());
     $wheres = $filtrador->getFiltros();
     $paginator = Zend_Paginator::factory($model->getBy($wheres));
     if ($this->_hasParam('page')) {
         $paginator->setCurrentPageNumber($this->_getParam('page'));
         $paginator->setItemCountPerPage(5);
     }
     $especialidad = new Application_Model_Specialties();
     $especialidades = $especialidad->getAll();
     $this->view->especialidades = $especialidades;
     $this->view->paginator = $paginator;
 }