Blame view

backend/views/brands-replace/index.php 1.52 KB
0084d336   Administrator   Importers CRUD
1
2
3
4
5
6
7
8
9
  <?php
  
  use yii\helpers\Html;
  use yii\grid\GridView;
  
  /* @var $this yii\web\View */
  /* @var $searchModel common\models\BrandsReplaceSearch */
  /* @var $dataProvider yii\data\ActiveDataProvider */
  
83aa6595   Mihail   edit brand-replac...
10
  $this->title = 'Замена брендов';
0084d336   Administrator   Importers CRUD
11
12
13
14
15
16
17
18
  $this->params['breadcrumbs'][] = $this->title;
  ?>
  <div class="brands-replace-index">
  
      <h1><?= Html::encode($this->title) ?></h1>
      <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  
      <p>
83aa6595   Mihail   edit brand-replac...
19
          <?= Html::a('Добавить', ['create'], ['class' => 'btn btn-success']) ?>
0084d336   Administrator   Importers CRUD
20
21
22
23
24
25
26
27
28
29
30
      </p>
  
      <?= GridView::widget([
          'dataProvider' => $dataProvider,
          'filterModel' => $searchModel,
          'columns' => [
              ['class' => 'yii\grid\SerialColumn'],
  
              'id',
              'from_brand',
              'to_brand',
83aa6595   Mihail   edit brand-replac...
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
              ['attribute' => 'finish',
                  'format' => 'raw',
                  'filter' => [
                      '1'=>'Закончена',
                      '0'=>'Не закончена',
                  ],
                  'value' => function($data){
                      if($data->finish){
                          $status_img = '<i style="color: #008000" class="glyphicon glyphicon-ok"></i>';
                      } else {
                          $status_img = '<i style="color: red" class="glyphicon glyphicon-remove"></i>';
                      }
                      return $status_img;
                  },
              ],
0084d336   Administrator   Importers CRUD
46
47
              'timestamp',
  
62dba7d8   Mihail   add goods control...
48
49
              ['class' => 'yii\grid\ActionColumn',
              ],
0084d336   Administrator   Importers CRUD
50
51
52
53
          ],
      ]); ?>
  
  </div>