Blame view

frontend/views/blog/index.php 4.29 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
          <?= ListView::widget(
              [
                  'dataProvider' => $dataProvider,
                  'itemView'     => '_article',
3ede7361   alex   Обновил переводы ...
43
                  'emptyText'    =>\Yii::t('app','No results found'),
298bc0f4   Alexey Boroda   first commit
44
45
46
47
48
                  'options'      => [
                      'class' => 'col-md-9',
                      'id'    => 'blog-listing-medium',
                  ],
                  'layout'       => '{items}{pager}',
9c253d8a   alex   Поправил переводы
49
                  'emptyText'    => \Yii::t('app', 'No results found'),
298bc0f4   Alexey Boroda   first commit
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
              ]
          ); ?>
        
        
        <!-- *** 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
66
              <h3 class="panel-title"><?=\Yii::t('app', 'Company Blog')?></h3>
298bc0f4   Alexey Boroda   first commit
67
68
69
70
            </div>
            
            <div class="panel-body text-widget">
              <p>
724d0056   Виталий   forms-reduction
71
                  <?=\Yii::t('app', 'blog-txt')?>
298bc0f4   Alexey Boroda   first commit
72
73
74
75
76
77
78
79
80
81
              </p>
            
            </div>
          </div>
      
  <!--          --><?//= BlogSearch::widget(); ?>
            <?php if (!empty($categories)) { ?>
                <div class="panel panel-default sidebar-menu">
  
                    <div class="panel-heading">
724d0056   Виталий   forms-reduction
82
                        <h3 class="panel-title"><?=\Yii::t('app', 'Categories')?></h3>
298bc0f4   Alexey Boroda   first commit
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
                    </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
108
                          <h3 class="panel-title"><?=\Yii::t('app', 'Search by tag')?></h3>
298bc0f4   Alexey Boroda   first commit
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
140
141
                      </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 -->