| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- use yii\helpers\Html;
- use yii\grid\GridView;
- use yii\widgets\Pjax;
- use yii\helpers\ArrayHelper;
- use app\models\Categoriesblog;
- use kartik\select2\Select2;
- /* @var $this yii\web\View */
- /* @var $searchModel app\models\BlogPostsSearch */
- /* @var $dataProvider yii\data\ActiveDataProvider */
- $this->title = Yii::t('app', 'Сторінки сайту');
- $this->params['breadcrumbs'][] = $this->title;
- ?>
- <div class="posts-index">
- <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
- <p>
- <?= Html::a(Yii::t('app', 'Створити сторінку'), ['create'], ['class' => 'btn btn-success']) ?>
- </p>
- <?php Pjax::begin(); ?>
- <?= GridView::widget([
- 'dataProvider' => $dataProvider,
- 'filterModel' => $searchModel,
- 'columns' => [
- ['class' => 'yii\grid\SerialColumn'],
- //'id',
- 'title',
- //'text:ntext',
- // [
- // 'attribute' => 'Picture',
- // 'format' => 'raw',
- // 'value' => function($model){
- // return Html::img($model->getPicture(),['class' => 'img-responsive', 'style' => 'max-width : 150px ']);
- // }
- // ],
- // [
- // 'attribute' => 'cat_id',
- // 'value' => 'category.title',
- // 'filter' => Select2::widget([
- // 'model' => $searchModel,
- // 'attribute' => 'cat_id',
- // 'data' => ArrayHelper::map(Categoriesblog::find()->all(), 'id', 'title'),
- // 'options' => [
- // 'placeholder' => Yii::t('app','Choose category'),
- // 'allowClear' => true,
- // ],
- // ])
- // ] ,
- 'description',
- 'key_words',
- 'slug',
- ['class' => 'yii\grid\ActionColumn'],
- ],
- ]); ?>
- <?php Pjax::end(); ?></div>
|