diff --git a/common/config/main.php b/common/config/main.php index c300a6f..4db74a0 100755 --- a/common/config/main.php +++ b/common/config/main.php @@ -310,6 +310,7 @@ return [ ], 'comment' => [ 'class' => 'common\modules\comment\Module', + '', 'useRbac' => true, 'rbac' => [ 'rules' => [ diff --git a/frontend/views/event/view.php b/frontend/views/event/view.php index b6e8727..955773d 100755 --- a/frontend/views/event/view.php +++ b/frontend/views/event/view.php @@ -21,29 +21,29 @@ $this->params['name'] = $this->title; body?> $this, - 'model' => $model->className(), - 'model_id' => $model->event_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(), - 'guestComment' => true, - 'status' => \common\modules\comment\models\Comment::STATUS_ACTIVE, - ], - 'list_options' => [ - 'view' => 'list-comment-review', - ], - 'form_options' => [ - 'view' => 'form-comment-review', - 'tag' => 'span', - ], - 'options' => [ - 'class' => 'proektant-comments-wr style', - ], - ]); +// echo \common\modules\comment\widgets\CommentWidget::widget([ +// 'context' => $this, +// 'model' => $model->className(), +// 'model_id' => $model->event_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(), +// 'guestComment' => true, +// 'status' => \common\modules\comment\models\Comment::STATUS_ACTIVE, +// ], +// 'list_options' => [ +// 'view' => 'list-comment-review', +// ], +// 'form_options' => [ +// 'view' => 'form-comment-review', +// 'tag' => 'span', +// ], +// 'options' => [ +// 'class' => 'proektant-comments-wr style', +// ], +// ]); ?>
-- libgit2 0.21.4