Blame view

backend/modules/map/views/layouts/list-item.php 2.33 KB
d1f8bd40   Alexey Boroda   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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
  <?php
  
  /**
   * @author Alla Kuzmenko
   * @copyright (c), Thread
   */
  use yii\helpers\{
      ArrayHelper, Html
  };
  use yii\widgets\Breadcrumbs;
  use yii\bootstrap\Dropdown;
  
  $get = Yii::$app->getRequest()->get();
  $this->beginContent('@app/layouts/main.php');
  ?>
  <div class="row white-bg page-heading">
      <div class="col-md-7">
          <h2>
              <?= Yii::t($this->context->module->name, $this->context->module->title) ?>.
              <?php // Yii::t($this->context->module->name, $this->context->group->lang->title) ?>
              <?= Yii::t($this->context->module->name, $this->context->title) ?>
          </h2>
          <?= Breadcrumbs::widget([
              'homeLink' => false,
              'links' => [
                  [
                      'label' => Yii::t($this->context->module->name, $this->context->module->title),
                  ],
                  /*[
                      'label' => Yii::t($this->context->module->name, $this->context->group->lang->title),
                  ],*/
                  [
                      'label' => Yii::t($this->context->module->name, $this->context->title),
                  ],
                  Yii::t('app', 'List'),
              ],
          ]) ?>
      </div>
      <div class="col-md-2">
      </div>
      <div class="col-md-2">
          <h2 class="btn-group" role="group">
              <?php
              echo Html::button(Yii::t('app', 'Create') . ' <span class="caret"></span>', [
                  'type' => 'button',
                  'class' => 'btn btn-primary dropdown-toggle',
                  'data-toggle' => 'dropdown',
                  'aria-haspopup' => 'true',
                  'aria-expanded' => 'false'
              ]);
              $items = $this->context->module::typeRange();
              $items_n = [];
              foreach ($items as $type => $label) {
                  $items_n[] = ['label' => $label, 'url' =>  ArrayHelper::merge(['create', 'type' => $type], $get)];
              }
              echo Dropdown::widget([
                  'items' => $items_n
              ]);
              unset($items, $items_n);
  
              echo  Html::a(Html::tag('i', '', ['class' => 'fa fa-trash']), ArrayHelper::merge([
                  'trash'], $get),
                  ['class' => 'btn btn-default', 'title' => Yii::t('app', 'Trash')]); ?>
          </h2>
      </div>
  </div>
  
  <div class="animated fadeIn">
      <?= $content; ?>
  </div>
  
  <?php $this->endContent(); ?>