<?php
    
    use artbox\core\components\SeoComponent;
    use common\models\event\Tag;
    use yii\data\ActiveDataProvider;
    use artbox\core\helpers\Url;
    use yii\web\View;
    use yii\widgets\ListView;
    
    /**
     * @var View               $this
     * @var ActiveDataProvider $dataProvider
     * @var SeoComponent       $seo
     * @var Tag[]              $tags
     * @var Tag                $model
     */
    $seo = \Yii::$app->get('seo');
    
    $this->params[ 'breadcrumbs' ][] = [
        'label' => \Yii::t('app', 'Events'),
        'url'   => [ 'event/index' ],
    ];
    
    $this->params[ 'breadcrumbs' ][] = $seo->title;

?>

<div id="content">
  <div class="container">
    <div class="row">
      <!-- *** LEFT COLUMN ***
_________________________________________________________ -->
      
      
      <!--        <ul class="pager">-->
      <!--          <li class="previous"><a href="#">&larr; Назад</a>-->
      <!--          </li>-->
      <!--          <li class="next disabled"><a href="#">Вперед &rarr;</a>-->
      <!--          </li>-->
      <!--        </ul>-->
      
      <!-- /.col-md-9 -->
        
        
        <?= ListView::widget(
            [
                'dataProvider' => $dataProvider,
                'itemView'     => '_event',
                'options'      => [
                    'class' => 'col-md-9',
                    'id'    => 'blog-listing-medium',
                ],
                'layout'       => '{items}{pager}',
                'emptyText'    => \Yii::t('app', 'Empty dataProvider'),
            ]
        ); ?>
      
      
      <!-- *** LEFT COLUMN END *** -->
      
      <!-- *** RIGHT COLUMN ***
_________________________________________________________ -->
      
      <div class="col-md-3">
        
        <!-- *** MENUS AND WIDGETS ***
_________________________________________________________ -->
        
        
        <div class="panel sidebar-menu">
          <div class="panel-heading">
            <h3 class="panel-title"><?=\Yii::t('app', 'Search by tag')?></h3>
          </div>
          
          <div class="panel-body">
            <ul class="tag-cloud">
                <?php foreach ($tags as $tag) { ?>
                  <li><a href="<?= Url::to(
                          [
                              'alias' => $tag->alias
                          ]
                      ) ?>"><i class="fa fa-tags"></i>&#160<?= $tag->title; ?></a>
                  </li>
                <?php } ?>
            </ul>
          </div>
        </div>
        
        <!-- *** MENUS AND FILTERS END *** -->
      
      </div>
      <!-- /.col-md-3 -->
      
      <!-- *** RIGHT COLUMN END *** -->
    
    </div>
    <!-- /.row -->
  </div>
  <!-- /.container -->
</div>
<!-- /#content -->