Blame view

artweb/artbox-core/views/alias/index.php 2.99 KB
326af919   mzavalniuk   add artbox-core t...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
  <?php
      
      use artbox\core\models\AliasSearch;
      use yii\helpers\Html;
      use yiister\gentelella\widgets\grid\GridView;
      use yiister\gentelella\widgets\Panel;
      
      /**
       * @var  yii\web\View                $this
       * @var  AliasSearch                 $searchModel
       * @var  yii\data\ActiveDataProvider $dataProvider
       * @var array                        $languages
       * @var array                        $entities
       */
      
      $this->title = \Yii::t('core', 'Aliases');
      $this->params[ 'breadcrumbs' ][] = $this->title;
  ?>
  <div class="alias-index">
      
      <?php $seoPanel = Panel::begin(
          [
              'header'      => \Yii::t('core', 'Create filter alias'),
              'collapsable' => true,
          ]
      ); ?>
    
    <p class="font-gray-dark">
      <b>Example:</b> http://domain.com/<b style="color: #D9534F">catalog/category/filter1_filter2</b>
    </p>
      
      <?= Html::beginForm(
          [ 'alias/create' ],
          'GET',
          [
              'class' => 'form-horizontal form-label-left',
          ]
      ) ?>
    <div class="form-group">
      <label class="col-sm-2 control-label">
          <?= \Yii::t('core', 'Enter filter url here: ') ?>
      </label>
      <div class="col-sm-10">
        <div class="input-group">
            <?= Html::textInput(
                'url',
                null,
                [
                    'class' => 'form-control',
                ]
            ) ?>
          <span class="input-group-btn">
                                <?= Html::submitButton(
                                    \Yii::t('core', 'Create alias'),
                                    [
                                        'class' => 'btn btn-primary',
                                    ]
                                ) ?>
            </span>
  
        </div>
      </div>
    </div>
      <?= Html::endForm(); ?>
      
      <?php $seoPanel::end(); ?>
      
      <?php
          $xPanel = Panel::begin(
              [
                  'header' => $this->title,
              ]
          );
      ?>
      <?php
          echo $this->render(
              '_search',
              [
                  'model'     => $searchModel,
                  'languages' => $languages,
                  'entities'  => $entities,
              ]
          );
      ?>
    <p>
        <?= Html::a(
            \Yii::t('core', 'Create {item}', [ 'item' => \Yii::t('core', 'Alias') ]),
            [ 'create' ],
            [
                'class'        => 'btn btn-danger',
                'data-confirm' => \Yii::t(
                    'core',
                    'Creating aliases by hand may cause bugs for your website. Use it only if you know what are you doing!'
                ),
            ]
        ) ?>
    </p>
    <div class="divider-dashed"></div>
      <?= GridView::widget(
          [
              'dataProvider' => $dataProvider,
              'columns'      => [
                  'id',
                  'value',
                  'route',
                  'title',
                  [ 'class' => 'yii\grid\ActionColumn' ],
              ],
          ]
      ); ?>
      <?php
          $xPanel::end();
      ?>
  </div>