Blame view

frontend/views/articles/show.php 2.23 KB
4253cbec   root   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
29
30
31
32
33
34
35
36
37
38
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
  <?php
      use common\modules\comment\widgets\CommentWidget;
      use yii\helpers\Html;
  use yii\widgets\Breadcrumbs;
  ?>
  <?php
  
  $this->title = $news->meta_title;
  $this->params['seo']['title'] = !empty($this->title) ?$this->title :$news->title;
  $this->registerMetaTag(['name' => 'description', 'content' => $news->meta_description]);
  ?>
  
              <nav class="bread-crumbs">
              <?= Breadcrumbs::widget([
                  'links' => [
                              ['label'=>'Блог','url'=>['/blog']],
                              $news->title
                              ],
              ]) ?>
                              <div class="both"></div>
              </nav>
  
  <div class="layout">
      
      <div class="content">
  	<h1 class="article_title"><?=$news->title?></h1>
          <div class="artbox_comment_description article_comment_description">
              <?php
                  if(!empty( $news->averageRating ) && $news->averageRating->value) {
                      ?>
                      <div class="rateit" data-rateit-value="<?php echo $news->averageRating->value; ?>" data-rateit-readonly="true" data-rateit-ispreset="true"></div>
                      <?php
                  }
              ?>
              <p><a href="#artbox-comment">
                      <?php
                          $comment_count = count($news->comments);
                          if($comment_count) {
                              echo "Отзывов: " . $comment_count;
                          } else {
                              echo "Оставть отзыв";
                          }
                      ?>
                  </a></p>
          </div>
          <?= Html::img(\common\components\artboximage\ArtboxImageHelper::getImageSrc($news->imageUrl, 'product'), ['class'=>'blog-show-img float-left'])?>
              <?=$news->body?>
              <p class='date'><?=$news->date?></p>
      </div>
      
      <div class="comment-wrapper" style="padding-bottom:25px">
          <div class='comments-border'></div>
          <?php
              echo CommentWidget::widget([
                  'model' => $news,
                  'layout' => "{form} {reply_form} {list}"
              ]);
          ?>
          <div class="both"></div>
      </div>
      <div class="both"></div>
                                          
  </div>