Blame view

views/artbox_comment_list.php 1.03 KB
a2cde075   Yarik   first commit
1
  <?php
faff2c48   Yarik   Artbox comment cr...
2
      use artbox\webcomment\models\CommentModel;
a2cde075   Yarik   first commit
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
      use yii\base\Model;
      use yii\data\ActiveDataProvider;
      use yii\helpers\Html;
      use yii\web\View;
      use yii\widgets\ListView;
      use yii\widgets\Pjax;
      
      /**
       * @var CommentModel       $comment_model
       * @var array              $list_params
       * @var array              $item_options
       * @var string             $item_view
       * @var Model              $model
       * @var ActiveDataProvider $comments
       * @var View               $this
b5639b59   Anastasia   comment widget
18
       * @var srring             $display_name
a2cde075   Yarik   first commit
19
20
21
22
23
24
25
26
27
       */
      Pjax::begin();
      if(( $success = \Yii::$app->session->getFlash('artbox_comment_success') ) != NULL) {
          echo Html::tag('p', $success);
      }
      echo ListView::widget([
          'dataProvider' => $comments,
          'itemOptions'  => $item_options,
          'itemView'     => $item_view,
6385e72b   Anastasia   bug fix
28
          'emptyText'    => false,
a2cde075   Yarik   first commit
29
          'summary'      => '',
b5639b59   Anastasia   comment widget
30
31
32
33
          'viewParams'   => [
              'display_name'  => $display_name
          ]
          
a2cde075   Yarik   first commit
34
35
36
      ]);
      Pjax::end();