Blame view

frontend/views/articles/show.php 2.23 KB
7ba4acc5   Administrator   after marge
1
  <?php
fe7f596f   Yarik   Added comments to...
2
3
      use common\modules\comment\widgets\CommentWidget;
      use yii\helpers\Html;
550eac02   Administrator   second
4
  use yii\widgets\Breadcrumbs;
550eac02   Administrator   second
5
  ?>
7ba4acc5   Administrator   after marge
6
  <?php
51464eb6   Eugeny Galkovskiy   123
7
  
550eac02   Administrator   second
8
  $this->title = $news->meta_title;
a59e31bb   Administrator   20.07.16
9
  $this->params['seo']['title'] = !empty($this->title) ?$this->title :$news->title;
550eac02   Administrator   second
10
  $this->registerMetaTag(['name' => 'description', 'content' => $news->meta_description]);
550eac02   Administrator   second
11
12
13
14
15
  ?>
  
              <nav class="bread-crumbs">
              <?= Breadcrumbs::widget([
                  'links' => [
ac8ab861   Administrator   20.07.16
16
                              ['label'=>'Блог','url'=>['/blog']],
550eac02   Administrator   second
17
18
19
20
21
22
23
24
25
                              $news->title
                              ],
              ]) ?>
                              <div class="both"></div>
              </nav>
  
  <div class="layout">
      
      <div class="content">
fe7f596f   Yarik   Added comments to...
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  	<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>
e2aaf166   Administrator   01.06.16
46
          <?= Html::img(\common\components\artboximage\ArtboxImageHelper::getImageSrc($news->imageUrl, 'product'), ['class'=>'blog-show-img float-left'])?>
550eac02   Administrator   second
47
48
              <?=$news->body?>
              <p class='date'><?=$news->date?></p>
fe7f596f   Yarik   Added comments to...
49
50
51
      </div>
      
      <div class="comment-wrapper" style="padding-bottom:25px">
2211268d   Yarik   Added comments to...
52
          <div class='comments-border'></div>
fe7f596f   Yarik   Added comments to...
53
54
55
          <?php
              echo CommentWidget::widget([
                  'model' => $news,
2211268d   Yarik   Added comments to...
56
                  'layout' => "{form} {reply_form} {list}"
fe7f596f   Yarik   Added comments to...
57
58
59
60
61
              ]);
          ?>
          <div class="both"></div>
      </div>
      <div class="both"></div>
550eac02   Administrator   second
62
                                          
3f2bc3d0   Administrator   first commit
63
  </div>