You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

46 lines
1.4 KiB

<?php
use core\entities\Slider;
use yii\grid\ActionColumn;
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('slider', 'Slider');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="slider-index">
<p>
<?= Html::a(Yii::t('slider', 'Create Slide'), ['create'], ['class' => 'btn btn-success']) ?>
</p>
<div class="box">
<div class="box-body">
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
[
'attribute' => 'id',
'options' => ['style' => 'width: 100px;'],
'contentOptions' => ['class' => 'text-center'],
],
[
'attribute' => 'title',
'value' => function (Slider $model) {
return Html::a(Html::encode($model->title), ['view', 'id' => $model->id]);
},
'format' => 'raw',
],
[
'class' => ActionColumn::class,
'options' => ['style' => 'width: 100px;'],
'contentOptions' => ['class' => 'text-center'],
],
],
]); ?>
</div>
</div>
</div>