Blame view

frontend/views/performer/blog-view.php 2.95 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;
55bd0bb9   Yarik   Commit
7
8
9
      use yii\helpers\Html;
      use yii\helpers\Url;
      
4ff3ca88   Yarik   test
10
      $this->params[ 'user' ] = $user;
55bd0bb9   Yarik   Commit
11
      
4ff3ca88   Yarik   test
12
      $this->title = $article->name;
97fb6489   Yarik   test
13
  ?>
bdee266b   Yarik   test
14
15
  <div class="performer-vacancy-vacant-title-reclam-wr style">
      <div class="blog-post-wr">
376a557b   Administrator   09.02.16
16
          <div class="blog-post-title style"><p><?= $article->name ?></p></div>
bdee266b   Yarik   test
17
18
19
          <div class="blog-post-icons-wr style">
              <div class="blog-post-date">
                  <span></span>
4ff3ca88   Yarik   test
20
                  <p><?= \Yii::$app->formatter->asDate($article->date_add, 'php:d.m.Y') ?></p>
97fb6489   Yarik   test
21
              </div>
bdee266b   Yarik   test
22
23
              <div class="blog-post-views">
                  <span></span>
4ff3ca88   Yarik   test
24
                  <p><?= $article->view_count ?></p>
97fb6489   Yarik   test
25
              </div>
bdee266b   Yarik   test
26
27
              <div class="blog-post-comm-num">
                  <span></span>
4ff3ca88   Yarik   test
28
                  <p><?= count($article->comments) ?></p>
97fb6489   Yarik   test
29
30
              </div>
          </div>
bdee266b   Yarik   test
31
          <div class="blog-post-content style">
376a557b   Administrator   09.02.16
32
              <?= $article->description ?>
bdee266b   Yarik   test
33
          </div>
55bd0bb9   Yarik   Commit
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
          <div class="share-buttons-new">
              <p class="share-buttons-new-title">Поделиться</p>
              <p class="share-buttons-new-link">
                  <?php
                      echo Html::a(Html::img('/images/ico-vk.png'), 'http://vk.com/share.php?url=' . Url::current([], true), [
                          'target' => '_blank',
                      ]);
                      echo Html::a(Html::img('/images/ico-fb.png'), 'http://www.facebook.com/sharer/sharer.php?u=' . Url::current([], true), [
                          'target' => '_blank',
                      ]);
                      echo Html::a(Html::img('/images/ico-google.png'), 'https://plus.google.com/share?url=' . Url::current([], true), [
                          'target' => '_blank',
                      ]);
                  ?>
              </p>
          </div>
97fb6489   Yarik   test
50
      </div>
376a557b   Administrator   09.02.16
51
  </div>
4ff3ca88   Yarik   test
52
53
54
55
56
57
58
59
60
61
  <?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(),
0e19c7f0   Yarik   Remove guest comment
62
              'guestComment' => false,
4ff3ca88   Yarik   test
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
              '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',
          ],
      ]);
  ?>