public function index($filter = null)
 {
     $ttl = ORM::Factory('taxa_taxon_list', $filter);
     $this->base_filter['taxa_taxon_list_id'] = $filter;
     parent::index($filter);
     $this->view->taxa_taxon_list_id = $ttl->id;
 }
 /**
  * Index controller action. Load the list of verification rule servers.
  */
 public function index()
 {
     parent::index();
     // Load the rule files from the server
     $list = $this->get_server_list();
     $this->view->serverList = $list;
 }
示例#3
0
 public function index($filter = null)
 {
     if ($this->uri->total_arguments() > 0) {
         $this->website_id = $this->uri->argument(1);
         $this->base_filter['website_id'] = $this->website_id;
     }
     parent::index();
 }
 /**
  * Apply the filter for the selected taxon list to the list of groups.
  */
 public function index()
 {
     if ($this->uri->total_arguments() > 0) {
         $this->taxon_list_id = $this->uri->argument(1);
         $this->base_filter['taxon_list_id'] = $this->taxon_list_id;
     }
     parent::index();
 }
 /**
  * Override the default index functionality to filter by website.
  */
 public function index_from_person()
 {
     $person_id = $this->uri->argument(1);
     $this->base_filter['person_id'] = $person_id;
     parent::index();
     $r = $this->db->select('id')->from('users')->where(array('person_id' => $person_id))->get()->result_array(false);
     $this->view->user_id = $r[0]['id'];
 }
示例#6
0
 /**
  * Override the index controller action to add filters for the parent sample if viewing the child occurrences.
  */
 public function index()
 {
     // This constructor normally has 1 argument which is the grid page. If there is a second argument
     // then it is the parent list ID.
     if ($this->uri->total_arguments() > 0) {
         $this->base_filter = array('sample_id' => $this->uri->argument(1));
     }
     parent::index();
 }
 /**
  * Override the default index functionality to filter by survey_id.
  */
 public function index()
 {
     if ($this->uri->total_arguments() > 0) {
         $this->base_filter = array('survey_id' => $this->uri->argument(1));
     }
     parent::index();
     // pass the survey id into the view, so the create button can use it to autoset
     // the survey of the new image.
     if ($this->uri->total_arguments() > 0) {
         $this->view->survey_id = $this->uri->argument(1);
     }
 }
 /**
  * Override the default index functionality to filter by occurrence_id.
  */
 public function index()
 {
     if ($this->uri->total_arguments() > 0) {
         $this->base_filter = array('occurrence_id' => $this->uri->argument(1));
     }
     parent::index();
     // pass the occurrence id into the view, so the create button can use it to autoset
     // the occurrence of the new comment.
     if ($this->uri->total_arguments() > 0) {
         $this->view->occurrence_id = $this->uri->argument(1);
     }
 }
 /**
  * Override the index controller action to add filters for the parent sample if viewing the child subject_observations.
  */
 public function index()
 {
     // This constructor normally has 1 argument which is the grid page. If there is a second argument
     // then it is the sample ID (should it be the parent ID?)
     $this->sample_id;
     if ($this->uri->total_arguments() > 0) {
         $this->base_filter = array('sample_id' => $this->uri->argument(1));
         $this->sample_id = $this->uri->argument(1);
     }
     parent::index();
     $this->view->sample_id = $this->sample_id;
 }
 /**
  * Override the default index functionality to filter by subject_observation_id.
  */
 public function index()
 {
     if ($this->uri->total_arguments() > 0) {
         $this->base_filter = array('subject_observation_id' => $this->uri->argument(1));
     }
     parent::index();
     // pass the subject_observation_id into the view, so the create button can use it to autoset
     // the subject observation of the new recprd.
     if ($this->uri->total_arguments() > 0) {
         $this->view->subject_observation_id = $this->uri->argument(1);
     }
 }
示例#11
0
 public function index()
 {
     if ($this->uri->total_arguments() > 0) {
         $this->base_filter = array('parent_id' => $this->uri->argument(1));
     }
     parent::index();
     // pass the parent id into the view, so the create list button can use it to autoset
     // the parent of the new list.
     if ($this->uri->total_arguments() > 0) {
         $parent_id = $this->uri->argument(1);
         $this->view->parent_id = $parent_id;
     }
 }
示例#12
0
 /**
  * Override the default index functionality to filter by taxa_taxon_list_id (as identified
  * by the taxon owning the tab).
  */
 public function index()
 {
     if ($this->uri->total_arguments() > 0) {
         $ttl = ORM::factory('taxa_taxon_list', $this->uri->argument(1));
         $this->base_filter = array('taxon_meaning_id' => $ttl->taxon_meaning_id);
     }
     parent::index();
     // pass the taxa_taxon_list id into the view, so the create button can use it to autoset
     // the taxon of the new code.
     if ($this->uri->total_arguments() > 0) {
         $this->view->taxon_meaning_id = $this->uri->argument(1);
     }
 }
示例#13
0
 private function internal_index($termlist_id)
 {
     // No further filtering of the gridview required as the very fact you can access the parent termlist
     // means you can access all the taxa for it.
     if (!$this->termlist_authorised($termlist_id)) {
         $this->access_denied('table to view records with a termlist ID=' . $termlist_id);
         return;
     }
     $this->base_filter['termlist_id'] = $termlist_id;
     parent::index();
     $this->view->termlist_id = $termlist_id;
     $list = ORM::factory('termlist', $termlist_id);
     $this->view->parent_list_id = $list->parent_id;
     $this->upload_csv_form->staticFields = array('termlists_term:termlist_id' => $termlist_id);
     $this->upload_csv_form->returnPage = $termlist_id;
 }
 private function internal_index($taxon_list_id, $taxonList)
 {
     // No further filtering of the gridview required as the very fact you can access the parent taxon list
     // means you can access all the taxa for it.
     if (!$this->taxon_list_authorised($taxon_list_id)) {
         $this->access_denied('table to view records with a taxon list ID=' . $taxon_list_id);
         return;
     }
     $this->base_filter['taxon_list_id'] = $taxon_list_id;
     if (!empty($taxonList->parent_id)) {
         unset($this->base_filter['parent_id']);
     }
     parent::index();
     $this->view->taxon_list_id = $taxon_list_id;
     $this->view->parent_list_id = $taxonList->parent_id;
     $this->upload_csv_form->staticFields = array('taxa_taxon_list:taxon_list_id' => $taxon_list_id);
     $this->upload_csv_form->returnPage = $taxon_list_id;
 }
示例#15
0
 public function index()
 {
     $this->base_filter['private_for_user_id'] = array(null, $_SESSION['auth_user']->id);
     $this->base_filter['user_id'] = array(null, $_SESSION['auth_user']->id);
     parent::index();
 }
示例#16
0
 /**
  * This is the main controller action method for the index page of the grid.
  */
 public function index()
 {
     parent::index();
     $this->add_upload_shp_form();
 }