Blame view

backend/views/importers-prefix/index.php 1.98 KB
2cdc93f0   Mihail   add crud models f...
1
2
3
4
  <?php
  
  use yii\helpers\Html;
  use yii\grid\GridView;
f5769826   Mihail   add modal form fo...
5
6
7
8
  use yii\widgets\Pjax;
  use yii\bootstrap\Modal;
  use backend\assets\ParserAsset;
  use yii\helpers\Url;
2cdc93f0   Mihail   add crud models f...
9
10
11
12
13
14
15
  
  /* @var $this yii\web\View */
  /* @var $searchModel backend\models\ImportersPrefixSearсh */
  /* @var $dataProvider yii\data\ActiveDataProvider */
  
  $this->title = Yii::t('app', 'Список префиксов поставщиков');
  $this->params['breadcrumbs'][] = $this->title;
f5769826   Mihail   add modal form fo...
16
17
18
  ParserAsset::register($this);
  $url = Url::to(['create']);
  
2cdc93f0   Mihail   add crud models f...
19
20
21
22
23
  ?>
  
  <div class="importers-prefix-index">
  
      <h1><?= Html::encode($this->title) ?></h1>
f5769826   Mihail   add modal form fo...
24
25
26
27
28
      <p>
          <?= Html::a(Yii::t('app', 'Добавление'), '#', ['class' => 'btn btn-success modalButton',  'value' => $url]) ?>
      </p>
      <?php // echo $this->render('_search', ['model' => $searchModel]);
      Pjax::begin(['id' => 'gridViewContent']);
2cdc93f0   Mihail   add crud models f...
29
  
f5769826   Mihail   add modal form fo...
30
      ?>
2cdc93f0   Mihail   add crud models f...
31
32
33
34
35
36
  
      <?= GridView::widget([
          'dataProvider' => $dataProvider,
          'filterModel' => $searchModel,
          'columns' => [
              ['class' => 'yii\grid\SerialColumn'],
f5769826   Mihail   add modal form fo...
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
              [
                  'attribute' => 'importer_id',
                  'label' => 'ПОСТАВЩИК',
                  'value' => function ($data) {
                      return $data->importerName;}
                  ],
              [
                  'attribute' => 'brand',
                  'label' => 'БРЕНД',
                  ],
              [
                  'attribute' => 'prefix',
                  'label' => 'ПРЕФИКСЫ (ЧЕРЕЗ ,)',
              ],
              [
                  'attribute' => 'timestamp',
                  'label' => 'ДАТА ДОБАВЛЕНИЯ',
              ],
2cdc93f0   Mihail   add crud models f...
55
56
57
58
  
              ['class' => 'yii\grid\ActionColumn',
                  'template' => '{update},{delete}'],
          ],
f5769826   Mihail   add modal form fo...
59
60
61
62
63
64
65
66
67
68
69
70
71
72
      ]);
  
  
  
      // сюда будем всавлять контент модального окна
      Modal::begin([
          'id' => 'modal',
          'size' => 'modal-lg',
      ]);
  
      echo "<div class='modalContent'></div>";
      Modal::end();
      Pjax::end();
      ?>
2cdc93f0   Mihail   add crud models f...
73
74
  
  </div>