コード例 #1
0
ファイル: table.php プロジェクト: BillVGN/PortalPRP
 public function display($connection, $area = 'front', $rows = array())
 {
     $doc = \GCore\Libs\Document::getInstance();
     $tds = array();
     $trs = array();
     $ths = array();
     //display header
     ob_start();
     eval('?>' . $connection['Connection']['extras'][$area]['blocks']['table']['header']);
     $header = ob_get_clean();
     $header = $this->view->Lister->translate($connection, $this->view->Lister->prepare($connection, $header));
     echo \GCore\Libs\Str::replacer($header, $rows);
     $thead = \GCore\Helpers\Html::container('thead', implode("\n", $ths), array());
     $tbody = \GCore\Helpers\Html::container('tbody', implode("\n", $trs), array());
     if (!empty(\GCore\Helpers\DataPresenter::$columns)) {
         //\GCore\Helpers\DataPresenter::set_cells_data();
         $trs = \GCore\Helpers\DataTable::trs();
         $tbody = \GCore\Helpers\Html::container('tbody', implode("\n", $trs), array());
         foreach (\GCore\Helpers\DataPresenter::$headers as $k => $header) {
             $th_tag = \GCore\Helpers\Html::container($header['tag'], $header['text'], $header['atts']);
             $ths[] = \GCore\Helpers\Html::container('th', $th_tag, array('class' => 'th-' . $k));
         }
         $thead = \GCore\Helpers\Html::container('thead', \GCore\Helpers\Html::container('tr', implode("\n", $ths)), array());
     }
     $table = \GCore\Helpers\Html::container('table', $thead . $tbody, array('class' => 'table table-hover table-censored', 'id' => 'gcore_table_list__#'));
     $table = \GCore\Helpers\DataLoader::load($table, \GCore\Helpers\DataPresenter::$cells_data);
     \GCore\Helpers\DataPresenter::_flush();
     //show table
     echo $this->view->Lister->translate($connection, $table);
     //display footer
     ob_start();
     eval('?>' . $connection['Connection']['extras'][$area]['blocks']['table']['footer']);
     $footer = ob_get_clean();
     $footer = $this->view->Lister->translate($connection, $this->view->Lister->prepare($connection, $footer));
     echo \GCore\Libs\Str::replacer($footer, $rows);
     //echo '</div>';
 }
コード例 #2
0
ファイル: bootstrap3.php プロジェクト: ejailesb/repo_empr
 public static function data_table_build($params = array())
 {
     $params['class'] = 'table table-hover table-censored';
     return '<div class="panel panel-default gcore-black-text"><div class="panel-body">' . \GCore\Helpers\DataTable::data_table_build($params) . '</div></div>';
 }
コード例 #3
0
ファイル: semantic1.php プロジェクト: ejailesb/repo_empr
 public static function data_table_build($params = array())
 {
     $params['class'] = 'ui table segment attached';
     return \GCore\Helpers\DataTable::data_table_build($params);
 }