Blame view

frontend/views/blog/article.php 2.47 KB
59700e2c   Alexey Boroda   -Need to add comm...
1
2
  <?php
      
518c4e3f   Alexey Boroda   -Article with com...
3
      use artbox\webcomment\widgets\CommentWidget;
59700e2c   Alexey Boroda   -Need to add comm...
4
      use artbox\weblog\models\Article;
b433e560   Alexey Boroda   -Blog ready
5
      use frontend\widgets\BlogSidebar;
59700e2c   Alexey Boroda   -Need to add comm...
6
7
8
9
10
11
12
13
14
15
      use yii\helpers\Html;
      use yii\web\View;
      
      /**
       * @var View    $this
       * @var Article $model
       */
      
      $this->params[ 'breadcrumbs' ][] = [
          'url'   => [ 'blog/index' ],
99b10610   Eugeny Galkovskiy   Блог
16
          'label' => \Yii::t('app', 'Статьи'),
59700e2c   Alexey Boroda   -Need to add comm...
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
      ];
      
      $this->params[ 'breadcrumbs' ][] = $model->lang->title;
  
  ?>
  
  <div id="content">
    <div class="container">
      
      <div class="row">
        
        <!-- *** LEFT COLUMN ***
  _________________________________________________________ -->
        
        <div class="col-md-9" id="blog-post">
          
          
          <p class="text-muted text-uppercase mb-small text-right"><?php
                  if (!empty($model->category)) {
                      echo Html::a(
                          $model->category->lang->title,
                          [
                              'blog/category',
                              'alias' => $model->category->lang->alias,
                          ]
                      );
518c4e3f   Alexey Boroda   -Article with com...
43
                  }
59700e2c   Alexey Boroda   -Need to add comm...
44
45
46
47
              ?> | <?= date(
                  'd M, Y',
                  $model->created_at
              ) ?></p>
59700e2c   Alexey Boroda   -Need to add comm...
48
          
085f5422   Eugeny Galkovskiy   класс lead в текст
49
          <div id="post-content" class="lead">
59700e2c   Alexey Boroda   -Need to add comm...
50
51
52
53
54
              
              <?= $model->lang->body ?>
          
          </div>
          <!-- /#post-content -->
99b10610   Eugeny Galkovskiy   Блог
55
56
          
  
518c4e3f   Alexey Boroda   -Article with com...
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
            
            <?php
                echo CommentWidget::widget(
                    [
                        'model'        => $model,
                        'display_name' => 'name',
                        'reply'        => true,
                        'delete'       => false,
                        'more'         => [
                            'show_' => true,
                            'key'   => 2,
                        ],
                        'formView'     => '@frontend/views/comment/artbox_comment_form',
                        'listView'     => '@frontend/views/comment/artbox_comment_list',
                        'replyView'    => '@frontend/views/comment/artbox_comment_reply',
                        'itemView'     => '@frontend/views/comment/artbox_comment_item',
                    ]
                );
            ?>
59700e2c   Alexey Boroda   -Need to add comm...
76
77
78
79
80
81
        
        </div>
        <!-- /#blog-post -->
        
        <!-- *** LEFT COLUMN END *** -->
          
b433e560   Alexey Boroda   -Blog ready
82
83
84
          <?= BlogSidebar::widget([
              'viewParams' => $this->params,
          ]); ?>
59700e2c   Alexey Boroda   -Need to add comm...
85
86
87
88
89
90
91
92
93
      
      </div>
      <!-- /.row -->
    
    </div>
    <!-- /.container -->
  </div>
  <!-- /#content -->