51e0a262
Yarik
test
|
1
|
<?php
|
588209fc
Yarik
test
|
2
3
4
5
6
7
8
9
10
|
/**
* @var PortfolioSearch $searchModel
* @var ActiveDataProvider $dataProvider
*/
use common\models\PortfolioSearch;
use yii\data\ActiveDataProvider;
use yii\grid\ActionColumn;
use yii\grid\GridView;
use yii\helpers\Html;
|
51e0a262
Yarik
test
|
11
|
|
588209fc
Yarik
test
|
12
13
|
$this->title = 'Портфолио';
$this->params[ 'breadcrumbs' ][] = $this->title;
|
51e0a262
Yarik
test
|
14
|
?>
|
588209fc
Yarik
test
|
15
16
|
<h1><?= $this->title ?></h1>
<p>
|
989c83b0
Yarik
test
|
17
|
<?= Html::a(Yii::t('app', 'Добавить'), [ 'portfolio-create' ], [ 'class' => 'btn btn-success' ]) ?>
|
588209fc
Yarik
test
|
18
19
20
21
22
23
|
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
[
|
989c83b0
Yarik
test
|
24
|
'attribute' => 'portfolio_id',
|
588209fc
Yarik
test
|
25
26
27
|
'label' => 'ID',
],
'name',
|
989c83b0
Yarik
test
|
28
|
'date_add',
|
588209fc
Yarik
test
|
29
30
|
'view_count',
[
|
989c83b0
Yarik
test
|
31
32
33
|
'attribute' => 'specializationString',
],
[
|
588209fc
Yarik
test
|
34
35
36
37
|
'class' => ActionColumn::className(),
'buttons' => [
'update' => function($url, $model, $key) {
return Html::a('Update', [
|
989c83b0
Yarik
test
|
38
39
|
'portfolio-update',
'id' => $model->portfolio_id,
|
588209fc
Yarik
test
|
40
41
42
43
|
]);
},
'delete' => function($url, $model, $key) {
return Html::a('Delete', [
|
989c83b0
Yarik
test
|
44
45
|
'portfolio-delete',
'id' => $model->portfolio_id,
|
588209fc
Yarik
test
|
46
47
48
49
50
51
52
53
54
55
56
57
58
|
], [
'title' => 'Удалить',
'aria-label' => 'Удалить',
'data-confirm' => 'Вы уверены, что хотите удалить этот элемент?',
'data-method' => 'post',
'data-pjax' => '0',
]);
},
],
'template' => '{update} {delete}',
],
],
]); ?>
|