title = Yii::t('pages', 'Pages'); $this->params['breadcrumbs'][] = $this->title; ?>
'btn btn-success btn-sm']) ?>
$dataProvider, 'filterModel' => $searchModel, 'columns' => [ [ 'attribute' => 'title', 'value' => function (Page $model) { $indent = ($model->depth > 1 ? str_repeat('  ', $model->depth - 1) . ' ' : ''); $title = isset($model->findTranslation(Yii::$app->language)->title) ? $model->findTranslation(Yii::$app->language)->title : $model->findTranslation(Yii::$app->params['defaultLanguage'])->title; return $indent . Html::a(Html::encode($title), ['view', 'id' => $model->id]); }, 'format' => 'raw', ], [ 'value' => function (Page $model) { return Html::a('', ['move-up', 'id' => $model->id]) . Html::a('', ['move-down', 'id' => $model->id]); }, 'format' => 'raw', 'options' => ['style' => 'width: 100px;'], 'contentOptions' => ['style' => 'text-align: center'], ], 'slug', [ 'class' => ActionColumn::class, 'options' => ['style' => 'width: 100px;'], 'contentOptions' => ['class' => 'text-center'], ], ], ]); ?>