Example #1
0
 /** 
  * @access  public
  * @return  Response
  */
 public function action_index()
 {
     $data = array();
     $data['Form'] = new \Form();
     $data['Input'] = new \Input();
     // $options = array();
     $options = \Input::get();
     $config = array('pagination_url' => \Input::uri() . '?' . http_build_query($options), 'total_items' => \Collection\Venue::countSearchResults($options), 'uri_segment' => 'page', 'per_page' => 100, 'name' => 'bootstrap');
     $pagination = \Pagination::forge('venues', $config);
     $data['pagination'] = $pagination->render();
     // get venues
     $options['per_page'] = $pagination->per_page;
     $options['offset'] = $pagination->offset;
     $data['venues'] = \Collection\Venue::search($options);
     // get all regions
     $options = array();
     $data['regions'] = \Collection\Region::search($options);
     $data['datatypes'] = array();
     $data['datatypes'][] = array('id' => "checkins", 'name' => "Checkins");
     $data['datatypes'][] = array('id' => "Pictures", 'name' => "Pictures");
     $data['datatypes'][] = array('id' => "Likes", 'name' => "Likes");
     $data['datatypes'][] = array('id' => "Comments", 'name' => "Comments");
     $view = \View::forge('dashboard/index.twig', $data);
     return \Response::forge($view);
 }