Blame view

backend/views/language/create.php 1.43 KB
b0f143c3   Yarik   first commit
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
  <?php
  
  use yii\helpers\Html;
  use yii\grid\GridView;
  use yii\grid\Column;
  
  /* @var $this yii\web\View */
  /* @var $searchModel backend\models\LanguageSearch */
  /* @var $dataProvider yii\data\ActiveDataProvider */
  
  $this->title = Yii::t('app', 'Languages');
  $this->params['breadcrumbs'][] = $this->title;
  echo $this->render('layout');
  ?>
  <div class="lang-column-2">
  
      <?php // echo $this->render('_search', ['model' => $searchModel]); ?>
  
      <?= GridView::widget([
          'dataProvider' => $dataProvider,
          'filterModel' => $searchModel,
          'layout' => "{items}",
          'columns' => [
              [
              'class' => Column::className(),
              'content' => function($model, $key, $index, $column) {
               return '<span class="f32"><span class="flag '.$model->country_code.'"></span></span>';
              }
              ],
              'language_name',
              'lang_code',
              [
                  'class' => 'yii\grid\ActionColumn',
                  'template' => '{create}',
                  'buttons' => [
                      'create' => function ($url, $model, $key) {
                          return Html::a('', $url, ['class' => 'glyphicon glyphicon-plus', 'title' => Yii::t('app', 'Create Language')]);
                      },
                  ],
              ]
          ]
      ]); ?>
      
      <p class="text-right">
          <?= Html::a(Yii::t('app', 'Cancel'), ['index'], ['class' => 'btn btn-success']) ?>
      </p>
  
  </div>