Blame view

views/city/index.php 1.28 KB
a61ab7a7   Anastasia   stock
1
  <?php
a6ba0937   Alexey Boroda   -Stocks prettified
2
3
4
5
6
7
8
9
10
11
12
13
14
15
      
      use yii\data\ActiveDataProvider;
      use yii\helpers\Html;
      use yii\grid\GridView;
      use yii\web\View;
      use yiister\gentelella\widgets\Panel;
      
      /**
       * @var View               $this
       * @var ActiveDataProvider $dataProvider
       */
      
      $this->title = 'Cities';
      $this->params[ 'breadcrumbs' ][] = \Yii::t('stock', $this->title);
a61ab7a7   Anastasia   stock
16
17
18
  ?>
  <div class="city-index">
      <?php
a6ba0937   Alexey Boroda   -Stocks prettified
19
          $xPanel = Panel::begin(
a61ab7a7   Anastasia   stock
20
              [
a6ba0937   Alexey Boroda   -Stocks prettified
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
                  'header' => \Yii::t('stock', Html::encode($this->title)),
              ]
          );
      ?>
    <h1><?= \Yii::t('stock', Html::encode($this->title)) ?></h1>
    
    <p>
        <?= Html::a(\Yii::t('stock', 'Create City'), [ 'create' ], [ 'class' => 'btn btn-success' ]) ?>
    </p>
      <?= GridView::widget(
          [
              'dataProvider' => $dataProvider,
              'columns'      => [
                  [ 'class' => 'yii\grid\SerialColumn' ],
                  
                  'id',
                  [
                      'attribute' => \Yii::t('stock', 'Title'),
                      'value'     => 'lang.title',
                  ],
                  'sort',
                  'status:boolean',
                  
                  [ 'class' => 'yii\grid\ActionColumn' ],
a61ab7a7   Anastasia   stock
45
              ],
a6ba0937   Alexey Boroda   -Stocks prettified
46
47
          ]
      ); ?>
a61ab7a7   Anastasia   stock
48
      <?php
a6ba0937   Alexey Boroda   -Stocks prettified
49
          $xPanel::end();
a61ab7a7   Anastasia   stock
50
51
      ?>
  </div>