title = 'Comments'; $this->params['breadcrumbs'][] = $this->title; ?>
= Html::a('Create Comments', ['create'], ['class' => 'btn btn-success']) ?>
= Html::encode($this->title) ?>
= Html::a('Create Comments', ['create'], ['class' => 'btn btn-success']) ?>
5000, 'enablePushState'=>false ])?> = GridView::widget([ 'dataProvider' => $dataProvider, 'layout' => "{errors}\n{summary}\n{pager}\n{items}\n{pager}", '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"]).Html::a(" ",['/manager/news/update','id'=>$model->post->id],['target'=>"_blank"]):''], 'message:ntext', 'fakename', ['label'=>"Модерация","format"=>"raw","value"=>function($model){ /** * @var $model Comments */ $moderate_button_class = $model->visible=="Y"?"btn-danger":"btn-success"; return Html::a($model->visible=="Y"?"Скрыть":"Пропустить",['/manager/comments/toggle',"id"=>$model->id,"value"=>$model->visible=="Y"?"N":"Y"],['class'=>"btn {$moderate_button_class}"]); }], [ 'class' => ActionColumn::className(), 'urlCreator' => function ($action, Comments $model, $key, $index, $column) { return Url::toRoute([$action, 'id' => $model->id]); } ], ], ]); ?>