Blame view

backend/views/seo-dynamic/index.php 2.91 KB
d8c1a2e0   Yarik   Big commit artbox
1
  <?php

93c267f7   Yarik   Multilanguage big...
2
3
4
5
6
7
8
9
10
11
12
      

      use yii\helpers\Html;

      use yii\grid\GridView;

      use yii\helpers\Url;

      

      /* @var $this yii\web\View */

      /* @var $searchModel common\models\SeoDynamicSearch */

      /* @var $dataProvider yii\data\ActiveDataProvider */

      

      $this->title = Yii::t('app', 'Seo Dynamics');

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

d8c1a2e0   Yarik   Big commit artbox
13
14
  ?>

  <div class="seo-dynamic-index">

93c267f7   Yarik   Multilanguage big...
15
      

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

      <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

93c267f7   Yarik   Multilanguage big...
18
      

d8c1a2e0   Yarik   Big commit artbox
19
      <p>

93c267f7   Yarik   Multilanguage big...
20
21
22
23
          <?= Html::a(Yii::t('app', 'Create Seo Dynamic'), Url::toRoute([

              'create',

              'seo_category_id' => $seo_category_id,

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

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

      <?= GridView::widget([

          'dataProvider' => $dataProvider,

93c267f7   Yarik   Multilanguage big...
27
28
29
          'filterModel'  => $searchModel,

          'columns'      => [

              [ 'class' => 'yii\grid\SerialColumn' ],

d8c1a2e0   Yarik   Big commit artbox
30
31
              'seo_dynamic_id',

              'seo_category_id',

d8c1a2e0   Yarik   Big commit artbox
32
33
              'action',

              'fields',

93c267f7   Yarik   Multilanguage big...
34
              'status',

d8c1a2e0   Yarik   Big commit artbox
35
              [

93c267f7   Yarik   Multilanguage big...
36
37
38
39
40
41
42
43
                  'class'   => 'yii\grid\ActionColumn',

                  'buttons' => [

                      'view'   => function($url, $model) {

                          return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', Url::toRoute([

                              'view',

                              'seo_category_id' => $model->seo_category_id,

                              'id'              => $model->seo_dynamic_id,

                          ]), [

d8c1a2e0   Yarik   Big commit artbox
44
                                  'title' => "Просмотр",

93c267f7   Yarik   Multilanguage big...
45
                              ]);

d8c1a2e0   Yarik   Big commit artbox
46
                      },

93c267f7   Yarik   Multilanguage big...
47
48
49
50
51
52
                      'update' => function($url, $model) {

                          return Html::a('<span class="glyphicon glyphicon-pencil"></span>', Url::toRoute([

                              'update',

                              'seo_category_id' => $model->seo_category_id,

                              'id'              => $model->seo_dynamic_id,

                          ]), [

d8c1a2e0   Yarik   Big commit artbox
53
                                  'title' => "Редактировать",

93c267f7   Yarik   Multilanguage big...
54
                              ]);

d8c1a2e0   Yarik   Big commit artbox
55
                      },

93c267f7   Yarik   Multilanguage big...
56
57
58
59
60
61
62
63
                      'delete' => function($url, $model) {

                          

                          return Html::a('<span class="glyphicon glyphicon-trash"></span>', Url::toRoute([

                              'delete',

                              'seo_category_id' => $model->seo_category_id,

                              'id'              => $model->seo_dynamic_id,

                          ]), [

                              'title'        => Yii::t('yii', 'Delete'),

d8c1a2e0   Yarik   Big commit artbox
64
                              'data-confirm' => Yii::t('yii', 'Are you sure to delete this item?'),

93c267f7   Yarik   Multilanguage big...
65
                              'data-method'  => 'post',

d8c1a2e0   Yarik   Big commit artbox
66
                          ]);

93c267f7   Yarik   Multilanguage big...
67
                          

d8c1a2e0   Yarik   Big commit artbox
68
69
70
71
72
73
                      },

                  ],

              ],

          ],

      ]); ?>

  </div>