Blame view

frontend/modules/news/widgets/GroupMenu/views/index.php 708 Bytes
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
  <?php
  use yii\bootstrap\Html;
  
  /**
   *
   * @author FilamentV <vortex.filament@gmail.com>
   * @copyright (c), Thread
   *
   * @var $groups \frontend\modules\news\models\Group[]
   * @var $group \frontend\modules\news\models\Group
   */
  ?>
  
  <nav>
      <?= Html::tag('div', Yii::t('news', 'Groups'), [
          'class' => 'title h3'
      ]) ?>
      <ul class="nav nav-pills nav-stacked">
          <?php
          foreach ($groups as $group):
              $active = (isset($_GET['alias']) && $group['alias'] === $_GET['alias']) ? 'active' : '';
              echo Html::tag('li', Html::a($group['lang']['title'], $group->getUrl()), [
                  'class' => $active
              ]);
          endforeach;
          ?>
      </ul>
  </nav>