public function actionCountModerate() { Yii::$app->response->format = Response::FORMAT_JSON; return Comments::countModerateComments(); }
<?php use yii\helpers\Html; use yii\grid\GridView; use common\modules\users\models\User; use rangeweb\comments\models\Comments; use yii\bootstrap\Modal; use yii\widgets\Pjax; /* @var $this yii\web\View */ /* @var $searchModel backend\modules\users\models\search\UserSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ Comments::countModerateComments(); $this->title = 'Отзывы'; $this->params['breadcrumbs'][] = $this->title; ?> <div class="comments-index"> <?php Modal::begin(['header' => '<h2></h2>', 'id' => 'modal-new-item']); ?> <div id="modal-content"></div> <?php Modal::end(); ?> <p> <?php echo Html::a('Добавить отзыв', ['create'], ['data-original-title' => 'Новый отзыв', 'data-header' => 'Новый отзыв', 'class' => 'btn btn-success btn-xs btn-open-modal']); ?> </p>