title = 'Список комментариев'; $this->params['breadcrumbs'][] = $this->title; ?>
5000, 'enablePushState'=>false ])?> setSort([ // 'attributes' => [ // 'created_at' // ] // ]); /* $dataProvider->sort = ['attributes' => [ 'created_at' => [ 'asc' => ['created_at' => SORT_ASC], 'desc' => ['created_at' => SORT_DESC], 'default' => SORT_DESC ], ]];*/ ?> $dataProvider, 'filterModel' => $searchModel, 'layout' => "{errors}\n{summary}\n{pager}\n{items}\n{pager}", 'tableOptions' => ['id'=>'utab', 'class' => 'table table-striped table-bordered table-min'], 'filterPosition' =>'header', 'pager' => [ 'prevPageCssClass' => 'page-item', 'firstPageLabel' => 'Начало', 'lastPageLabel' => 'Конец', 'linkOptions' => [ 'class'=>'page-link'], 'pageCssClass' => 'page-item', 'disabledListItemSubTagOptions' => ['tag' => 'a', 'class' => 'page-link'], ], 'columns' => [ 'created_at', ['label'=>"Новость","format"=>"raw","value"=>fn($model)=>isset( $model->post->title )?Html::a($model->post->title,$model->post->getUrl(),["target"=>"_blank"]):''], 'message:ntext', 'fakename', 'ip_address', //['label'=>"user_agent","format"=>"raw","value"=>fn($model)=>isset( $model->user_agent )?$model->user_agent:''], 'user_agent', [ 'class' => ActionColumn::className(), 'template' => '{view}', 'urlCreator' => function ($action, Comments $model, $key, $index, $column) { return Url::toRoute([$action, 'id' => $model->id]); }, 'header'=>"Действия", 'buttonOptions' => ['class' => 'btn btn-default btn-sm'], 'contentOptions'=>['style'=>'min-width: 40px;'], 'options' => [ 'class' => 'nowrap', ], ], ], ]); ?>