diff --git a/backend/config/main.php b/backend/config/main.php index 7477702..216d1c3 100755 --- a/backend/config/main.php +++ b/backend/config/main.php @@ -1,7 +1,6 @@ dirname(__DIR__), 'controllerNamespace' => 'backend\controllers', 'bootstrap' => [ 'log' ], - 'modules' => [ - 'artbox-comment' => [ - 'class' => Module::className(), - ], - ], 'controllerMap' => [ 'profile' => 'artbox\core\controllers\ProfileController', 'page' => 'artbox\core\controllers\PageController', diff --git a/common/config/main.php b/common/config/main.php index bcd8416..025ffa8 100755 --- a/common/config/main.php +++ b/common/config/main.php @@ -1,12 +1,13 @@ dirname(dirname(__DIR__)) . '/vendor', 'modules' => [ - 'imagemanager' => [ + 'imagemanager' => [ 'class' => 'artbox\core\components\imagemanager\Module', 'canUploadImage' => true, 'canRemoveImage' => function () { @@ -17,6 +18,9 @@ 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css', ], ], + 'artbox-comment' => [ + 'class' => Module::className(), + ], ], 'components' => [ 'cache' => [ @@ -24,15 +28,15 @@ ], 'i18n' => [ 'translations' => [ - 'core' => [ + 'core' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@artbox/core/messages', ], - 'app' => [ + 'app' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@common/messages', ], - 'blog' => [ + 'blog' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@artbox/weblog/messages', ], @@ -71,7 +75,7 @@ 'port' => '587', 'encryption' => 'tls', ], - 'viewPath' => '@common/mail' + 'viewPath' => '@common/mail', ], ], ]; diff --git a/frontend/views/blog/article.php b/frontend/views/blog/article.php index 649d5b2..14d6a97 100644 --- a/frontend/views/blog/article.php +++ b/frontend/views/blog/article.php @@ -1,5 +1,6 @@ 'alias' => $model->category->lang->alias, ] ); - } + } ?> | = date( 'd M, Y', $model->created_at @@ -52,100 +53,117 @@ _________________________________________________________ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + $model, + 'display_name' => 'name', + 'reply' => true, + 'delete' => false, + 'more' => [ + 'show_' => true, + 'key' => 2, + ], + 'formView' => '@frontend/views/comment/artbox_comment_form', + 'listView' => '@frontend/views/comment/artbox_comment_list', + 'replyView' => '@frontend/views/comment/artbox_comment_reply', + 'itemView' => '@frontend/views/comment/artbox_comment_item', + ] + ); + ?> diff --git a/frontend/views/comment/artbox_comment_form.php b/frontend/views/comment/artbox_comment_form.php new file mode 100755 index 0000000..46b8132 --- /dev/null +++ b/frontend/views/comment/artbox_comment_form.php @@ -0,0 +1,70 @@ + $formId, + 'action' => Url::to( + [ + 'artbox-comment/default/create', + 'entity' => $comment_model->encryptedEntity, + ] + ), + ] + ); +?> +