public static function issues($search_data, &$errors, $defaults = null) { $search = new ProjectSearch($defaults); $search->addSearchField('problem_description', 'description_contains', 'contains'); $search->addSearchField('closed', 'show_closed', 'show'); $search->addSearchField('project', 'project_name', 'begins'); $search->addSearchField('assigned_to', 'assigned_to_me', 'hide', false); $search->setOnValue('assigned_to', EGS_USERNAME); $search->setSearchData($search_data, $errors, 'issues'); return $search; }
public function index() { $s_data = null; $errors = array(); if (isset($this->_data['Search'])) { $s_data = $this->_data['Search']; } $this->search = ProjectSearch::issues($s_data, $errors); if (count($errors) > 0) { $flash = Flash::Instance(); $flash->addErrors($errors); $this->search->clear(); } $this->view->set('clickaction', 'edit'); parent::index($pi = new ProjectIssueCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('module' => 'projects', 'controller' => 'ProjectIssues', 'action' => 'new'), 'tag' => 'new_project_Issue'))); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }
public function index() { $this->view->set('clickaction', 'view'); $s_data = null; $errors = array(); if (isset($this->_data['Search'])) { $s_data = $this->_data['Search']; } $this->search = ProjectSearch::useDefault($s_data, $errors); if (count($errors) > 0) { $flash = Flash::Instance(); $flash->addErrors($errors); $this->search->clear(); } parent::index(new ProjectCollection($this->_templateobject)); $sidebar = new SidebarController($this->view); $sidebar->addList('Actions', array('new' => array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new'), 'tag' => 'new_project'), 'timesheet' => array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'timesheets'), 'tag' => 'project_hours_by_employee'), 'showprojecthours' => array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'showprojecthours'), 'tag' => 'project_hours_summary'))); $this->view->set('no_delete', true); $this->view->register('sidebar', $sidebar); $this->view->set('sidebar', $sidebar); }