Blame view

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