Your IP : 216.73.216.79


Current Path : /var/www/html/sprm/backend/views/report-table/
Upload File :
Current File : /var/www/html/sprm/backend/views/report-table/view.php

<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $model backend\models\ReportTable */

$this->title = $model->title_report_table;
$this->params['breadcrumbs'][] = ['label' => 'Report Tables', 'url' => ['index']];
$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-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('Update', ['update', 'id' => $model->id_report_table], ['class' => 'btn btn-primary']) ?>
        <?= Html::a('Report', ['view1', 'id' => $model->id_report_table], ['class' => 'btn btn-success']) ?>
        <?= Html::a('Delete', ['delete', 'id' => $model->id_report_table], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => 'Are you sure you want to delete this item?',
                'method' => 'post',
            ],
        ]) ?>
    </p>

<style type="text/css">

div.mybox {
    border: 2px solid grey;
    text-align: center;
    padding: 10px;
}

.table > thead:first-child > tr:first-child > th{
    text-align: center;
}

</style>

<div class="mybox">
<?= Html::img('images/logo.png',['width' => '20%','text-align'=>'center']) ?>
</br>
</br>
<div style="text-align: center;padding-bottom: 3px;padding-top: 3px"><h3> <?= Html::encode($this->title) ?> </h3></div>

<?php echo GridView::widget([
        'dataProvider' => $dataProvider,
        //'filterModel' => $searchModel,
        'tableOptions' => 
                        [
                            'class' => 'table table-hover table-bordered',
                        ],
        'summary' => '',
        'columns' => $dbTable,

    ]); ?>

</div>

</br>
</br>
<?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'id_report_table',
            [
                  'attribute' => 'id_report_meta',
                  'headerOptions' => ['style' => 'text-align:center;'],
                  //'contentOptions' => ['style' => 'text-align:center;'],
                  'value' => $model->reportMeta->title_report_meta,
                 
            ],
            'title_report_table',
            [
                  'attribute' => 'table_name',
                  'headerOptions' => ['style' => 'text-align:center;'],
                  //'contentOptions' => ['style' => 'text-align:center;'],
                  'value' => function ($model)
                            {
                                    $getTable=Yii::$app->db->schema->getTableNames(); 
                                    $dbTable = $getTable[$model->table_name];
                                    return $dbTable;
                            },
                 
            ],
            'column_id',
            [
                  'attribute' => 'column_name',
                  'headerOptions' => ['style' => 'text-align:center;'],
                  //'contentOptions' => ['style' => 'text-align:center;'],
                  
                 
            ],
            //'sql_statement',
            'type_report',
            'created_by',
            'created_at',
            'updated_by',
            'updated_at',
        ],
    ]) ?>


</div>

                        </div>
                    </div>
                </div>

            </div>
            
        </div>
        <br>
        <br>
       
        <br>
        <?=  $this->render('//layouts/_footer') ?>