Blame view

frontend/views/blog/index.php 4.16 KB
298bc0f4   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  <?php
      
      use artbox\core\components\SeoComponent;
      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 \common\models\blog\Tag[]              $tags
       * @var common\models\blog\Category[] $categories
       */
      $seo = \Yii::$app->get('seo');
298bc0f4   Alexey Boroda   first commit
17
  
cfc1b89a   alex   123
18
19
      $this->params[ 'breadcrumbs' ][] = \Yii::t('app', 'Blog');
     
298bc0f4   Alexey Boroda   first commit
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  ?>
  
  <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 -->
          
cfc1b89a   alex   123
38
      
298bc0f4   Alexey Boroda   first commit
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
          <?= ListView::widget(
              [
                  'dataProvider' => $dataProvider,
                  'itemView'     => '_article',
                  'options'      => [
                      'class' => 'col-md-9',
                      'id'    => 'blog-listing-medium',
                  ],
                  'layout'       => '{items}{pager}',
              ]
          ); ?>
        
        
        <!-- *** LEFT COLUMN END *** -->
        
        <!-- *** RIGHT COLUMN ***
  _________________________________________________________ -->
        
        <div class="col-md-3 blog-sidebar">
          
          <!-- *** MENUS AND WIDGETS ***
  _________________________________________________________ -->
          <div class="panel panel-default sidebar-menu">
            
            <div class="panel-heading">
724d0056   Виталий   forms-reduction
64
              <h3 class="panel-title"><?=\Yii::t('app', 'Company Blog')?></h3>
298bc0f4   Alexey Boroda   first commit
65
66
67
68
            </div>
            
            <div class="panel-body text-widget">
              <p>
724d0056   Виталий   forms-reduction
69
                  <?=\Yii::t('app', 'blog-txt')?>
298bc0f4   Alexey Boroda   first commit
70
71
72
73
74
75
76
77
78
79
              </p>
            
            </div>
          </div>
      
  <!--          --><?//= BlogSearch::widget(); ?>
            <?php if (!empty($categories)) { ?>
                <div class="panel panel-default sidebar-menu">
  
                    <div class="panel-heading">
724d0056   Виталий   forms-reduction
80
                        <h3 class="panel-title"><?=\Yii::t('app', 'Categories')?></h3>
298bc0f4   Alexey Boroda   first commit
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
                    </div>
  
                    <div class="panel-body text-widget">
                        <ul class="categories-blog-index">
  
                            <?php foreach ($categories as $category) { ?>
                                <li>
                                    <a href="<?= Url::to(
                                        [
                                            'alias' => $category->alias
                                        ]
                                    ) ?>"><?= $category->title; ?></a>
                                </li>
                            <?php } ?>
                        </ul>
  
                    </div>
                </div>
  
                <?php
            }
              if(!empty($tags)){
                  ?>
                  <div class="panel sidebar-menu">
                      <div class="panel-heading">
724d0056   Виталий   forms-reduction
106
                          <h3 class="panel-title"><?=\Yii::t('app', 'Search by tag')?></h3>
298bc0f4   Alexey Boroda   first commit
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
                      </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-tag"></i>&#160<?= $tag->label; ?></a>
                                  </li>
                              <?php } ?>
                          </ul>
                      </div>
                  </div>
            <?php
              }
          ?>
  
          
          <!-- *** MENUS AND FILTERS END *** -->
        
        </div>
        <!-- /.col-md-3 -->
        
        <!-- *** RIGHT COLUMN END *** -->
      
      </div>
      <!-- /.row -->
    </div>
    <!-- /.container -->
  </div>
  <!-- /#content -->