public function _tab_index($objects, $title, $module, $type, $all_access) { $this->subtitle($title)->load->library('table')->add_columns(array(array('title' => $this('name'), 'content' => function ($data) { return $data['title']; }))); foreach ($all_access['access'] as $a) { foreach ($a['access'] as $action => $access) { $this->table->add_columns(array(array('title' => '<div class="text-center" data-toggle="tooltip" title="' . $module->load->lang($access['title'], NULL) . '">' . icon($access['icon']) . '</div>', 'content' => function ($data) use($module, $action) { return NeoFrag::loader()->access->count($module->name, $action, $data['id']); }, 'class' => 'col-md-1'))); } } $this->table->add_columns(array(array('content' => array(function ($data, $loader) use($module, $type) { return button(NULL, 'fa-refresh', $loader->lang('reset'), 'info', 'access-reset', array('module' => $module->name, 'type' => $type, 'id' => $data['id'])); }, function ($data, $loader) use($module, $type) { return button_access($data['id'], $type, $module->name, $loader->lang('edit')); }))))->data($objects); echo $this->table->display(); }
public function index($talks) { $this->load->library('table')->add_columns(array(array('title' => $this('talks'), 'content' => function ($data) { return $data['name']; }, 'sort' => function ($data) { return $data['name']; }, 'search' => function ($data) { return $data['name']; }), array('content' => array(function ($data) { if ($data['talk_id'] > 1) { return button_access($data['talk_id'], 'talk'); } }, function ($data) { if ($data['talk_id'] > 1) { return button_edit('admin/talks/' . $data['talk_id'] . '/' . url_title($data['name']) . '.html'); } }, function ($data) { if ($data['talk_id'] > 1) { return button_delete('admin/talks/delete/' . $data['talk_id'] . '/' . url_title($data['name']) . '.html'); } }), 'size' => TRUE)))->data($talks)->no_data($this('no_talks')); return new Panel(array('title' => $this('talks_list'), 'icon' => 'fa-comment-o', 'content' => $this->table->display(), 'footer' => button_add('admin/talks/add.html', $this('create_talk')))); }
echo i18n('statistics'); ?> </span></h4></th> <th class="col-md-3"><h4 class="no-margin"><?php echo icon('fa-comment-o'); ?> <span class="hidden-xs"> <?php echo i18n('last_message'); ?> </span></h4></th> <?php if ($NeoFrag->config->admin_url) { ?> <th class="col-md-1 text-right"> <?php echo button_access($data['category_id'], 'category'); ?> <?php echo button_edit('admin/forum/categories/' . $data['category_id'] . '/' . url_title($data['title']) . '.html'); ?> <?php echo button_delete('admin/forum/categories/delete/' . $data['category_id'] . '/' . url_title($data['title']) . '.html'); ?> </th> <?php } ?> </tr> </thead> <tbody class="forum-content"> <?php