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;
|
4c9663e0
Yarik
test
|
11
|
use yii\jui\DatePicker;
|
51e0a262
Yarik
test
|
12
|
|
588209fc
Yarik
test
|
13
14
|
$this->title = 'Портфолио';
$this->params[ 'breadcrumbs' ][] = $this->title;
|
51e0a262
Yarik
test
|
15
|
?>
|
fd7caf21
Виталий
tokar commit
|
16
17
|
<div class="login-left-column-title"><?= $this->title ?></div>
<div class="admin-all-pages-add">
|
989c83b0
Yarik
test
|
18
|
<?= Html::a(Yii::t('app', 'Добавить'), [ 'portfolio-create' ], [ 'class' => 'btn btn-success' ]) ?>
|
fd7caf21
Виталий
tokar commit
|
19
|
</div>
|
588209fc
Yarik
test
|
20
|
<?= GridView::widget([
|
fd7caf21
Виталий
tokar commit
|
21
|
'options' => ['class'=>'style admin-all-pages-wr'],
|
588209fc
Yarik
test
|
22
23
24
25
|
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
[
|
989c83b0
Yarik
test
|
26
|
'attribute' => 'portfolio_id',
|
588209fc
Yarik
test
|
27
28
29
|
'label' => 'ID',
],
'name',
|
4c9663e0
Yarik
test
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
[
'attribute' => 'date_add',
'filter' => "<div class=\"input-group input-group-xs input-daterange\">
<span class='field-teamsearch-experience_from_from'>".
DatePicker::widget([
'model' => $searchModel,
'attribute' => 'date_add_from',
'language' => 'ru',
'dateFormat' => 'yyyy-MM-dd',
'clientOptions' => [
'changeYear' => true,
'changeMonth' => true,
],
]).
"</span>
<span class=\"input-group-addon kv-field-separator\">
<i class=\"glyphicon glyphicon-resize-horizontal\"></i>
</span>
<span class='field-teamsearch-experience_from_to'>".
DatePicker::widget([
'model' => $searchModel,
'attribute' => 'date_add_to',
'language' => 'ru',
'dateFormat' => 'yyyy-MM-dd',
'clientOptions' => [
'changeYear' => true,
'changeMonth' => true,
],
])
."</span>
</div>",
'format' => 'html',
],
|
588209fc
Yarik
test
|
63
64
|
'view_count',
[
|
989c83b0
Yarik
test
|
65
66
67
|
'attribute' => 'specializationString',
],
[
|
588209fc
Yarik
test
|
68
69
70
|
'class' => ActionColumn::className(),
'buttons' => [
'update' => function($url, $model, $key) {
|
8e5fa1e8
Виталий
tokar commit
|
71
|
return Html::a('<img src="/images/ico_pencil.png" alt="">', [
|
989c83b0
Yarik
test
|
72
73
|
'portfolio-update',
'id' => $model->portfolio_id,
|
8e5fa1e8
Виталий
tokar commit
|
74
75
|
],[
'title' => 'Редактировать',
|
588209fc
Yarik
test
|
76
77
78
|
]);
},
'delete' => function($url, $model, $key) {
|
8e5fa1e8
Виталий
tokar commit
|
79
|
return Html::a('<img src="/images/delete-ico.png" alt="">', [
|
989c83b0
Yarik
test
|
80
81
|
'portfolio-delete',
'id' => $model->portfolio_id,
|
588209fc
Yarik
test
|
82
83
84
85
86
87
88
89
90
91
92
93
94
|
], [
'title' => 'Удалить',
'aria-label' => 'Удалить',
'data-confirm' => 'Вы уверены, что хотите удалить этот элемент?',
'data-method' => 'post',
'data-pjax' => '0',
]);
},
],
'template' => '{update} {delete}',
],
],
]); ?>
|