Blame view

views/shop/view.php 1.73 KB
a61ab7a7   Anastasia   stock
1
  <?php
77d77c34   Anastasia   stock
2
3
4
5
6
7
8
9
10
11
12
13
14
15
      
      use yii\helpers\Html;
      use yii\widgets\DetailView;
      use yiister\gentelella\widgets\Panel;
      
      /* @var $this yii\web\View */
      /* @var $model artbox\stock\models\Shop */
      
      $this->title = $model->lang->title;
      $this->params[ 'breadcrumbs' ][] = [
          'label' => Yii::t('stock', 'Shops'),
          'url'   => [ 'index' ],
      ];
      $this->params[ 'breadcrumbs' ][] = $this->title;
a61ab7a7   Anastasia   stock
16
17
18
  ?>
  <div class="shop-view">
      <?php
77d77c34   Anastasia   stock
19
          $xPanel = Panel::begin(
a61ab7a7   Anastasia   stock
20
              [
77d77c34   Anastasia   stock
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
                  'header' => \Yii::t('stock', Html::encode($this->title)),
              ]
          );
      ?>
    <h1><?= Html::encode($this->title) ?></h1>
    
    <p>
        <?= Html::a(
            \Yii::t('stock', 'Update'),
            [
                'update',
                'id' => $model->id,
            ],
            [ 'class' => 'btn btn-primary' ]
        ) ?>
        <?= Html::a(
            \Yii::t('stock', 'Delete'),
            [
                'delete',
                'id' => $model->id,
            ],
            [
                'class' => 'btn btn-danger',
                'data'  => [
                    'confirm' => 'Are you sure you want to delete this item?',
                    'method'  => 'post',
                ],
            ]
        ) ?>
    </p>
      
      <?= DetailView::widget(
          [
              'model' => $model,
              'attributes' => [
                  'id',
                  'lang.title',
                  [
                      'attribute' => 'lang.alias.value',
                      'label'     => \Yii::t('catalog', 'Alias'),
                  ],
                  'lang.description:html',
                  'lang.address',
                  'sort',
                  'status:boolean',
a61ab7a7   Anastasia   stock
66
              ],
77d77c34   Anastasia   stock
67
68
          ]
      ) ?>
a61ab7a7   Anastasia   stock
69
      <?php
77d77c34   Anastasia   stock
70
          $xPanel::end();
a61ab7a7   Anastasia   stock
71
72
      ?>
  </div>