Blame view

artweb/artbox-core/views/alias/_search.php 1.76 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
  <?php
      use yii\bootstrap\ActiveForm;
      use yii\bootstrap\Html;
      use yii\web\View;
      use artbox\core\models\AliasSearch;
      
      /**
       * @var AliasSearch $model
       * @var View        $this
       * @var array       $languages
       * @var array       $entities
       */
      $languages[ 0 ] = \Yii::t('core', 'No language');
  ?>
  <div class="alias-search">
      <?php
          $form = ActiveForm::begin(
              [
                  'action'  => [ 'index' ],
                  'method'  => 'get',
                  'options' => [
                      'class' => 'form-inline',
                  ],
              ]
          );
      ?>
      <?php
          echo $form->field($model, 'search')
                    ->label(false)
                    ->textInput();
          echo $form->field($model, 'entity')
                    ->label(false)
                    ->dropDownList(
                        $entities,
                        [
                            'prompt' => ' ',
                        ]
                    );
          echo $form->field($model, 'static')
                    ->label(false)
                    ->dropDownList(
                        [
                            \Yii::t('core', 'Static pages'),
                            \Yii::t('core', 'Dynamic pages'),
                        ],
                        [
                            'prompt' => ' ',
                        ]
                    );
          echo $form->field($model, 'language_id')
                    ->label(false)
                    ->dropDownList(
                        $languages,
                        [
                            'prompt' => ' ',
                        ]
                    );
          echo Html::submitButton(\Yii::t('core', 'Search'), [ 'class' => 'btn btn-default' ]);
      ?>
      <?php
          $form::end();
      ?>
  </div>