Blame view

backend/views/brand/view.php 1.69 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
18
      

      use common\modules\product\models\Brand;

      use yii\helpers\Html;

      use yii\web\View;

      use yii\widgets\DetailView;

      

      /**

       * @var View  $this

       * @var Brand $model

       */

      

      $this->title = $model->lang->name;

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

          'label' => Yii::t('product', 'Brands'),

          'url'   => [ 'index' ],

      ];

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

d8c1a2e0   Yarik   Big commit artbox
19
20
  ?>

  <div class="brand-view">

4a7f93fb   Yarik   Another one admin...
21
      

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

4a7f93fb   Yarik   Another one admin...
23
      

d8c1a2e0   Yarik   Big commit artbox
24
      <p>

4a7f93fb   Yarik   Another one admin...
25
26
27
28
29
30
31
32
          <?= Html::a(Yii::t('product', 'Update'), [

              'update',

              'id' => $model->brand_id,

          ], [ 'class' => 'btn btn-primary' ]) ?>

          <?= Html::a(Yii::t('product', 'Delete'), [

              'delete',

              'id' => $model->brand_id,

          ], [

d8c1a2e0   Yarik   Big commit artbox
33
              'class' => 'btn btn-danger',

4a7f93fb   Yarik   Another one admin...
34
              'data'  => [

d8c1a2e0   Yarik   Big commit artbox
35
                  'confirm' => Yii::t('product', 'Are you sure you want to delete this item?'),

4a7f93fb   Yarik   Another one admin...
36
                  'method'  => 'post',

d8c1a2e0   Yarik   Big commit artbox
37
38
39
              ],

          ]) ?>

      </p>

4a7f93fb   Yarik   Another one admin...
40
      

d8c1a2e0   Yarik   Big commit artbox
41
      <?= DetailView::widget([

4a7f93fb   Yarik   Another one admin...
42
          'model'      => $model,

d8c1a2e0   Yarik   Big commit artbox
43
44
          'attributes' => [

              'brand_id',

4a7f93fb   Yarik   Another one admin...
45
46
47
48
49
50
51
52
53
              'lang.name',

              'lang.alias',

              [

                  'attribute' => 'in_menu',

                  'value'     => Html::tag('span', '', [

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

                  ]),

                  'format'    => 'html',

              ],

d8c1a2e0   Yarik   Big commit artbox
54
              'imageUrl:image',

4a7f93fb   Yarik   Another one admin...
55
56
57
58
              'lang.meta_title',

              'lang.meta_robots',

              'lang.meta_desc',

              'lang.seo_text',

d8c1a2e0   Yarik   Big commit artbox
59
60
61
62
          ],

      ]) ?>

  

  </div>