Ejemplo n.º 1
0
 public function action_index()
 {
     $grid = new Petro_Grid('Model_User', static::_columns());
     // $grid = new Petro_Grid('Model_User', array('id', 'username', 'email'));
     // $data['index_content'] = $grid->render(array('username', 'id', 'email'));
     $this->sidebars->add('Filters', Petro::render_filters(array('username' => array('type' => 'string'), 'email' => array('type' => 'string'))));
     $this->action_items = array(array('title' => 'Add New User', 'link' => Petro::get_routes('new')));
     // $this->template->page_title = "Users";
     $this->template->set('content', $grid->render(), false);
 }
Ejemplo n.º 2
0
 public function action_index()
 {
     // $grid = new Petro_Grid($this->model);
     $grid = new Petro_Grid($this);
     $this->sidebars->add('Filters', Petro::render_filters(array('code' => array('label' => 'Code', 'type' => 'string'), 'name' => array('type' => 'string'), 'status' => array('type' => 'checkbox', 'collection' => Petro_Lookup::get('client.status')))));
     $this->action_items = array(array('title' => 'Add New Client', 'link' => Petro::get_routes('new'), 'visible' => $this->can_create()));
     // $this->template->page_title = "Clients";
     $this->template->set('content', $grid->render(), false);
     // Petro_Menu::load_from_table();
 }
Ejemplo n.º 3
0
 /**
  * Index
  */
 public function action_index($page = 1, $order_by = null, $scope = null, $filter = null)
 {
     $grid = new Petro_Grid('Model_DocMK011', static::_columns('index'));
     $data['index_content'] = $grid->render();
     //$page, $order_by, $scope, $filter);
     $this->sidebars->add('Sample Sidebar', "This is a sample. Delete this section from code, if you don't want them");
     $this->action_items = array(array('title' => 'New Cutting Order', 'link' => 'docmk011/create'));
     // set this to override default page_title
     // $this->template->page_title = "docmk011";
     $this->template->content = View::forge('docmk011/index', $data, false);
 }