Blame view

frontend/views/company/review.php 1.51 KB
fbdb1f1c   Yarik   test
1
  <?php
83b0052c   Yarik   test
2
3
4
5
      /**
       * @var View $this
       * @var User $company
       */
fbdb1f1c   Yarik   test
6
  
83b0052c   Yarik   test
7
8
      use common\models\User;
      use yii\web\View;
fbdb1f1c   Yarik   test
9
  
83b0052c   Yarik   test
10
11
      $this->params[ 'company' ] = $company;
      $this->title = 'My Yii Application';
fbdb1f1c   Yarik   test
12
13
  ?>
  <div class="performer-vacancy-vacant-title-reclam-wr style">
83b0052c   Yarik   test
14
15
16
17
18
19
20
      <?php
          echo \common\modules\comment\widgets\CommentWidget::widget([
              'context'       => $this,
              'model'         => $company->className(),
              'model_id'      => $company->id,
              'comment_class' => \common\modules\comment\models\Comment::className(),
              'rating_class'  => \common\modules\comment\models\Rating::className(),
0eb4e7fc   Yarik   test
21
              'template' => ($company->id == \Yii::$app->user->id)?"{success}\n{list}":"{success}\n{form}\n{list}",
83b0052c   Yarik   test
22
23
24
25
26
27
28
29
30
31
32
              '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' => false,
                  'status'       => \common\modules\comment\models\Comment::STATUS_ACTIVE,
              ],
              'list_options'  => [
                  'view' => 'list-comment-review',
              ],
              'form_options'  => [
                  'view' => 'form-comment-review',
c20fd11a   Yarik   test
33
                  'tag'  => 'span',
83b0052c   Yarik   test
34
35
36
37
38
39
              ],
              'options'       => [
                  'class' => 'proektant-comments-wr style',
              ],
          ]);
      ?>
fbdb1f1c   Yarik   test
40
  </div>