Blame view

backend/views/banner/view.php 1.62 KB
d8c1a2e0   Yarik   Big commit artbox
1
  <?php

93c267f7   Yarik   Multilanguage big...
2
3
4
5
      

      use yii\helpers\Html;

      use yii\widgets\DetailView;

      

2f69a481   Yarik   i18n config fix
6
7
8
9
10
      /**

       * @var yii\web\View         $this

       * @var common\models\Banner $model

       */

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

93c267f7   Yarik   Multilanguage big...
11
12
13
14
15
      $this->params[ 'breadcrumbs' ][] = [

          'label' => Yii::t('app', 'Banners'),

          'url'   => [ 'index' ],

      ];

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

d8c1a2e0   Yarik   Big commit artbox
16
17
  ?>

  <div class="banner-view">

93c267f7   Yarik   Multilanguage big...
18
      

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

93c267f7   Yarik   Multilanguage big...
20
      

d8c1a2e0   Yarik   Big commit artbox
21
      <p>

93c267f7   Yarik   Multilanguage big...
22
23
24
25
26
27
28
29
          <?= Html::a(Yii::t('app', 'Update'), [

              'update',

              'id' => $model->banner_id,

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

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

              'delete',

              'id' => $model->banner_id,

          ], [

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

93c267f7   Yarik   Multilanguage big...
31
              'data'  => [

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

93c267f7   Yarik   Multilanguage big...
33
                  'method'  => 'post',

d8c1a2e0   Yarik   Big commit artbox
34
35
36
              ],

          ]) ?>

      </p>

93c267f7   Yarik   Multilanguage big...
37
      

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

2f69a481   Yarik   i18n config fix
39
          'model'      => $model,

d8c1a2e0   Yarik   Big commit artbox
40
41
          'attributes' => [

              'banner_id',

2f69a481   Yarik   i18n config fix
42
43
44
45
46
47
48
49
50
51
52
              [

                  'attribute' => 'url',

                  'value'     => Html::a($model->url, \Yii::$app->urlManagerFrontend->createUrl($model->url)),

                  'format'    => 'html',

              ],

              'lang.title',

              'lang.imageUrl:image',

              [

                  'attribute' => 'status',

                  'value'     => $model->status ? \Yii::t('app', 'Показать') : \Yii::t('app', 'Скрыть'),

              ],

d8c1a2e0   Yarik   Big commit artbox
53
54
55
56
          ],

      ]) ?>

  

  </div>