| Current Path : /var/www/html/sprm/backend/views/layout-skin/ |
| Current File : /var/www/html/sprm/backend/views/layout-skin/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 app\models\LayoutSkinSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'Layout Skins';
$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 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>Layout Skin </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">
<!--h1><?= Html::encode($this->title) ?></h1-->
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a("<i class=\"glyphicon glyphicon-plus\"></i> " .'Layout Skin', ['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',
'headerOptions' => ['style' => 'text-align:center;'],
],
[
'attribute' => 'layout_skin_id',
'headerOptions' => ['style' => 'text-align:center;'],
],
[
'attribute' => 'layout_skin_logo',
'headerOptions' => ['style' => 'text-align:center;'],
],
[
'attribute' => 'layout_skin_bgcolor',
'headerOptions' => ['style' => 'text-align:center;'],
],
[
'attribute' => 'layout_skin_menu_color',
'headerOptions' => ['style' => 'text-align:center;'],
],
[
'attribute' => 'layout_skin_header_color',
'headerOptions' => ['style' => 'text-align:center;'],
],
[
'attribute' =>'status',
'headerOptions' => ['style' => 'text-align:center;'],
'value' => function ($model) {
return $model->status == 1 ? 'Selected' : 'Not Selected';
},
],
// 'layout_skin_footer_color',
['class' => 'yii\grid\ActionColumn',
'header' => 'Action',
'headerOptions' => ['style' => 'text-align:center;'],
'template' => '{view}{update}{delete}{set}',
'buttons' => [
'view' => function ($url, $model) {
return Html::a('<span style="padding:3%" class="glyphicon glyphicon-eye-open bigger-100" ></span>', "index.php?r=layout-skin/view&id=" . $model->layout_skin_id, [
'title' => Yii::t('app', 'Papar'),
]);
},
'update' => function ($url, $model) {
return Html::a('<span style="padding:3%" class="glyphicon glyphicon-pencil bigger-100"></span>', "index.php?r=layout-skin/update&id=" . $model->layout_skin_id, [
'title' => Yii::t('app', 'Kemaskini'),
]);
},
'delete' => function ($url, $model) {
return Html::a('<span style="padding:3%" class="glyphicon glyphicon-trash bigger-100"></span>', "index.php?r=layout-skin/delete&id=" . $model->layout_skin_id, [
'title' => Yii::t('app', 'Hapus'), //'<span class="glyphicon glyphicon-search"></span>',
'onClick' => 'return doDelete()',
'data-method' => 'post'
]);
},
]
],
['class' => 'yii\grid\ActionColumn',
'header' => '',
'headerOptions' => ['style' => 'text-align:center;'],
'template' => '{set}',
'buttons' => [
'set' => function ($url, $model) {
return $model->status == 1 ? Html::a('<span style="background-color:#01FF0F;border:#01FF0F;padding: 3px 6px" class="btn btn-primary glyphicon glyphicon-ok bigger-100"></span>', "index.php?r=layout-skin/set&status=1&id=" . $model->layout_skin_id) : Html::a('<span style="background-color:#DFE0DF;border:#01FF0F;padding: 3px 6px" class="btn btn-primary glyphicon glyphicon-ok bigger-100"></span>', "index.php?r=layout-skin/set&status=1&id=" . $model->layout_skin_id);
},
]
],
],
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<br>
<br>
<?= $this->render('//layouts/_footer') ?>