= Html::a(Yii::t('app', 'Добавить'), [ 'portfolio-create' ], [ 'class' => 'btn btn-success' ]) ?>
= GridView::widget([
'options' => ['class'=>'style admin-all-pages-wr'],
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
[
'attribute' => 'portfolio_id',
'label' => 'ID',
],
'name',
[
'attribute' => 'date_add',
'filter' => "
".
DatePicker::widget([
'model' => $searchModel,
'attribute' => 'date_add_from',
'language' => 'ru',
'dateFormat' => 'yyyy-MM-dd',
'clientOptions' => [
'changeYear' => true,
'changeMonth' => true,
],
]).
"
".
DatePicker::widget([
'model' => $searchModel,
'attribute' => 'date_add_to',
'language' => 'ru',
'dateFormat' => 'yyyy-MM-dd',
'clientOptions' => [
'changeYear' => true,
'changeMonth' => true,
],
])
."
",
'format' => 'html',
],
'view_count',
[
'value' => function($model, $key, $index, $column) {
return 0;
},
'label' => 'Рейтинг',
],
[
'value' => function($model, $key, $index, $column) {
return 0;
},
'label' => 'Комментарии',
],
[
'attribute' => 'specializationString',
],
[
'class' => ActionColumn::className(),
'buttons' => [
'update' => function($url, $model, $key) {
return Html::a('

', [
'portfolio-update',
'id' => $model->portfolio_id,
],[
'title' => 'Редактировать',
]);
},
'delete' => function($url, $model, $key) {
return Html::a('

', [
'portfolio-delete',
'id' => $model->portfolio_id,
], [
'title' => 'Удалить',
'aria-label' => 'Удалить',
'data-confirm' => 'Вы уверены, что хотите удалить этот элемент?',
'data-method' => 'post',
'data-pjax' => '0',
]);
},
],
'template' => '{update} {delete}',
],
],
]); ?>