list-comment-question.php
931 Bytes
<?php
/**
* @var \yii\data\DataProviderInterface $dataProvider
* @var Comment $commentClass
*/
use common\modules\comment\models\Comment;
use common\modules\comment\widgets\CommentWidget;
if(!empty( $dataProvider )) {
?>
<div class="tender-offer-proj-title-all">Вопросов: (<?= $dataProvider->totalCount ?>)</div>
<?php
}
echo \yii\widgets\ListView::widget([
'dataProvider' => $dataProvider,
'itemView' => '_question_comment_view',
'options' => [
'tag' => 'ul',
'class' => 'proektant-comments style',
],
'itemOptions' => [
'tag' => 'li',
'class' => CommentWidget::$baseClass[ 'comment_container' ],
'data' => [
'form' => $commentClass->formName(),
],
],
'layout' => "{items}\n{pager}",
]);