Blame view

backend/views/brand/index.php 1.5 KB
d8c1a2e0   Yarik   Big commit artbox
1
  <?php

4a7f93fb   Yarik   Another one admin...
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
      

      use common\modules\product\models\Brand;

      use common\modules\product\models\BrandSearch;

      use yii\data\ActiveDataProvider;

      use yii\helpers\Html;

      use yii\grid\GridView;

      use yii\web\View;

      

      /**

       * @var View               $this

       * @var BrandSearch        $searchModel

       * @var ActiveDataProvider $dataProvider

       */

      

      $this->title = Yii::t('product', 'Brands');

      $this->params[ 'breadcrumbs' ][] = $this->title;

d8c1a2e0   Yarik   Big commit artbox
18
19
  ?>

  <div class="brand-index">

4a7f93fb   Yarik   Another one admin...
20
      

d8c1a2e0   Yarik   Big commit artbox
21
      <h1><?= Html::encode($this->title) ?></h1>

4a7f93fb   Yarik   Another one admin...
22
      

d8c1a2e0   Yarik   Big commit artbox
23
      <p>

36c8e1fc   Eugeny Galkovskiy   MESSAGES !!!! EVGEN!
24
          <?= Html::a(Yii::t('product', Yii::t('product', 'Create Brand')), [ 'create' ], [ 'class' => 'btn btn-success' ]) ?>

d8c1a2e0   Yarik   Big commit artbox
25
26
27
      </p>

      <?= GridView::widget([

          'dataProvider' => $dataProvider,

4a7f93fb   Yarik   Another one admin...
28
29
          'filterModel'  => $searchModel,

          'columns'      => [

93c267f7   Yarik   Multilanguage big...
30
              'brand_id',

4a7f93fb   Yarik   Another one admin...
31
32
33
34
              [

                  'attribute' => 'brand_name',

                  'value'     => 'lang.name',

              ],

93c267f7   Yarik   Multilanguage big...
35
              'imageUrl:image',

4a7f93fb   Yarik   Another one admin...
36
37
38
39
40
41
42
43
44
45
46
47
              [

                  'attribute' => 'in_menu',

                  'content'   => function($model) {

                      /**

                       * @var Brand $model

                       */

                      return Html::tag('span', '', [

                          'class' => 'glyphicon glyphicon-'.($model->in_menu?'ok':'remove'),

                      ]);

                  },

              ],

              [ 'class' => 'yii\grid\ActionColumn',

d8c1a2e0   Yarik   Big commit artbox
48
          ],

4a7f93fb   Yarik   Another one admin...
49
      ],

d8c1a2e0   Yarik   Big commit artbox
50
51
      ]); ?>

  </div>