1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- use app\models\Page;
- use yii\helpers\Html;
- use yii\helpers\Url;
- use yii\grid\ActionColumn;
- use yii\grid\GridView;
- use yii\widgets\Pjax;
- /** @var yii\web\View $this */
- /** @var yii\data\ActiveDataProvider $dataProvider */
- $this->title = 'Pages';
- $this->params['breadcrumbs'][] = $this->title;
- ?>
- <div class="page-index">
- <h1><?= Html::encode($this->title) ?></h1>
- <p>
- <?= Html::a('Create Page', ['create'], ['class' => 'btn btn-success']) ?>
- </p>
- <?php Pjax::begin(); ?>
- <?= GridView::widget([
- 'dataProvider' => $dataProvider,
- 'columns' => [
- ['class' => 'yii\grid\SerialColumn'],
- 'id',
- 'status',
- 'menu',
- 'created',
- 'updated',
- //'create_user_id',
- //'update_user_id',
- //'parent_id',
- //'title',
- //'title_menu',
- //'title_seo',
- //'description_seo',
- //'keywords_seo',
- //'key',
- //'norder',
- //'path',
- //'content:ntext',
- //'index_controller',
- //'index_action',
- //'view_controller',
- //'view_action',
- //'index_params',
- //'lang',
- //'layout',
- [
- 'class' => ActionColumn::className(),
- 'urlCreator' => function ($action, Page $model, $key, $index, $column) {
- return Url::toRoute([$action, 'id' => $model->id]);
- }
- ],
- ],
- ]); ?>
- <?php Pjax::end(); ?>
- </div>
|