| Current Path : /var/www/html/sprm/backend/views/report-table/ |
| Current File : /var/www/html/sprm/backend/views/report-table/index.php |
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use backend\models\LayoutSkin;
$modelSkin = LayoutSkin::find()->where(['status' => 1])->one();
/* @var $this yii\web\View */
/* @var $searchModel backend\models\ReportTableSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Report Tables';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="wrapper wrapper-content animated fadeInRight" style="padding: 20px 10px 0px;">
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-content text-center p-md" style="text-align: left;background-color: <?php echo $modelSkin->form_layout_bgcolour; ?>">
<!--search -->
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="wrapper wrapper-content animated fadeInRight" style="padding: 0px 10px 0px;">
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title" style="background-color: <?php echo $modelSkin->form_layout_bgcolour; ?>">
<h5><?= Html::encode($this->title) ?></h5>
<div class="ibox-tools" >
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="#">Config option 1</a>
</li>
<li><a href="#">Config option 2</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content" style="background-color: <?php echo $modelSkin->form_layout_bgcolour; ?>">
<div class="table-responsive">
<p>
<?= Html::a('<span style="padding:2%" class="glyphicon glyphicon-plus bigger-100" ></span>'.'Report Table', ['create'], ['class' => 'btn btn-primary']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
//'filterModel' => $searchModel,
'tableOptions' =>
[
'class' => 'table table-hover table-bordered',
],
'options'=>['style' => 'text-align:center;'],
'summary' => '',
'columns' => [
['class' => 'yii\grid\SerialColumn'],
[
'attribute' => 'id_report_table',
'headerOptions' => ['style' => 'text-align:center;'],
],
[
'attribute' => 'id_report_meta',
'headerOptions' => ['style' => 'text-align:center;'],
//'contentOptions' => ['style' => 'text-align:center;'],
//'value' => $model->reportMeta->title_report_meta,
],
[
'attribute' => 'title_report_table',
'headerOptions' => ['style' => 'text-align:center;'],
],
[
'attribute' => 'table_name',
'headerOptions' => ['style' => 'text-align:center;'],
// 'value' => function ($model)
// {
// $getTable=Yii::$app->db->schema->getTableNames();
// $dbTable = $getTable[$model->table_name];
// return $dbTable;
// },
],
[
'attribute' => 'sql_statement',
'headerOptions' => ['style' => 'text-align:center;width:40%'],
],
// [
// 'attribute' => 'column_name',
// 'headerOptions' => ['style' => 'text-align:center;width:10%'],
// ],
// 'sql_statement',
// 'type_report',
// 'created_by',
// 'created_at',
// 'updated_by',
// 'updated_at',
['class' => 'yii\grid\ActionColumn',
'header' => 'Action',
'headerOptions' => ['style' => 'text-align:center;'],
],
],
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<br>
<?= $this->render('//layouts/_footer') ?>