示例#1
0
 public function index()
 {
     $this->load->library('table');
     $this->table->set_template(array('table_open' => '<table id="grid" class="table table-striped">'));
     $this->table->set_heading('Id', 'Titulo', 'Descricao', 'Status', 'Ações');
     $query = $this->video->get_list()->result();
     foreach ($query as $row) {
         $this->table->add_row($row->id, $row->titulo, $row->descricao, status_post($row->status), div(array('class' => 'btn-group btn-group-sm')) . anchor('admin/videos/edit/' . $row->id, glyphicon('edit'), array('class' => 'btn btn-default')) . '<button class="btn btn-default" onClick="return confirmar(\'' . site_url('admin/videos/delete/' . $row->id) . '\');">' . glyphicon('trash') . '</button>' . div(null, true));
     }
     $this->content_vars['listagem'] = $this->table->generate();
     $this->wpanel->load_view('videos/index', $this->content_vars);
 }
示例#2
0
 public function index()
 {
     $this->load->model('banner');
     $this->load->library('table');
     $layout_vars = array();
     $content_vars = array();
     // Template da tabela
     $this->table->set_template(array('table_open' => '<table id="grid" class="table table-striped">'));
     $this->table->set_heading('#', 'Título', 'Posição', 'Ordem', 'Status', 'Ações');
     $query = $this->banner->get_list();
     foreach ($query->result() as $row) {
         $this->table->add_row($row->id, $row->title, $row->position, $row->order, status_post($row->status), div(array('class' => 'btn-group btn-group-sm')) . anchor('admin/banners/edit/' . $row->id, glyphicon('edit'), array('class' => 'btn btn-default')) . '<button class="btn btn-default" onClick="return confirmar(\'' . site_url('admin/banners/delete/' . $row->id) . '\');">' . glyphicon('trash') . '</button>' . div(null, true));
     }
     $content_vars['listagem'] = $this->table->generate();
     $this->wpanel->load_view('banners/index', $content_vars);
 }
示例#3
0
文件: posts.php 项目: GFhillip/wpanel
 public function index()
 {
     $this->load->model('post');
     $this->load->library('table');
     $layout_vars = array();
     $content_vars = array();
     // Template da tabela
     $this->table->set_template(array('table_open' => '<table id="grid" class="table table-striped">'));
     $this->table->set_heading('#', 'Título', 'Categoria(s)', 'Data', 'Status', 'Ações');
     $query = $this->post->get_by_field('page', '0', array('field' => 'created', 'order' => 'desc'));
     //, array('offset'=>'0','limit'=>'2'));
     foreach ($query->result() as $row) {
         $this->table->add_row($row->id, $row->title, $this->wpanel->category_of_post($row->id), mdate('%d/%m/%Y', strtotime($row->created)), status_post($row->status), div(array('class' => 'btn-group btn-group-sm')) . anchor('admin/posts/edit/' . $row->id, glyphicon('edit'), array('class' => 'btn btn-default')) . '<button class="btn btn-default" onClick="return confirmar(\'' . site_url('admin/posts/delete/' . $row->id) . '\');">' . glyphicon('trash') . '</button>' . div(null, true));
     }
     $content_vars['listagem'] = $this->table->generate();
     $this->wpanel->load_view('posts/index', $content_vars);
 }
示例#4
0
 public function index()
 {
     $this->load->model('album');
     $this->load->library('table');
     $layout_vars = array();
     $content_vars = array();
     // Template da tabela
     $this->table->set_template(array('table_open' => '<table id="grid" class="table table-striped">'));
     $this->table->set_heading('#', 'Capa', 'Título', 'Data', 'Status', 'Ações');
     $query = $this->album->get_list();
     foreach ($query->result() as $row) {
         $capa_properties = array('src' => base_url() . '/media/capas/' . $row->capa, 'class' => 'img-responsive', 'width' => '120', 'alt' => $row->titulo);
         $capa = img($capa_properties);
         $this->table->add_row($row->id, $capa, anchor('admin/fotos/index/' . $row->id, glyphicon('picture') . $row->titulo), mdate('%d/%m/%Y - %H:%i', strtotime($row->created)), status_post($row->status), div(array('class' => 'btn-group btn-group-sm')) . anchor('admin/fotos/index/' . $row->id, glyphicon('picture'), array('class' => 'btn btn-default')) . anchor('admin/albuns/edit/' . $row->id, glyphicon('edit'), array('class' => 'btn btn-default')) . '<button class="btn btn-default" onClick="return confirmar(\'' . site_url('admin/albuns/delete/' . $row->id) . '\');">' . glyphicon('trash') . '</button>' . div(null, true));
     }
     $content_vars['listagem'] = $this->table->generate();
     $this->wpanel->load_view('albuns/index', $content_vars);
 }
示例#5
0
文件: fotos.php 项目: GFhillip/wpanel
 public function index($album_id)
 {
     $this->load->model('album');
     $this->load->model('foto');
     $this->load->library('table');
     $layout_vars = array();
     $content_vars = array();
     // Dados do álbum
     // $query_album = $this->album->get_by_id($album_id)->row();
     // Template da tabela
     $this->table->set_template(array('table_open' => '<table id="grid" class="table table-striped">'));
     $this->table->set_heading('#', 'Imagem', 'Descricao', 'Data', 'Status', 'Ações');
     $query = $this->foto->get_by_field('album_id', $album_id, array('field' => 'created', 'order' => 'desc'));
     foreach ($query->result() as $row) {
         $capa_properties = array('src' => base_url() . '/media/albuns/' . $album_id . '/' . $row->filename, 'class' => 'img-responsive', 'width' => '120', 'alt' => $row->descricao);
         $imagem = img($capa_properties);
         $this->table->add_row($row->id, $imagem, $row->descricao, mdate('%d/%m/%Y - %H:%i', strtotime($row->created)), status_post($row->status), div(array('class' => 'btn-group btn-group-sm')) . anchor('admin/fotos/edit/' . $row->id, glyphicon('edit'), array('class' => 'btn btn-default')) . '<button class="btn btn-default" onClick="return confirmar(\'' . site_url('admin/fotos/delete/' . $row->id) . '\');">' . glyphicon('trash') . '</button>' . div(null, true));
     }
     $content_vars['album_id'] = $album_id;
     $content_vars['listagem'] = $this->table->generate();
     $this->wpanel->load_view('fotos/index', $content_vars);
 }