Blame view

frontend/views/performer/blog-view.php 2.06 KB
97fb6489   Yarik   test
1
  <?php
4ff3ca88   Yarik   test
2
3
4
5
6
      /**
       * @var yii\web\View $this
       * @var Blog         $article
       */
      use common\models\Blog;
97fb6489   Yarik   test
7
  
4ff3ca88   Yarik   test
8
      $this->params[ 'user' ] = $user;
376a557b   Administrator   09.02.16
9
  
4ff3ca88   Yarik   test
10
      $this->title = $article->name;
97fb6489   Yarik   test
11
  ?>
bdee266b   Yarik   test
12
13
  <div class="performer-vacancy-vacant-title-reclam-wr style">
      <div class="blog-post-wr">
376a557b   Administrator   09.02.16
14
          <div class="blog-post-title style"><p><?= $article->name ?></p></div>
bdee266b   Yarik   test
15
16
17
          <div class="blog-post-icons-wr style">
              <div class="blog-post-date">
                  <span></span>
4ff3ca88   Yarik   test
18
                  <p><?= \Yii::$app->formatter->asDate($article->date_add, 'php:d.m.Y') ?></p>
97fb6489   Yarik   test
19
              </div>
bdee266b   Yarik   test
20
21
              <div class="blog-post-views">
                  <span></span>
4ff3ca88   Yarik   test
22
                  <p><?= $article->view_count ?></p>
97fb6489   Yarik   test
23
              </div>
bdee266b   Yarik   test
24
25
              <div class="blog-post-comm-num">
                  <span></span>
4ff3ca88   Yarik   test
26
                  <p><?= count($article->comments) ?></p>
97fb6489   Yarik   test
27
28
              </div>
          </div>
bdee266b   Yarik   test
29
          <div class="blog-post-content style">
376a557b   Administrator   09.02.16
30
              <?= $article->description ?>
bdee266b   Yarik   test
31
          </div>
97fb6489   Yarik   test
32
      </div>
376a557b   Administrator   09.02.16
33
  </div>
4ff3ca88   Yarik   test
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
  <?php
      echo \common\modules\comment\widgets\CommentWidget::widget([
          'context'       => $this,
          'model'         => $article::className(),
          'model_id'      => $article->blog_id,
          'comment_class' => \common\modules\comment\models\Comment::className(),
          'rating_class'  => \common\modules\comment\models\Rating::className(),
          'class_options' => [
              'scenario'     => is_int(\Yii::$app->user->getId()) ? \common\modules\comment\models\Comment::SCENARIO_USER : \common\modules\comment\models\Comment::SCENARIO_GUEST,
              'user_id'      => \Yii::$app->user->getId(),
              'guestComment' => true,
              'status'       => \common\modules\comment\models\Comment::STATUS_ACTIVE,
          ],
          'list_options'  => [
              'view' => 'list-comment',
          ],
          'form_options'  => [
              'view'  => 'form-comment',
              'tag'   => 'div',
              'class' => 'artbox_comment_form',
          ],
          'options'       => [
              'class' => 'new-portf-comments-wr style',
          ],
      ]);
  ?>