├── .gitignore ├── LICENSE ├── README.md ├── composer.json ├── composer.lock ├── docs └── images │ └── demo.png └── src ├── Bootstrap.php ├── Module.php ├── assets ├── CommentsAsset.php └── sources │ ├── css │ ├── .sass-cache │ │ ├── 01b38ca61b2ce1f04e332f1556247ae0ec54bd88 │ │ │ └── comments.scssc │ │ ├── 08f6489c5278f07a6f4dab9f564c3670647d28e8 │ │ │ └── comments.scssc │ │ ├── 0a0f0ce7459a06eed73cc7bc1cd205ad874e5249 │ │ │ └── comments.scssc │ │ ├── 0ab20a8e487dddf79db790dbe2c8b53586aaa52b │ │ │ └── comments.scssc │ │ ├── 0ccdca33e9c2c710f890c794f73e99c85eea5ab8 │ │ │ └── comments.scssc │ │ ├── 0f54900ef4ad259468079579bdd4f314b8bf5df3 │ │ │ └── comments.scssc │ │ ├── 0fe6ae6205f0a0804ba40885ba0e4e94e1e37c5f │ │ │ └── comments.scssc │ │ ├── 123115390c4abcb738e1232b7a89c92ec531ed3d │ │ │ └── comments.scssc │ │ ├── 19579a5e4a7fd791545a2ca7e1e859f589dbe7c8 │ │ │ └── comments.scssc │ │ ├── 1e84e993c363c6a6dfecc8b898613d91b5378ecf │ │ │ └── comments.scssc │ │ ├── 237b71189bef3d78b0f077961ed355704a490dd8 │ │ │ └── comments.scssc │ │ ├── 28791a72abdfcbd9a1ae0afe27bad56ba4bcccc8 │ │ │ └── comments.scssc │ │ ├── 288249e5b14acdfc115f382051a86e96d9c8889e │ │ │ └── comments.scssc │ │ ├── 2a6995ca4e90b746c63e669129adb4c6f103acc0 │ │ │ └── comments.scssc │ │ ├── 2c7571013704b641186d635b1eb830d33689df52 │ │ │ └── comments.scssc │ │ ├── 2d0ee70f3e9823d3b60a3532937217ef89c341b4 │ │ │ └── comments.scssc │ │ ├── 32e9a468a564aa5d34760b37d34e95860ea50f8c │ │ │ └── comments.scssc │ │ ├── 338a8b6b9371083ad5fc1a013d41bcb363eb8ee4 │ │ │ └── comments.scssc │ │ ├── 35bb7f425e82ac381489c4e63f115402ba714ec6 │ │ │ └── comments.scssc │ │ ├── 36265928d7718175eb744dcac2c158fff31c6ee5 │ │ │ └── comments.scssc │ │ ├── 38a14c78f2f1f567970acb99b94a6be1220c126e │ │ │ └── comments.scssc │ │ ├── 38ff7cd279307df0ecfbdfe4c9343e97ae43582e │ │ │ └── comments.scssc │ │ ├── 3ac295a753112f2079a30d476203dc3b8f6a2e9b │ │ │ └── comments.scssc │ │ ├── 3cbdf272c81d933ce4a7dae1bdb2f595958df713 │ │ │ └── comments.scssc │ │ ├── 3f0fdfb1c95eff268362a0632f185c1be6c15ed6 │ │ │ └── comments.scssc │ │ ├── 43efd79dc80191173abc7fcae7f67b54c7019bd2 │ │ │ └── comments.scssc │ │ ├── 459a4f18d2add9820e45184fbb1b7b80be47b2f2 │ │ │ └── comments.scssc │ │ ├── 46c43ba0fba47fb357341ea4425cb116aeea3c32 │ │ │ └── comments.scssc │ │ ├── 4e123fe4260892f7c5b8f09637a5ceeb78037e44 │ │ │ └── comments.scssc │ │ ├── 4f09ce5174b6ae09382020804461621b6a7a632c │ │ │ └── comments.scssc │ │ ├── 51d0e860dadd78c19d43c346905d5583785320ec │ │ │ └── comments.scssc │ │ ├── 567558b11c15791d1a4e1f4d187e936060f07a57 │ │ │ └── comments.scssc │ │ ├── 57f15dcc98038ad2e6d17ea6a115f1bd3cd2578c │ │ │ └── comments.scssc │ │ ├── 581a8ae85d00c4c247f40e87caa4dd9d4d978b65 │ │ │ └── comments.scssc │ │ ├── 5bcf22266714be0701c78ad6de092eb39662e690 │ │ │ └── comments.scssc │ │ ├── 5cd45dd45ee2040622e98af4a93de865c60a8f47 │ │ │ └── comments.scssc │ │ ├── 5d32e1337c270c3cc2335ef14e1ac9f6d5220c7e │ │ │ └── comments.scssc │ │ ├── 5ed85aca7b4d149d07fa5d2201f311844a41537d │ │ │ └── comments.scssc │ │ ├── 600592b9087bb13ea49ec757c9c9e945bfe1da92 │ │ │ └── comments.scssc │ │ ├── 60c1e3859e48aab557b328f51c7222e216f279e5 │ │ │ └── comments.scssc │ │ ├── 61e004b8514e07bed276b14bb91f5e34927def91 │ │ │ └── comments.scssc │ │ ├── 65c4b83e3551520e611a91a2ec65d493165eed6d │ │ │ └── comments.scssc │ │ ├── 693b804810604b96a1ea485dd535b6c5d978848c │ │ │ └── comments.scssc │ │ ├── 693f98000aa4c9ad654c2a805b7e7694f7fd57cd │ │ │ └── comments.scssc │ │ ├── 6adc53101802a196d32c1e650e9e3da5d1295527 │ │ │ └── comments.scssc │ │ ├── 6b390324967f1052d75183e5ae9567bc4d5bd4f0 │ │ │ └── comments.scssc │ │ ├── 703444dd069bc1d4f9cf18f29181f3bebc545742 │ │ │ └── comments.scssc │ │ ├── 722cdf999622a19b63429733c4c6210ff4182539 │ │ │ └── comments.scssc │ │ ├── 74784356183bacbb5de16911a7efb75a30bb1726 │ │ │ └── comments.scssc │ │ ├── 7a9a049a5bb84f3396530b61d6f28c391f06174d │ │ │ └── comments.scssc │ │ ├── 7ce4ba247949e3561072bbe1a4c75bc4cd9a8915 │ │ │ └── comments.scssc │ │ ├── 7dc921543697e289dbc4e8d584fcfa3c22177961 │ │ │ └── comments.scssc │ │ ├── 7e6cce4a397877267a813d2505dc574e0a5b02cf │ │ │ └── comments.scssc │ │ ├── 7e751623ccd2b37e2eb023ea708d359181aefdb2 │ │ │ └── comments.scssc │ │ ├── 7ffb3bd85182ad6deb445d36edeeb1b001246f2d │ │ │ └── comments.scssc │ │ ├── 8023150309cf00959e84eea5eff23a7a8f3f932a │ │ │ └── comments.scssc │ │ ├── 81cbe7651e53633860c0cce3498212f91edd549a │ │ │ └── comments.scssc │ │ ├── 826851b47c6707895a7cf2e98e96a38bd872c1ec │ │ │ └── comments.scssc │ │ ├── 83e85d9f981a4aaa59d64d007886a13acfdba6f2 │ │ │ └── comments.scssc │ │ ├── 870c1b1ef7dfd8693c5d9618a6a4b36d55a3099e │ │ │ └── comments.scssc │ │ ├── 87668e3f0bb6f00af0dcbc13f7ce0aac867e2ce5 │ │ │ └── comments.scssc │ │ ├── 877b496863bef362a27824bee6b50fe487b76e70 │ │ │ └── comments.scssc │ │ ├── 8b3df106dc1f7afe79ffc8a887c3191c75fd0ecf │ │ │ └── comments.scssc │ │ ├── 8d77a43d26911b17c207abd89c06ebd2a877c49c │ │ │ └── comments.scssc │ │ ├── 901082bacfe9d82ad27e2bb221b4c76d1bf0e7de │ │ │ └── comments.scssc │ │ ├── 91521a3a9e6ba5b5438a6f8378b59ee917056539 │ │ │ └── comments.scssc │ │ ├── 961850881bb8899ddd501095da34db841ee731f3 │ │ │ └── comments.scssc │ │ ├── 98c57862baaf13da18d00eccfdb9a555d2606f3c │ │ │ └── comments.scssc │ │ ├── 99ade1024084d077109b7008b9a0f4e93febb050 │ │ │ └── comments.scssc │ │ ├── 9a98371cffbc1c66d4d4ac31fa4ed1f13440a347 │ │ │ └── comments.scssc │ │ ├── a0cf3856d431313bc82b9c156e4623354304ca39 │ │ │ └── comments.scssc │ │ ├── a3962fcec45a67460cab1c829fc7f8748ed03a28 │ │ │ └── comments.scssc │ │ ├── a3b161a3ee5d503be2fd2dd27ac07bdb3157b779 │ │ │ └── comments.scssc │ │ ├── a5bb4b655122c88c6c261690f3805fe658ab32eb │ │ │ └── comments.scssc │ │ ├── a9308b6d599deb0fe54693f042ede78aa7a2bf2f │ │ │ └── comments.scssc │ │ ├── a9c3d9b6612981cd66864348f113645389fdd418 │ │ │ └── comments.scssc │ │ ├── acb2c17365b9d2a1728da11c7b0fa35964a51d40 │ │ │ └── comments.scssc │ │ ├── ae8ccd35c85e8699440cb9aa462811b115a7aedb │ │ │ └── comments.scssc │ │ ├── ae8ed23762a63907bbbe1ab5134f0bec7fcf09f3 │ │ │ └── comments.scssc │ │ ├── ae962263a370b80aac41249c92e7a4981ac20f80 │ │ │ └── comments.scssc │ │ ├── aea2dc520456af1f889e8c8afbc7b782187e86bc │ │ │ └── comments.scssc │ │ ├── b274aaf060ee9350d9dec60b9da4fd00b74e2191 │ │ │ └── comments.scssc │ │ ├── b3b7181dbefd5d8ec1be92c402dbcd300ccf0152 │ │ │ └── comments.scssc │ │ ├── b3d4c684cd100e2b9c4ed5bfbc187c48679070f7 │ │ │ └── comments.scssc │ │ ├── b5e5c36bdc8e499b779dea4dca440ef101b04c8c │ │ │ └── comments.scssc │ │ ├── b5f14f58673311a6fceafd7d1787f1222bfd92b0 │ │ │ └── comments.scssc │ │ ├── b70904e7f97f2833bf9546f7bfa83a51bc7eb342 │ │ │ └── comments.scssc │ │ ├── baab3f961d0c9deccebcb79ea260958a72d10ea7 │ │ │ └── comments.scssc │ │ ├── bc7df72fda2c586482097e6d882253bf156363ee │ │ │ └── comments.scssc │ │ ├── bd82482620478ef8498d33b6e4b4b4bb3fc8e1b7 │ │ │ └── comments.scssc │ │ ├── bfdf518eef5a34ef857c9b3a9397d599bee6bdd9 │ │ │ └── comments.scssc │ │ ├── c0019aaedf0b0b43d7d74ce1b667f0857c358046 │ │ │ └── comments.scssc │ │ ├── c0226f9afe2379efbf070700cc1cf039015b160d │ │ │ └── comments.scssc │ │ ├── c206fae32c16c586c62d9126ebbc0ff23bd723d7 │ │ │ └── comments.scssc │ │ ├── c2f82255ae30ec32332084e80b25bd92671b411a │ │ │ └── comments.scssc │ │ ├── ceabad84b3f366b76b01cd61736d354efff71c76 │ │ │ └── comments.scssc │ │ ├── ceb4ee22a53b066198282c1a7d2972e696fa931a │ │ │ └── comments.scssc │ │ ├── d058e0b91c5fc2ce2c3c58498659b040ad92140d │ │ │ └── comments.scssc │ │ ├── d2ef75a50d421ef87b8db580f1988b30eeec8a62 │ │ │ └── comments.scssc │ │ ├── d3f0e16a5e502ad4c972c24547e2a1fc353d9068 │ │ │ └── comments.scssc │ │ ├── d3f655fbd6e3d77f4c5c21df22f6e3487f215127 │ │ │ └── comments.scssc │ │ ├── d9450c1167e7bf7f29e1406c53f0513f38e643c0 │ │ │ └── comments.scssc │ │ ├── db394dab0a7ddce97172e097b5252ae2bdf83ed5 │ │ │ └── comments.scssc │ │ ├── db63c7e2edee927ca8da75812f031fd695f7a7e8 │ │ │ └── comments.scssc │ │ ├── dba5c3d59b258f35f223d297f7b6ff63d30142c1 │ │ │ └── comments.scssc │ │ ├── dceb357b330e88d29ffe3892a3ee260d097da499 │ │ │ └── comments.scssc │ │ ├── dd3e044dfda9091843d49aa54aae85b7712190a6 │ │ │ └── comments.scssc │ │ ├── e0f7fbf27c9b883e8a194c300141ea0b42eff991 │ │ │ └── comments.scssc │ │ ├── e6504ec5ffcb8bd44760a1a8496a7d4c918a5e27 │ │ │ └── comments.scssc │ │ ├── e6be7bb24feb078257a2775dcbde0c8da9c045d2 │ │ │ └── comments.scssc │ │ ├── e80483b8881fab6509c8108b089fa6ffb3ea6c50 │ │ │ └── comments.scssc │ │ ├── e9b8171191659de9ceff12247d3518310099cc4a │ │ │ └── comments.scssc │ │ ├── e9cff9ab8fa41776dce9c6d609ea933e34b6f7e2 │ │ │ └── comments.scssc │ │ ├── ea2d0d82777628891b37f01afd8285d3260def46 │ │ │ └── comments.scssc │ │ ├── edef01599246b3c43d55674ac08b32f0894187bc │ │ │ └── comments.scssc │ │ ├── f0247306cb4b50d346f437706aad5fc9cfeabd6b │ │ │ └── comments.scssc │ │ ├── f0ab1c337bb5b6e46835a07ce34b049d05cc7570 │ │ │ └── comments.scssc │ │ ├── f2a28615e5783337724694785825317a8403d366 │ │ │ └── comments.scssc │ │ ├── f5d1d87f9084e82192ca4c2dc128476beb22a97e │ │ │ └── comments.scssc │ │ ├── f611b57f6a72d58154205d4b89cd1f96df4e552d │ │ │ └── comments.scssc │ │ ├── f7670b52f51c83440333014678109e158fd3e9b7 │ │ │ └── comments.scssc │ │ ├── f7a150c7f1678f6b8a4d512753a1f723565b836e │ │ │ └── comments.scssc │ │ ├── fbdfdfaac8ea0bdd1f5f6393100dab9d40c95d83 │ │ │ └── comments.scssc │ │ └── fc5aabc5624dc5e7a56385108e2a72bd1249775e │ │ │ └── comments.scssc │ ├── comments.css │ ├── comments.css.map │ └── comments.scss │ ├── images │ └── default-user-avatar.png │ └── js │ └── comments.js ├── controllers ├── DefaultController.php └── ManageController.php ├── helpers └── CommentsHelper.php ├── messages ├── ro │ └── comments.php └── ru │ └── comments.php ├── migrations ├── m161126_113528_comments.php └── m170222_120908_comments_rating.php ├── models ├── Comments.php ├── CommentsQuery.php ├── CommentsRating.php ├── CommentsRatingQuery.php └── CommentsSearch.php ├── views └── manage │ ├── index.php │ ├── update.php │ └── view.php └── widget ├── Comments.php └── views ├── _comment.php ├── _form.php └── comments.php /.gitignore: -------------------------------------------------------------------------------- 1 | # phpstorm project files 2 | .idea 3 | 4 | # netbeans project files 5 | nbproject 6 | 7 | # zend studio for eclipse project files 8 | .buildpath 9 | .project 10 | .settings 11 | 12 | # windows thumbnail cache 13 | Thumbs.db 14 | 15 | # composer vendor dir 16 | /vendor 17 | 18 | # composer itself is not needed 19 | /composer.phar 20 | 21 | # Mac DS_Store Files 22 | .DS_Store 23 | 24 | # phpunit itself is not needed 25 | phpunit.phar 26 | # local phpunit config 27 | /phpunit.xml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Oleg Gheorghita 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # yii2-comments [](LICENSE) [](https://scrutinizer-ci.com/g/ogheo/yii2-comments/) 2 | 3 | Comments module for Yii2. 4 | 5 | ## Installation 6 | 7 | The preferred way to install this extension is through [composer](http://getcomposer.org/download/). 8 | 9 | try 10 | 11 | ``` 12 | composer require "ogheo/yii2-comments:*" 13 | ``` 14 | 15 | or add 16 | 17 | ``` 18 | "ogheo/yii2-comments": "*" 19 | ``` 20 | 21 | to the require section of your `composer.json` file. 22 | 23 | ## Configuration 24 | 25 | ### Database migrations 26 | 27 | ``` 28 | php yii migrate/up --migrationPath=@vendor/ogheo/yii2-comments/src/migrations 29 | ``` 30 | 31 | ### Module setup 32 | 33 | ``` 34 | 'modules' => [ 35 | 'comments' => [ 36 | 'class' => 'ogheo\comments\Module', 37 | ] 38 | ] 39 | ``` 40 | 41 | All available options can be viewed in Comments module file. 42 | 43 | ## Usage 44 | 45 | Add one of the following examples to the view file. 46 | 47 | ### Basic example 48 | 49 | Model is not mandatory, comments will be associated to the current url. 50 | 51 | ``` 52 | use ogheo\comments\widget\Comments; 53 | 54 | echo Comments::widget(); 55 | ``` 56 | 57 | ### Advanced example 58 | 59 | To change default settings, you can do as follows: 60 | 61 | ``` 62 | use ogheo\comments\widget\Comments; 63 | 64 | echo Comments::widget([ 65 | 'model' => $model, 66 | 'model_key' => $model_key, 67 | ]); 68 | ``` 69 | 70 | All available options can be viewed in Comments widget file. 71 | 72 | Enjoy ;) 73 | 74 | ## Demo pictures 75 | 76 |  77 | 78 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ogheo/yii2-comments", 3 | "description": "Comments module for Yii2", 4 | "keywords": [ 5 | "yii2", 6 | "yii2-comments", 7 | "yii2-comments-module", 8 | "yii2-comments-manager" 9 | ], 10 | "type": "yii2-extension", 11 | "license": "MIT", 12 | "homepage": "https://github.com/ogheo/yii2-comments", 13 | "authors": [ 14 | { 15 | "name": "Oleg Gheorghita", 16 | "email": "oleg.gheo@gmail.com" 17 | } 18 | ], 19 | "require": { 20 | "yiisoft/yii2": "*", 21 | "yiisoft/yii2-bootstrap": "*" 22 | }, 23 | "autoload": { 24 | "psr-4": { 25 | "ogheo\\comments\\": "src" 26 | } 27 | }, 28 | "extra": { 29 | "bootstrap": "ogheo\\comments\\Bootstrap" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /docs/images/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/docs/images/demo.png -------------------------------------------------------------------------------- /src/Bootstrap.php: -------------------------------------------------------------------------------- 1 | 'comments', 22 | 'rules' => [ 23 | 'rate' => 'default/rate', 24 | 'create' => 'default/create', 25 | 'validate' => 'default/validate', 26 | 'manage/view' => 'manage/view', 27 | 'manage/index' => 'manage/index', 28 | 'manage/update' => 'manage/update', 29 | 'manage/delete' => 'manage/delete', 30 | ], 31 | ]; 32 | 33 | /** 34 | * @inheritdoc 35 | * @param Application $app 36 | */ 37 | public function bootstrap($app) 38 | { 39 | if ($app instanceof Application) { 40 | // register module routes 41 | $app->getUrlManager()->addRules([new GroupUrlRule($this->urlRules)]); 42 | // register module translations 43 | if (!isset($app->get('i18n')->translations['comments*'])) { 44 | $app->get('i18n')->translations['comments*'] = [ 45 | 'class' => PhpMessageSource::className(), 46 | 'basePath' => __DIR__ . '/messages', 47 | 'sourceLanguage' => 'en' 48 | ]; 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Module.php: -------------------------------------------------------------------------------- 1 | userModel === null) { 96 | $this->userModel = Yii::$app->getUser()->identityClass; 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/assets/CommentsAsset.php: -------------------------------------------------------------------------------- 1 | ;o;;i;i;@;@;0o; ;o;;i;i;@?;@;@;,@'o;;[I" .nospace; T; 12 | o;;[o; ;[o;;[o;;I"nospace; T;i 13 | ;0;0;o;;{ ;o; ;o;;i;i;o;;i;i;0;0;i 14 | ;0;i 15 | ;i 16 | ;0;o; ;o;;i 17 | ;i;o;;i 18 | ;i;@;@;$i ;[o;%;[I"font-size; T;&o;';&o;( ;&I"0; T;);*;+0;,@';i;o; ;o;;i;i;o;;i;i;@;@;$i ;-;.;[ ;i;o; ;o;;i;i 19 | ;o;;i;i;@;@;/o; ;@c;o;;i;i;@;@;0o; ;o;;i;i;@d;@;@;,@';i 20 | ;o; ;@U;o;;i 21 | ;i;@;@:@has_childrenT;,@';i;o; ;@;o;;i;i;@;@;1T;,@':@templateI"c.comments { 22 | margin-bottom: 15px; 23 | overflow: hidden; 24 | 25 | .nospace { 26 | font-size: 0; 27 | } 28 | 29 | 30 | }; T;i;o; ;o;;i;i;o;;i;i;@;@;1T;,@' -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/4f09ce5174b6ae09382020804461621b6a7a632c/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/4f09ce5174b6ae09382020804461621b6a7a632c/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/51d0e860dadd78c19d43c346905d5583785320ec/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/51d0e860dadd78c19d43c346905d5583785320ec/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/567558b11c15791d1a4e1f4d187e936060f07a57/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/567558b11c15791d1a4e1f4d187e936060f07a57/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/57f15dcc98038ad2e6d17ea6a115f1bd3cd2578c/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/57f15dcc98038ad2e6d17ea6a115f1bd3cd2578c/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/581a8ae85d00c4c247f40e87caa4dd9d4d978b65/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/581a8ae85d00c4c247f40e87caa4dd9d4d978b65/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/5bcf22266714be0701c78ad6de092eb39662e690/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/5bcf22266714be0701c78ad6de092eb39662e690/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/5cd45dd45ee2040622e98af4a93de865c60a8f47/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/5cd45dd45ee2040622e98af4a93de865c60a8f47/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/5d32e1337c270c3cc2335ef14e1ac9f6d5220c7e/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/5d32e1337c270c3cc2335ef14e1ac9f6d5220c7e/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/5ed85aca7b4d149d07fa5d2201f311844a41537d/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/5ed85aca7b4d149d07fa5d2201f311844a41537d/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/600592b9087bb13ea49ec757c9c9e945bfe1da92/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/600592b9087bb13ea49ec757c9c9e945bfe1da92/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/60c1e3859e48aab557b328f51c7222e216f279e5/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/60c1e3859e48aab557b328f51c7222e216f279e5/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/61e004b8514e07bed276b14bb91f5e34927def91/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/61e004b8514e07bed276b14bb91f5e34927def91/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/65c4b83e3551520e611a91a2ec65d493165eed6d/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/65c4b83e3551520e611a91a2ec65d493165eed6d/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/693b804810604b96a1ea485dd535b6c5d978848c/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/693b804810604b96a1ea485dd535b6c5d978848c/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/693f98000aa4c9ad654c2a805b7e7694f7fd57cd/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/693f98000aa4c9ad654c2a805b7e7694f7fd57cd/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/6adc53101802a196d32c1e650e9e3da5d1295527/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/6adc53101802a196d32c1e650e9e3da5d1295527/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/6b390324967f1052d75183e5ae9567bc4d5bd4f0/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/6b390324967f1052d75183e5ae9567bc4d5bd4f0/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/703444dd069bc1d4f9cf18f29181f3bebc545742/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/703444dd069bc1d4f9cf18f29181f3bebc545742/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/722cdf999622a19b63429733c4c6210ff4182539/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/722cdf999622a19b63429733c4c6210ff4182539/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/74784356183bacbb5de16911a7efb75a30bb1726/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/74784356183bacbb5de16911a7efb75a30bb1726/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/7a9a049a5bb84f3396530b61d6f28c391f06174d/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/7a9a049a5bb84f3396530b61d6f28c391f06174d/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/7ce4ba247949e3561072bbe1a4c75bc4cd9a8915/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/7ce4ba247949e3561072bbe1a4c75bc4cd9a8915/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/7dc921543697e289dbc4e8d584fcfa3c22177961/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/7dc921543697e289dbc4e8d584fcfa3c22177961/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/7e6cce4a397877267a813d2505dc574e0a5b02cf/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/7e6cce4a397877267a813d2505dc574e0a5b02cf/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/7e751623ccd2b37e2eb023ea708d359181aefdb2/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/7e751623ccd2b37e2eb023ea708d359181aefdb2/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/7ffb3bd85182ad6deb445d36edeeb1b001246f2d/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/7ffb3bd85182ad6deb445d36edeeb1b001246f2d/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/8023150309cf00959e84eea5eff23a7a8f3f932a/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/8023150309cf00959e84eea5eff23a7a8f3f932a/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/81cbe7651e53633860c0cce3498212f91edd549a/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/81cbe7651e53633860c0cce3498212f91edd549a/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/826851b47c6707895a7cf2e98e96a38bd872c1ec/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/826851b47c6707895a7cf2e98e96a38bd872c1ec/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/83e85d9f981a4aaa59d64d007886a13acfdba6f2/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/83e85d9f981a4aaa59d64d007886a13acfdba6f2/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/870c1b1ef7dfd8693c5d9618a6a4b36d55a3099e/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/870c1b1ef7dfd8693c5d9618a6a4b36d55a3099e/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/87668e3f0bb6f00af0dcbc13f7ce0aac867e2ce5/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/87668e3f0bb6f00af0dcbc13f7ce0aac867e2ce5/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/877b496863bef362a27824bee6b50fe487b76e70/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/877b496863bef362a27824bee6b50fe487b76e70/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/8b3df106dc1f7afe79ffc8a887c3191c75fd0ecf/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/8b3df106dc1f7afe79ffc8a887c3191c75fd0ecf/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/8d77a43d26911b17c207abd89c06ebd2a877c49c/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/8d77a43d26911b17c207abd89c06ebd2a877c49c/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/901082bacfe9d82ad27e2bb221b4c76d1bf0e7de/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/901082bacfe9d82ad27e2bb221b4c76d1bf0e7de/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/91521a3a9e6ba5b5438a6f8378b59ee917056539/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/91521a3a9e6ba5b5438a6f8378b59ee917056539/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/961850881bb8899ddd501095da34db841ee731f3/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/961850881bb8899ddd501095da34db841ee731f3/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/98c57862baaf13da18d00eccfdb9a555d2606f3c/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/98c57862baaf13da18d00eccfdb9a555d2606f3c/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/99ade1024084d077109b7008b9a0f4e93febb050/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/99ade1024084d077109b7008b9a0f4e93febb050/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/9a98371cffbc1c66d4d4ac31fa4ed1f13440a347/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/9a98371cffbc1c66d4d4ac31fa4ed1f13440a347/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/a0cf3856d431313bc82b9c156e4623354304ca39/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/a0cf3856d431313bc82b9c156e4623354304ca39/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/a3962fcec45a67460cab1c829fc7f8748ed03a28/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/a3962fcec45a67460cab1c829fc7f8748ed03a28/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/a3b161a3ee5d503be2fd2dd27ac07bdb3157b779/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/a3b161a3ee5d503be2fd2dd27ac07bdb3157b779/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/a5bb4b655122c88c6c261690f3805fe658ab32eb/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/a5bb4b655122c88c6c261690f3805fe658ab32eb/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/a9308b6d599deb0fe54693f042ede78aa7a2bf2f/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/a9308b6d599deb0fe54693f042ede78aa7a2bf2f/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/a9c3d9b6612981cd66864348f113645389fdd418/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/a9c3d9b6612981cd66864348f113645389fdd418/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/acb2c17365b9d2a1728da11c7b0fa35964a51d40/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/acb2c17365b9d2a1728da11c7b0fa35964a51d40/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/ae8ccd35c85e8699440cb9aa462811b115a7aedb/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/ae8ccd35c85e8699440cb9aa462811b115a7aedb/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/ae8ed23762a63907bbbe1ab5134f0bec7fcf09f3/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/ae8ed23762a63907bbbe1ab5134f0bec7fcf09f3/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/ae962263a370b80aac41249c92e7a4981ac20f80/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/ae962263a370b80aac41249c92e7a4981ac20f80/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/aea2dc520456af1f889e8c8afbc7b782187e86bc/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/aea2dc520456af1f889e8c8afbc7b782187e86bc/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/b274aaf060ee9350d9dec60b9da4fd00b74e2191/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/b274aaf060ee9350d9dec60b9da4fd00b74e2191/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/b3b7181dbefd5d8ec1be92c402dbcd300ccf0152/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/b3b7181dbefd5d8ec1be92c402dbcd300ccf0152/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/b3d4c684cd100e2b9c4ed5bfbc187c48679070f7/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/b3d4c684cd100e2b9c4ed5bfbc187c48679070f7/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/b5e5c36bdc8e499b779dea4dca440ef101b04c8c/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/b5e5c36bdc8e499b779dea4dca440ef101b04c8c/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/b5f14f58673311a6fceafd7d1787f1222bfd92b0/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/b5f14f58673311a6fceafd7d1787f1222bfd92b0/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/b70904e7f97f2833bf9546f7bfa83a51bc7eb342/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/b70904e7f97f2833bf9546f7bfa83a51bc7eb342/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/baab3f961d0c9deccebcb79ea260958a72d10ea7/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/baab3f961d0c9deccebcb79ea260958a72d10ea7/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/bc7df72fda2c586482097e6d882253bf156363ee/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/bc7df72fda2c586482097e6d882253bf156363ee/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/bd82482620478ef8498d33b6e4b4b4bb3fc8e1b7/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/bd82482620478ef8498d33b6e4b4b4bb3fc8e1b7/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/bfdf518eef5a34ef857c9b3a9397d599bee6bdd9/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/bfdf518eef5a34ef857c9b3a9397d599bee6bdd9/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/c0019aaedf0b0b43d7d74ce1b667f0857c358046/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/c0019aaedf0b0b43d7d74ce1b667f0857c358046/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/c0226f9afe2379efbf070700cc1cf039015b160d/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/c0226f9afe2379efbf070700cc1cf039015b160d/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/c206fae32c16c586c62d9126ebbc0ff23bd723d7/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/c206fae32c16c586c62d9126ebbc0ff23bd723d7/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/c2f82255ae30ec32332084e80b25bd92671b411a/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/c2f82255ae30ec32332084e80b25bd92671b411a/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/ceabad84b3f366b76b01cd61736d354efff71c76/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/ceabad84b3f366b76b01cd61736d354efff71c76/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/ceb4ee22a53b066198282c1a7d2972e696fa931a/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/ceb4ee22a53b066198282c1a7d2972e696fa931a/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/d058e0b91c5fc2ce2c3c58498659b040ad92140d/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/d058e0b91c5fc2ce2c3c58498659b040ad92140d/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/d2ef75a50d421ef87b8db580f1988b30eeec8a62/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/d2ef75a50d421ef87b8db580f1988b30eeec8a62/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/d3f0e16a5e502ad4c972c24547e2a1fc353d9068/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/d3f0e16a5e502ad4c972c24547e2a1fc353d9068/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/d3f655fbd6e3d77f4c5c21df22f6e3487f215127/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/d3f655fbd6e3d77f4c5c21df22f6e3487f215127/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/d9450c1167e7bf7f29e1406c53f0513f38e643c0/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/d9450c1167e7bf7f29e1406c53f0513f38e643c0/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/db394dab0a7ddce97172e097b5252ae2bdf83ed5/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/db394dab0a7ddce97172e097b5252ae2bdf83ed5/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/db63c7e2edee927ca8da75812f031fd695f7a7e8/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/db63c7e2edee927ca8da75812f031fd695f7a7e8/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/dba5c3d59b258f35f223d297f7b6ff63d30142c1/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/dba5c3d59b258f35f223d297f7b6ff63d30142c1/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/dceb357b330e88d29ffe3892a3ee260d097da499/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/dceb357b330e88d29ffe3892a3ee260d097da499/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/dd3e044dfda9091843d49aa54aae85b7712190a6/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/dd3e044dfda9091843d49aa54aae85b7712190a6/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/e0f7fbf27c9b883e8a194c300141ea0b42eff991/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/e0f7fbf27c9b883e8a194c300141ea0b42eff991/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/e6504ec5ffcb8bd44760a1a8496a7d4c918a5e27/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/e6504ec5ffcb8bd44760a1a8496a7d4c918a5e27/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/e6be7bb24feb078257a2775dcbde0c8da9c045d2/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/e6be7bb24feb078257a2775dcbde0c8da9c045d2/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/e80483b8881fab6509c8108b089fa6ffb3ea6c50/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/e80483b8881fab6509c8108b089fa6ffb3ea6c50/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/e9b8171191659de9ceff12247d3518310099cc4a/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/e9b8171191659de9ceff12247d3518310099cc4a/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/e9cff9ab8fa41776dce9c6d609ea933e34b6f7e2/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/e9cff9ab8fa41776dce9c6d609ea933e34b6f7e2/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/ea2d0d82777628891b37f01afd8285d3260def46/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/ea2d0d82777628891b37f01afd8285d3260def46/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/edef01599246b3c43d55674ac08b32f0894187bc/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/edef01599246b3c43d55674ac08b32f0894187bc/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/f0247306cb4b50d346f437706aad5fc9cfeabd6b/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/f0247306cb4b50d346f437706aad5fc9cfeabd6b/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/f0ab1c337bb5b6e46835a07ce34b049d05cc7570/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/f0ab1c337bb5b6e46835a07ce34b049d05cc7570/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/f2a28615e5783337724694785825317a8403d366/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/f2a28615e5783337724694785825317a8403d366/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/f5d1d87f9084e82192ca4c2dc128476beb22a97e/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/f5d1d87f9084e82192ca4c2dc128476beb22a97e/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/f611b57f6a72d58154205d4b89cd1f96df4e552d/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/f611b57f6a72d58154205d4b89cd1f96df4e552d/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/f7670b52f51c83440333014678109e158fd3e9b7/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/f7670b52f51c83440333014678109e158fd3e9b7/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/f7a150c7f1678f6b8a4d512753a1f723565b836e/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/f7a150c7f1678f6b8a4d512753a1f723565b836e/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/fbdfdfaac8ea0bdd1f5f6393100dab9d40c95d83/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/fbdfdfaac8ea0bdd1f5f6393100dab9d40c95d83/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/.sass-cache/fc5aabc5624dc5e7a56385108e2a72bd1249775e/comments.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/css/.sass-cache/fc5aabc5624dc5e7a56385108e2a72bd1249775e/comments.scssc -------------------------------------------------------------------------------- /src/assets/sources/css/comments.css: -------------------------------------------------------------------------------- 1 | .comments { 2 | margin-bottom: 15px; 3 | overflow: hidden; } 4 | .comments .show-comments { 5 | border: 1px solid #eeeeee; 6 | background-color: #eeeeee; 7 | border-radius: 6px; 8 | cursor: pointer; } 9 | .comments .show-comments a { 10 | display: block; 11 | padding: 10px 0 10px 10px; 12 | line-height: 25px; 13 | font-weight: 600; 14 | font-size: 20px; 15 | color: #333; } 16 | .comments .show-comments a:hover { 17 | text-decoration: none; } 18 | .comments .nospace { 19 | font-size: 0; } 20 | .comments .comments-header .hide-comments { 21 | position: relative; 22 | font-weight: 500; 23 | font-size: 12px; 24 | float: right; 25 | margin: 0; 26 | top: 8px; } 27 | .comments .comments-header .hide-comments a { 28 | font-weight: 400; 29 | font-size: 13px; 30 | color: #777; } 31 | .comments .comments-header .hide-comments a i { 32 | font-weight: 400; 33 | font-size: 10px; } 34 | .comments .comments-header .hide-comments a:hover { 35 | text-decoration: none; 36 | color: #333; } 37 | .comments .comments-header h2 { 38 | padding-bottom: 10px; 39 | margin: 2px 0 10px; 40 | font-size: 20px; } 41 | .comments .comments-header h2 small { 42 | display: inline-block; 43 | font-size: 16px; 44 | margin: 0 10px; } 45 | .comments .comments-input { 46 | margin: 0; } 47 | .comments .comments-input .disabled-form { 48 | background-color: #eeeeee; 49 | border-radius: 6px; 50 | text-align: left; 51 | font-size: 14px; 52 | margin: 10px 0; 53 | padding: 15px; 54 | color: #555; } 55 | .comments .comments-input .comments-alert { 56 | margin: 15px 0 30px 0; } 57 | .comments .comments-input .media-object { 58 | height: 64px; 59 | width: 64px; } 60 | .comments .comments-input .without-image { 61 | background-color: #eeeeee; 62 | color: #aaaaaa; 63 | font-size: 22px; 64 | line-height: 64px; 65 | text-align: center; } 66 | .comments .comments-input .without-image:before { 67 | cursor: default; 68 | content: "\e008"; 69 | font-family: Glyphicons Halflings; 70 | font-style: normal; 71 | font-weight: normal; 72 | text-decoration: inherit; } 73 | .comments .comments-input .media-body { 74 | font-size: 14px !important; } 75 | .comments .comments-input .media-body textarea { 76 | resize: vertical; 77 | height: 64px; } 78 | .comments .comments-input .media-body .media-buttons { 79 | display: none; } 80 | .comments .comments-input .media-body .media-buttons .user-data { 81 | word-break: break-all; 82 | font-size: 14px; } 83 | .comments .comments-input .media-body .media-buttons button { 84 | padding: 5px 10px; 85 | font-size: 12px; 86 | line-height: 1.5; 87 | border-radius: 3px; } 88 | .comments .comments-input .media-body .media-buttons button:first-child { 89 | margin: 0 5px 0 0; } 90 | .comments .comments-input .media-body .active-media-buttons { 91 | display: block; } 92 | @media (max-width: 767px) { 93 | .comments .comments-input { 94 | margin: 0; } 95 | .comments .comments-input .disabled-form { 96 | font-size: 13px; } 97 | .comments .comments-input .comments-alert { 98 | margin: 15px 0 15px 0; } 99 | .comments .comments-input .media-object { 100 | height: 32px; 101 | width: 32px; } 102 | .comments .comments-input .without-image { 103 | background-color: #eeeeee; 104 | color: #aaaaaa; 105 | font-size: 16px; 106 | line-height: 32px; 107 | text-align: center; } 108 | .comments .comments-input .without-image:before { 109 | cursor: default; 110 | content: "\e008"; 111 | font-family: Glyphicons Halflings; 112 | font-style: normal; 113 | font-weight: normal; 114 | text-decoration: inherit; } 115 | .comments .comments-input .media-body { 116 | font-size: 11px !important; } 117 | .comments .comments-input .media-body textarea { 118 | resize: vertical; 119 | font-size: 13px; 120 | height: 32px; } 121 | .comments .comments-input .media-body .media-buttons { 122 | display: none; } 123 | .comments .comments-input .media-body .media-buttons .user-data { 124 | word-break: break-all; 125 | font-size: 11px; } 126 | .comments .comments-input .media-body .media-buttons button { 127 | padding: 1px 5px; 128 | font-size: 12px; 129 | line-height: 1.5; 130 | border-radius: 3px; } 131 | .comments .comments-input .media-body .media-buttons button:first-child { 132 | margin: 0 5px 0 0; } 133 | .comments .comments-input .media-body .active-media-buttons { 134 | display: block; } } 135 | @media (min-width: 768px) and (max-width: 991px) { 136 | .comments .comments-input { 137 | margin: 0; } 138 | .comments .comments-input .comments-alert { 139 | margin: 15px 0 30px 0; } 140 | .comments .comments-input .media-object { 141 | height: 48px; 142 | width: 48px; } 143 | .comments .comments-input .without-image { 144 | background-color: #eeeeee; 145 | color: #aaaaaa; 146 | font-size: 20px; 147 | line-height: 48px; 148 | text-align: center; } 149 | .comments .comments-input .without-image:before { 150 | cursor: default; 151 | content: "\e008"; 152 | font-family: Glyphicons Halflings; 153 | font-style: normal; 154 | font-weight: normal; 155 | text-decoration: inherit; } 156 | .comments .comments-input .media-body { 157 | font-size: 12px !important; } 158 | .comments .comments-input .media-body textarea { 159 | resize: vertical; 160 | height: 48px; } 161 | .comments .comments-input .media-body .media-buttons { 162 | display: none; } 163 | .comments .comments-input .media-body .media-buttons .user-data { 164 | word-break: break-all; 165 | font-size: 12px; } 166 | .comments .comments-input .media-body .media-buttons button { 167 | padding: 5px 10px; 168 | font-size: 12px; 169 | line-height: 1.5; 170 | border-radius: 3px; } 171 | .comments .comments-input .media-body .media-buttons button:first-child { 172 | margin: 0 5px 0 0; } 173 | .comments .comments-input .media-body .active-media-buttons { 174 | display: block; } } 175 | .comments .comments-list .media:first-child { 176 | margin-top: 15px; } 177 | .comments .comments-list .media-object { 178 | height: 64px; 179 | width: 64px; } 180 | .comments .comments-list .without-image { 181 | background-color: #eeeeee; 182 | color: #aaaaaa; 183 | font-size: 22px; 184 | line-height: 64px; 185 | text-align: center; } 186 | .comments .comments-list .without-image:before { 187 | cursor: default; 188 | content: "\e008"; 189 | font-family: Glyphicons Halflings; 190 | font-style: normal; 191 | font-weight: normal; 192 | text-decoration: inherit; } 193 | .comments .comments-list .media-body h4 small { 194 | position: relative; 195 | font-weight: 500; 196 | font-size: 12px; 197 | color: #777; 198 | margin: 0; } 199 | .comments .comments-list .media-body .comment-info { 200 | margin: 5px 0 0 0; } 201 | .comments .comments-list .media-body .comment-info .comment-reply { 202 | display: inline-block; 203 | margin: 0 10px 0 0; 204 | font-size: 12px; } 205 | .comments .comments-list .media-body .comment-info .comment-rating { 206 | display: inline-block; } 207 | .comments .comments-list .media-body .comment-info .comment-rating .thumbs-up { 208 | display: inline-block; 209 | font-weight: 500; 210 | font-size: 11px; 211 | margin: 0 0 0 15px; 212 | color: #777; } 213 | .comments .comments-list .media-body .comment-info .comment-rating .score { 214 | display: inline-block; 215 | font-weight: 500; 216 | font-size: 11px; 217 | color: #777777; 218 | margin: 0; } 219 | .comments .comments-list .media-body .comment-info .comment-rating .score .good { 220 | color: #00540a; } 221 | .comments .comments-list .media-body .comment-info .comment-rating .score .bad { 222 | color: #c9302c; } 223 | .comments .comments-list .media-body .comment-info .comment-rating .thumbs-down { 224 | display: inline-block; 225 | font-weight: 500; 226 | font-size: 11px; 227 | margin: 0 0 0 15px; 228 | color: #777; } 229 | .comments .comments-list .media-body .comment-info .comment-rating .rated a { 230 | color: #23527c; } 231 | @media (max-width: 767px) { 232 | .comments .comments-list .media:first-child { 233 | margin-top: 15px; } 234 | .comments .comments-list .media-object { 235 | height: 32px; 236 | width: 32px; } 237 | .comments .comments-list .without-image { 238 | background-color: #eeeeee; 239 | color: #aaaaaa; 240 | font-size: 16px; 241 | line-height: 32px; 242 | text-align: center; } 243 | .comments .comments-list .without-image:before { 244 | cursor: default; 245 | content: "\e008"; 246 | font-family: Glyphicons Halflings; 247 | font-style: normal; 248 | font-weight: normal; 249 | text-decoration: inherit; } 250 | .comments .comments-list .media-body { 251 | font-size: 13px; } 252 | .comments .comments-list .media-body h4 small { 253 | position: relative; 254 | font-weight: 500; 255 | font-size: 10px; 256 | color: #777; 257 | margin: 0; } 258 | .comments .comments-list .media-body .media-heading { 259 | font-size: 13px; } 260 | .comments .comments-list .media-body .comment-info { 261 | margin: 5px 0 0 0; } 262 | .comments .comments-list .media-body .comment-info .comment-reply { 263 | display: inline-block; 264 | margin: 0 10px 0 0; 265 | font-size: 12px; } 266 | .comments .comments-list .media-body .comment-info .comment-rating { 267 | display: inline-block; } 268 | .comments .comments-list .media-body .comment-info .comment-rating .thumbs-up { 269 | display: inline-block; 270 | font-weight: 500; 271 | font-size: 11px; 272 | margin: 0 0 0 15px; 273 | color: #777; } 274 | .comments .comments-list .media-body .comment-info .comment-rating .score { 275 | display: inline-block; 276 | font-weight: 500; 277 | font-size: 11px; 278 | color: #777; 279 | margin: 0; } 280 | .comments .comments-list .media-body .comment-info .comment-rating .thumbs-down { 281 | display: inline-block; 282 | font-weight: 500; 283 | font-size: 11px; 284 | margin: 0 0 0 15px; 285 | color: #777; } } 286 | @media (min-width: 768px) and (max-width: 991px) { 287 | .comments .comments-list .media:first-child { 288 | margin-top: 15px; } 289 | .comments .comments-list .media-object { 290 | height: 48px; 291 | width: 48px; } 292 | .comments .comments-list .without-image { 293 | background-color: #eeeeee; 294 | color: #aaaaaa; 295 | font-size: 20px; 296 | line-height: 48px; 297 | text-align: center; } 298 | .comments .comments-list .without-image:before { 299 | cursor: default; 300 | content: "\e008"; 301 | font-family: Glyphicons Halflings; 302 | font-style: normal; 303 | font-weight: normal; 304 | text-decoration: inherit; } 305 | .comments .comments-list .media-body { 306 | font-size: 14px; } 307 | .comments .comments-list .media-body h4 small { 308 | position: relative; 309 | font-weight: 500; 310 | font-size: 11px; 311 | color: #777; 312 | margin: 0; } 313 | .comments .comments-list .media-body .media-heading { 314 | font-size: 14px; } 315 | .comments .comments-list .media-body .comment-info { 316 | margin: 5px 0 0 0; } 317 | .comments .comments-list .media-body .comment-info .comment-reply { 318 | display: inline-block; 319 | margin: 0 10px 0 0; 320 | font-size: 12px; } 321 | .comments .comments-list .media-body .comment-info .comment-rating { 322 | display: inline-block; } 323 | .comments .comments-list .media-body .comment-info .comment-rating .thumbs-up { 324 | display: inline-block; 325 | font-weight: 500; 326 | font-size: 12px; 327 | margin: 0 0 0 15px; 328 | color: #777; } 329 | .comments .comments-list .media-body .comment-info .comment-rating .score { 330 | display: inline-block; 331 | font-weight: 500; 332 | font-size: 12px; 333 | color: #777; 334 | margin: 0; } 335 | .comments .comments-list .media-body .comment-info .comment-rating .thumbs-down { 336 | display: inline-block; 337 | font-weight: 500; 338 | font-size: 12px; 339 | margin: 0 0 0 15px; 340 | color: #777; } } 341 | 342 | /*# sourceMappingURL=comments.css.map */ 343 | -------------------------------------------------------------------------------- /src/assets/sources/css/comments.css.map: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "mappings": "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", 4 | "sources": ["comments.scss"], 5 | "names": [], 6 | "file": "comments.css" 7 | } -------------------------------------------------------------------------------- /src/assets/sources/css/comments.scss: -------------------------------------------------------------------------------- 1 | .comments { 2 | margin-bottom: 15px; 3 | overflow: hidden; 4 | 5 | .show-comments { 6 | border: 1px solid #eeeeee; 7 | background-color: #eeeeee; 8 | border-radius: 6px; 9 | cursor: pointer; 10 | 11 | a { 12 | display: block; 13 | padding: 10px 0 10px 10px; 14 | line-height: 25px; 15 | font-weight: 600; 16 | font-size: 20px; 17 | color: #333; 18 | 19 | &:hover { 20 | text-decoration: none; 21 | } 22 | } 23 | } 24 | 25 | .nospace { 26 | font-size: 0; 27 | } 28 | 29 | .comments-header { 30 | 31 | .hide-comments { 32 | position: relative; 33 | font-weight: 500; 34 | font-size: 12px; 35 | float: right; 36 | margin: 0; 37 | top: 8px; 38 | 39 | a { 40 | font-weight: 400; 41 | font-size: 13px; 42 | color: #777; 43 | 44 | i { 45 | font-weight: 400; 46 | font-size: 10px; 47 | } 48 | 49 | &:hover { 50 | text-decoration: none; 51 | color: #333; 52 | } 53 | } 54 | } 55 | 56 | h2 { 57 | padding-bottom: 10px; 58 | margin: 2px 0 10px; 59 | font-size: 20px; 60 | 61 | small { 62 | display: inline-block; 63 | font-size: 16px; 64 | margin: 0 10px; 65 | } 66 | } 67 | } 68 | 69 | .comments-input { 70 | //margin: 0 0 15px 0; 71 | margin: 0; 72 | 73 | .disabled-form { 74 | background-color: #eeeeee; 75 | border-radius: 6px; 76 | text-align: left; 77 | font-size: 14px; 78 | margin: 10px 0; 79 | padding: 15px; 80 | color: #555; 81 | } 82 | 83 | .comments-alert { 84 | margin: 15px 0 30px 0; 85 | } 86 | 87 | .media-object { 88 | height: 64px; 89 | width: 64px; 90 | } 91 | 92 | .without-image { 93 | background-color: #eeeeee; 94 | color: #aaaaaa; 95 | font-size: 22px; 96 | line-height: 64px; 97 | text-align: center; 98 | 99 | &:before { 100 | cursor: default; 101 | content:"\e008"; 102 | font-family: Glyphicons Halflings; 103 | font-style: normal; 104 | font-weight: normal; 105 | text-decoration: inherit; 106 | } 107 | } 108 | 109 | .media-body { 110 | font-size: 14px !important; 111 | 112 | textarea { 113 | resize:vertical; 114 | height: 64px; 115 | } 116 | 117 | .media-buttons { 118 | display: none; 119 | 120 | .user-data { 121 | word-break: break-all; 122 | font-size: 14px; 123 | } 124 | 125 | button { 126 | &:first-child { 127 | margin: 0 5px 0 0; 128 | } 129 | 130 | padding: 5px 10px; 131 | font-size: 12px; 132 | line-height: 1.5; 133 | border-radius: 3px; 134 | } 135 | } 136 | 137 | .active-media-buttons { 138 | display: block; 139 | } 140 | } 141 | } 142 | 143 | @media (max-width: 767px) { 144 | .comments-input { 145 | //margin: 0 0 15px 0; 146 | margin: 0; 147 | 148 | .disabled-form { 149 | font-size: 13px; 150 | } 151 | 152 | .comments-alert { 153 | margin: 15px 0 15px 0; 154 | } 155 | 156 | .media-object { 157 | height: 32px; 158 | width: 32px; 159 | } 160 | 161 | .without-image { 162 | background-color: #eeeeee; 163 | color: #aaaaaa; 164 | font-size: 16px; 165 | line-height: 32px; 166 | text-align: center; 167 | 168 | &:before { 169 | cursor: default; 170 | content:"\e008"; 171 | font-family: Glyphicons Halflings; 172 | font-style: normal; 173 | font-weight: normal; 174 | text-decoration: inherit; 175 | } 176 | } 177 | 178 | .media-body { 179 | font-size: 11px !important; 180 | 181 | textarea { 182 | resize:vertical; 183 | font-size: 13px; 184 | height: 32px; 185 | } 186 | 187 | .media-buttons { 188 | display: none; 189 | 190 | .user-data { 191 | word-break: break-all; 192 | font-size: 11px; 193 | } 194 | 195 | button { 196 | &:first-child { 197 | margin: 0 5px 0 0; 198 | } 199 | 200 | padding: 1px 5px; 201 | font-size: 12px; 202 | line-height: 1.5; 203 | border-radius: 3px; 204 | } 205 | } 206 | 207 | .active-media-buttons { 208 | display: block; 209 | } 210 | } 211 | } 212 | } 213 | 214 | @media (min-width: 768px) and (max-width: 991px) { 215 | .comments-input { 216 | //margin: 0 0 15px 0; 217 | margin: 0; 218 | 219 | .comments-alert { 220 | margin: 15px 0 30px 0; 221 | } 222 | 223 | .media-object { 224 | height: 48px; 225 | width: 48px; 226 | } 227 | 228 | .without-image { 229 | background-color: #eeeeee; 230 | color: #aaaaaa; 231 | font-size: 20px; 232 | line-height: 48px; 233 | text-align: center; 234 | 235 | &:before { 236 | cursor: default; 237 | content:"\e008"; 238 | font-family: Glyphicons Halflings; 239 | font-style: normal; 240 | font-weight: normal; 241 | text-decoration: inherit; 242 | } 243 | } 244 | 245 | .media-body { 246 | font-size: 12px !important; 247 | 248 | textarea { 249 | resize:vertical; 250 | height: 48px; 251 | } 252 | 253 | .media-buttons { 254 | display: none; 255 | 256 | .user-data { 257 | word-break: break-all; 258 | font-size: 12px; 259 | } 260 | 261 | button { 262 | &:first-child { 263 | margin: 0 5px 0 0; 264 | } 265 | 266 | padding: 5px 10px; 267 | font-size: 12px; 268 | line-height: 1.5; 269 | border-radius: 3px; 270 | } 271 | } 272 | 273 | .active-media-buttons { 274 | display: block; 275 | } 276 | } 277 | } 278 | } 279 | 280 | .comments-list { 281 | 282 | .media { 283 | &:first-child { 284 | margin-top: 15px; 285 | } 286 | } 287 | 288 | .media-object { 289 | height: 64px; 290 | width: 64px; 291 | } 292 | 293 | .without-image { 294 | background-color: #eeeeee; 295 | color: #aaaaaa; 296 | font-size: 22px; 297 | line-height: 64px; 298 | text-align: center; 299 | 300 | &:before { 301 | cursor: default; 302 | content:"\e008"; 303 | font-family: Glyphicons Halflings; 304 | font-style: normal; 305 | font-weight: normal; 306 | text-decoration: inherit; 307 | } 308 | } 309 | 310 | .media-body { 311 | 312 | h4 { 313 | small { 314 | position: relative; 315 | font-weight: 500; 316 | font-size: 12px; 317 | color: #777; 318 | margin: 0; 319 | } 320 | } 321 | 322 | .comment-info { 323 | margin: 5px 0 0 0; 324 | 325 | .comment-reply { 326 | display: inline-block; 327 | margin: 0 10px 0 0; 328 | font-size: 12px; 329 | } 330 | 331 | .comment-rating { 332 | display: inline-block; 333 | 334 | .thumbs-up { 335 | display: inline-block; 336 | font-weight: 500; 337 | font-size: 11px; 338 | margin: 0 0 0 15px; 339 | color: #777; 340 | } 341 | 342 | .score { 343 | display: inline-block; 344 | font-weight: 500; 345 | font-size: 11px; 346 | color: #777777; 347 | margin: 0; 348 | 349 | .good { 350 | color: #00540a; 351 | } 352 | 353 | .bad { 354 | color: #c9302c; 355 | } 356 | } 357 | 358 | .thumbs-down { 359 | display: inline-block; 360 | font-weight: 500; 361 | font-size: 11px; 362 | margin: 0 0 0 15px; 363 | color: #777; 364 | } 365 | 366 | .rated { 367 | a { 368 | color: #23527c; 369 | } 370 | } 371 | } 372 | } 373 | } 374 | } 375 | 376 | @media (max-width: 767px) { 377 | .comments-list { 378 | 379 | .media { 380 | &:first-child { 381 | margin-top: 15px; 382 | } 383 | } 384 | 385 | .media-object { 386 | height: 32px; 387 | width: 32px; 388 | } 389 | 390 | .without-image { 391 | background-color: #eeeeee; 392 | color: #aaaaaa; 393 | font-size: 16px; 394 | line-height: 32px; 395 | text-align: center; 396 | 397 | &:before { 398 | cursor: default; 399 | content:"\e008"; 400 | font-family: Glyphicons Halflings; 401 | font-style: normal; 402 | font-weight: normal; 403 | text-decoration: inherit; 404 | } 405 | } 406 | 407 | .media-body { 408 | font-size: 13px; 409 | 410 | h4 { 411 | small { 412 | position: relative; 413 | font-weight: 500; 414 | font-size: 10px; 415 | color: #777; 416 | margin: 0; 417 | } 418 | } 419 | 420 | .media-heading { 421 | font-size: 13px; 422 | } 423 | 424 | .comment-info { 425 | margin: 5px 0 0 0; 426 | 427 | .comment-reply { 428 | display: inline-block; 429 | margin: 0 10px 0 0; 430 | font-size: 12px; 431 | } 432 | 433 | .comment-rating { 434 | display: inline-block;; 435 | 436 | .thumbs-up { 437 | display: inline-block; 438 | font-weight: 500; 439 | font-size: 11px; 440 | margin: 0 0 0 15px; 441 | color: #777; 442 | } 443 | 444 | .score { 445 | display: inline-block; 446 | font-weight: 500; 447 | font-size: 11px; 448 | color: #777; 449 | margin: 0; 450 | } 451 | 452 | .thumbs-down { 453 | display: inline-block; 454 | font-weight: 500; 455 | font-size: 11px; 456 | margin: 0 0 0 15px; 457 | color: #777; 458 | } 459 | } 460 | } 461 | } 462 | } 463 | } 464 | 465 | @media (min-width: 768px) and (max-width: 991px) { 466 | .comments-list { 467 | 468 | .media { 469 | &:first-child { 470 | margin-top: 15px; 471 | } 472 | } 473 | 474 | .media-object { 475 | height: 48px; 476 | width: 48px; 477 | } 478 | 479 | .without-image { 480 | background-color: #eeeeee; 481 | color: #aaaaaa; 482 | font-size: 20px; 483 | line-height: 48px; 484 | text-align: center; 485 | 486 | &:before { 487 | cursor: default; 488 | content:"\e008"; 489 | font-family: Glyphicons Halflings; 490 | font-style: normal; 491 | font-weight: normal; 492 | text-decoration: inherit; 493 | } 494 | } 495 | 496 | .media-body { 497 | font-size: 14px; 498 | 499 | h4 { 500 | small { 501 | position: relative; 502 | font-weight: 500; 503 | font-size: 11px; 504 | color: #777; 505 | margin: 0; 506 | } 507 | } 508 | 509 | .media-heading { 510 | font-size: 14px; 511 | } 512 | 513 | .comment-info { 514 | margin: 5px 0 0 0; 515 | 516 | .comment-reply { 517 | display: inline-block; 518 | margin: 0 10px 0 0; 519 | font-size: 12px; 520 | } 521 | 522 | .comment-rating { 523 | display: inline-block;; 524 | 525 | .thumbs-up { 526 | display: inline-block; 527 | font-weight: 500; 528 | font-size: 12px; 529 | margin: 0 0 0 15px; 530 | color: #777; 531 | } 532 | 533 | .score { 534 | display: inline-block; 535 | font-weight: 500; 536 | font-size: 12px; 537 | color: #777; 538 | margin: 0; 539 | } 540 | 541 | .thumbs-down { 542 | display: inline-block; 543 | font-weight: 500; 544 | font-size: 12px; 545 | margin: 0 0 0 15px; 546 | color: #777; 547 | } 548 | } 549 | } 550 | } 551 | } 552 | } 553 | } -------------------------------------------------------------------------------- /src/assets/sources/images/default-user-avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ogheo/yii2-comments/1f34d8497dc8232f728b12c758d7f1b34b60cbde/src/assets/sources/images/default-user-avatar.png -------------------------------------------------------------------------------- /src/assets/sources/js/comments.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | 3 | $.fn.comment = function (method) { 4 | if (methods[method]) { 5 | return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); 6 | } else if (typeof method === 'object' || !method) { 7 | return methods.init.apply(this, arguments); 8 | } else { 9 | $.error('Method ' + method + ' does not exist on jQuery.comment'); 10 | return false; 11 | } 12 | }; 13 | 14 | var commentData = {}; 15 | var methods = { 16 | init: function (options) { 17 | return this.each(function () { 18 | var $comment = $(this); 19 | var id = $comment.attr('id'); 20 | var settings = $.extend({}, options || {}); 21 | 22 | if (commentData[id] === undefined) { 23 | commentData[id] = {}; 24 | } else { 25 | return; 26 | } 27 | 28 | commentData[id] = $.extend(commentData[id], {settings: settings}); 29 | 30 | var wrapperId = commentData[id].settings.wrapperId; 31 | var formSelector = commentData[id].settings.formSelector; 32 | var showCommentsId = commentData[id].settings.showCommentsId; 33 | var fullCommentsId = commentData[id].settings.fullCommentsId; 34 | var pjaxContainer = commentData[id].settings.pjaxContainerId; 35 | var formContainer = commentData[id].settings.formContainerId; 36 | var submitButtonId = commentData[id].settings.submitButtonId; 37 | var postButtonName = commentData[id].settings.postButtonName; 38 | var replyButtonName = commentData[id].settings.replyButtonName; 39 | var ratingUrl = commentData[id].settings.ratingUrl; 40 | var pagination = pjaxContainer + ' .pagination a'; 41 | var formTextarea = formSelector + ' textarea'; 42 | var eventParams = { 43 | ratingUrl: ratingUrl, 44 | wrapperId: wrapperId, 45 | formSelector: formSelector, 46 | showCommentsId: showCommentsId, 47 | fullCommentsId: fullCommentsId, 48 | pjaxContainer: pjaxContainer, 49 | formContainer: formContainer, 50 | submitButtonId: submitButtonId, 51 | postButtonName: postButtonName, 52 | replyButtonName: replyButtonName 53 | }; 54 | 55 | $comment.on('beforeSubmit.comment', formSelector, eventParams, createComment); 56 | $comment.on('click.comment', '[data-action="reply"]', eventParams, reply); 57 | $comment.on('click.comment', '[data-action="cancel-reply"]', eventParams, cancelReply); 58 | $comment.on('click.comment', '[data-action="show-comments"]', eventParams, showComments); 59 | $comment.on('click.comment', '[data-action="hide-comments"]', eventParams, hideComments); 60 | $comment.on('click.comment', '[data-action="downrate"]', eventParams, downrate); 61 | $comment.on('click.comment', '[data-action="uprate"]', eventParams, uprate); 62 | $comment.on('click.comment', pagination, eventParams, scrollTo); 63 | $comment.on('focus.comment', formTextarea, showButtons); 64 | }); 65 | } 66 | }; 67 | 68 | /** 69 | * Show comments section 70 | * @param event 71 | */ 72 | function showComments(event) { 73 | var showCommentsId = event.data.showCommentsId; 74 | var fullCommentsId = event.data.fullCommentsId; 75 | 76 | $(showCommentsId).fadeOut(300, function () { 77 | $(showCommentsId).addClass('hidden') 78 | }); 79 | $(fullCommentsId).fadeIn(300, function () { 80 | $(fullCommentsId).removeClass('hidden') 81 | }); 82 | 83 | return false; 84 | } 85 | 86 | /** 87 | * Hide comments section 88 | * @param event 89 | */ 90 | function hideComments(event) { 91 | var showCommentsId = event.data.showCommentsId; 92 | var fullCommentsId = event.data.fullCommentsId; 93 | 94 | $(fullCommentsId).fadeOut(300, function () { 95 | $(fullCommentsId).addClass('hidden') 96 | }); 97 | $(showCommentsId).fadeIn(300, function () { 98 | $(showCommentsId).removeClass('hidden') 99 | }); 100 | 101 | return false; 102 | } 103 | 104 | /** 105 | * Scroll to the top of comment section 106 | * @param event 107 | */ 108 | function scrollTo(event) { 109 | var wrapperId = event.data.wrapperId; 110 | $('html, body').animate({ 111 | scrollTop: ($(wrapperId).offset().top) 112 | }, 500); 113 | } 114 | 115 | /** 116 | * Show form buttons 117 | */ 118 | function showButtons() { 119 | $(this).parents('form').find('.media-buttons').fadeIn('fast'); 120 | } 121 | 122 | /** 123 | * Create a comment 124 | * @returns {boolean} 125 | */ 126 | function createComment(event) { 127 | var $commentForm = $(this); 128 | var pjaxContainer = event.data.pjaxContainer; 129 | var formData = $commentForm.serializeArray(); 130 | var parentId = $commentForm.parents('[data-key]').data('key'); 131 | 132 | if (parentId) { 133 | formData.push({'name': 'Comments[parent_id]', 'value': parentId}); 134 | } 135 | 136 | $.ajax({ 137 | type: 'post', 138 | data: formData, 139 | url: $commentForm.attr('action'), 140 | success: function (response) { 141 | if (response['status'] === 'success') { 142 | $.pjax({ 143 | url: window.location.href, 144 | container: pjaxContainer, 145 | scrollTo: false, 146 | timeout: 10000 147 | }); 148 | } else { 149 | if (response.hasOwnProperty('errors')) { 150 | $commentForm.yiiActiveForm('updateMessages', response.errors, true); 151 | } 152 | } 153 | } 154 | }); 155 | 156 | return false; 157 | } 158 | 159 | /** 160 | * Reply to comment 161 | * @param event 162 | */ 163 | function reply(event) { 164 | var $this = $(this); 165 | var $commentsFormContainer = $(event.data.formContainer); 166 | var parentCommentSelector = $this.parents('.media-info'); 167 | var replyButtonName = event.data.replyButtonName; 168 | var submitButton = event.data.submitButtonId; 169 | 170 | $commentsFormContainer.find(submitButton).html(replyButtonName); 171 | $commentsFormContainer.appendTo(parentCommentSelector); 172 | $commentsFormContainer.find('form textarea').focus(); 173 | 174 | return false; 175 | } 176 | 177 | /** 178 | * Cancel reply 179 | * @param event 180 | */ 181 | function cancelReply(event) { 182 | var $this = $(this); 183 | var $commentsForm = $(event.data.formSelector); 184 | var $commentsFormContainer = $(event.data.formContainer); 185 | var postButtonName = event.data.postButtonName; 186 | var submitButton = event.data.submitButtonId; 187 | 188 | $commentsFormContainer.find(submitButton).html(postButtonName); 189 | if ($this.parents('[data-key]').length) { 190 | $commentsForm.trigger("reset"); 191 | $this.parents('.media-buttons').hide(); 192 | $commentsFormContainer.hide().insertAfter('#comments-container-header').fadeIn("fast"); 193 | } else { 194 | $commentsForm.trigger("reset"); 195 | $this.parents('.media-buttons').fadeOut('fast'); 196 | } 197 | 198 | return false; 199 | } 200 | 201 | /** 202 | * Rate comment - 203 | * @param event 204 | * @returns {boolean} 205 | */ 206 | function downrate(event) { 207 | var $downrateButton = $(this); 208 | var $ratingUrl = event.data.ratingUrl; 209 | var downrateFormData = $downrateButton.serializeArray(); 210 | var commentId = $downrateButton.parents('[data-key]').data('key'); 211 | 212 | if (commentId) { 213 | downrateFormData.push({'name': 'CommentsRating[comment_id]', 'value': commentId}); 214 | downrateFormData.push({'name': 'CommentsRating[status]', 'value': 2}); 215 | } 216 | 217 | $.ajax({ 218 | type: 'post', 219 | data: downrateFormData, 220 | url: $ratingUrl, 221 | success: function (response) { 222 | if (response['status'] === 'success') { 223 | var commentRating = $downrateButton.parents('.comment-rating'); 224 | var $uprateButton = commentRating.find('[data-action="uprate"]'); 225 | var scoreId = commentRating.find('#score'); 226 | var score = parseInt($(scoreId).html()); 227 | 228 | if (response['action'] === 'rated') { 229 | score = score - 1; 230 | $(scoreId).html(score); 231 | $downrateButton.addClass('rated'); 232 | } else if (response['action'] === 'updated-') { 233 | score = score - 2; 234 | $(scoreId).html(score); 235 | $uprateButton.removeClass('rated'); 236 | $downrateButton.addClass('rated'); 237 | } else if (response['action'] === 'unrated') { 238 | score = score + 1; 239 | $(scoreId).html(score); 240 | $downrateButton.removeClass('rated'); 241 | } 242 | 243 | if (score < 0) { 244 | $(scoreId).removeClass().addClass('bad'); 245 | } else { 246 | $(scoreId).removeClass().addClass('good'); 247 | } 248 | } 249 | } 250 | }); 251 | 252 | return false; 253 | } 254 | 255 | /** 256 | * Rate comment + 257 | * @param event 258 | * @returns {boolean} 259 | */ 260 | function uprate(event) { 261 | var $uprateButton = $(this); 262 | var $ratingUrl = event.data.ratingUrl; 263 | var uprateFormData = $uprateButton.serializeArray(); 264 | var commentId = $uprateButton.parents('[data-key]').data('key'); 265 | 266 | if (commentId) { 267 | uprateFormData.push({'name': 'CommentsRating[comment_id]', 'value': commentId}); 268 | uprateFormData.push({'name': 'CommentsRating[status]', 'value': 1}); 269 | } 270 | 271 | $.ajax({ 272 | type: 'post', 273 | data: uprateFormData, 274 | url: $ratingUrl, 275 | success: function (response) { 276 | if (response['status'] === 'success') { 277 | var commentRating = $uprateButton.parents('.comment-rating'); 278 | var $downrateButton = commentRating.find('[data-action="downrate"]'); 279 | var scoreId = commentRating.find('#score'); 280 | var score = parseInt($(scoreId).html()); 281 | 282 | if (response['action'] === 'rated') { 283 | score = score + 1; 284 | $(scoreId).html(score); 285 | $uprateButton.addClass('rated'); 286 | } else if (response['action'] === 'updated+') { 287 | score = score + 2; 288 | $(scoreId).html(score); 289 | $downrateButton.removeClass('rated'); 290 | $uprateButton.addClass('rated'); 291 | } else if (response['action'] === 'unrated') { 292 | score = score - 1; 293 | $(scoreId).html(score); 294 | $uprateButton.removeClass('rated'); 295 | } 296 | 297 | if (score < 0) { 298 | $(scoreId).removeClass().addClass('bad'); 299 | } else { 300 | $(scoreId).removeClass().addClass('good'); 301 | } 302 | } 303 | } 304 | }); 305 | 306 | return false; 307 | } 308 | 309 | })(window.jQuery); 310 | -------------------------------------------------------------------------------- /src/controllers/DefaultController.php: -------------------------------------------------------------------------------- 1 | [ 30 | 'class' => VerbFilter::className(), 31 | 'actions' => [ 32 | 'rate' => ['post'], 33 | 'create' => ['post'], 34 | 'validate' => ['post'] 35 | ], 36 | ], 37 | 'contentNegotiator' => [ 38 | 'class' => ContentNegotiator::className(), 39 | 'only' => ['rate', 'create', 'validate'], 40 | 'formats' => [ 41 | 'application/json' => Response::FORMAT_JSON, 42 | ], 43 | ], 44 | 'access' => [ 45 | 'class' => AccessControl::className(), 46 | 'only' => ['rate', 'create', 'validate'], 47 | 'rules' => [ 48 | [ 49 | 'allow' => true, 50 | 'actions' => ['create', 'validate'], 51 | 'roles' => ['?', '@'], 52 | ], 53 | [ 54 | 'allow' => true, 55 | 'actions' => ['rate'], 56 | 'roles' => ['@'], 57 | ], 58 | ], 59 | ], 60 | ]; 61 | } 62 | 63 | /** 64 | * Create new comment 65 | * @param $data 66 | * @return string 67 | */ 68 | public function actionCreate($data) 69 | { 70 | if (Yii::$app->request->isAjax && Yii::$app->request->isPost) { 71 | $comment = new CommentsModel( 72 | array_merge( 73 | CommentsHelper::decryptData($data), 74 | [ 75 | 'scenario' => Yii::$app->user->isGuest ? 76 | CommentsModel::SCENARIO_GUEST : CommentsModel::SCENARIO_USER 77 | ] 78 | ) 79 | ); 80 | 81 | if (Yii::$app->user->isGuest && ($comment->username === null && $comment->email === null)) { 82 | $comment->username = CommentsHelper::getUsername(); 83 | $comment->email = CommentsHelper::getEmail(); 84 | } 85 | 86 | if ($comment->load(Yii::$app->request->post()) && $comment->validate()) { 87 | if ($comment->save()) { 88 | if ($comment->username !== null && $comment->email !== null) { 89 | CommentsHelper::setUsername($comment->username); 90 | CommentsHelper::setEmail($comment->email); 91 | } 92 | 93 | TagDependency::invalidate( 94 | Yii::$app->cache, 95 | Url::previous(Yii::$app->controller->module->urlCacheSessionKey) 96 | ); 97 | 98 | return [ 99 | 'status' => 'success', 100 | 'message' => Yii::t('comments', 'Comment has been added successfully.') 101 | ]; 102 | } 103 | } else { 104 | return [ 105 | 'status' => 'error', 106 | 'errors' => $comment->errors 107 | ]; 108 | } 109 | } 110 | 111 | return [ 112 | 'status' => 'error', 113 | 'message' => Yii::t('comments', 'Sorry, something went wrong. Please try again later.') 114 | ]; 115 | } 116 | 117 | /** 118 | * Validate new comment 119 | * @throws \yii\base\ExitException 120 | */ 121 | public function actionValidate() 122 | { 123 | $model = new CommentsModel([ 124 | 'scenario' => Yii::$app->user->isGuest ? 125 | CommentsModel::SCENARIO_GUEST : CommentsModel::SCENARIO_USER 126 | ]); 127 | 128 | if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) { 129 | Yii::$app->response->data = ActiveForm::validate($model); 130 | Yii::$app->response->send(); 131 | Yii::$app->end(); 132 | } 133 | } 134 | 135 | /** 136 | * Rate comments 137 | * @return array 138 | */ 139 | public function actionRate() 140 | { 141 | if (Yii::$app->request->isAjax && Yii::$app->request->isPost) { 142 | $newRating = new CommentsRating(['scenario' => CommentsRating::SCENARIO_SAVE]); 143 | if ($newRating->load(Yii::$app->request->post()) && $newRating->validate()) { 144 | 145 | $oldRating = CommentsRating::findOne([ 146 | 'comment_id' => CommentsHelper::decodeId($newRating->comment_id), 147 | 'created_by' => Yii::$app->getUser()->getId() 148 | ]); 149 | 150 | if ($oldRating) { 151 | if ($oldRating->status == $newRating->status) { 152 | $oldRating->scenario = CommentsRating::SCENARIO_DELETE; 153 | if ($oldRating->delete()) { 154 | if ($oldRating->status == 1) { 155 | CommentsHelper::deleteUprated($oldRating->comment_id); 156 | } elseif ($oldRating->status == 2) { 157 | CommentsHelper::deleteDownrated($oldRating->comment_id); 158 | } 159 | 160 | TagDependency::invalidate( 161 | Yii::$app->cache, 162 | Url::previous(Yii::$app->controller->module->urlCacheSessionKey) 163 | ); 164 | 165 | return [ 166 | 'status' => 'success', 167 | 'action' => 'unrated', 168 | 'message' => Yii::t('comments', 'Comment rating has been updated successfully.') 169 | ]; 170 | } 171 | } else { 172 | $oldRating->status = $newRating->status; 173 | $oldRating->scenario = CommentsRating::SCENARIO_UPDATE; 174 | if ($oldRating->update()) { 175 | if ($oldRating->status == 1) { 176 | CommentsHelper::deleteDownrated($oldRating->comment_id); 177 | CommentsHelper::setUprated($oldRating->comment_id); 178 | } elseif ($oldRating->status == 2) { 179 | CommentsHelper::deleteUprated($oldRating->comment_id); 180 | CommentsHelper::setDownrated($oldRating->comment_id); 181 | } 182 | 183 | TagDependency::invalidate( 184 | Yii::$app->cache, 185 | Url::previous(Yii::$app->controller->module->urlCacheSessionKey) 186 | ); 187 | 188 | return [ 189 | 'status' => 'success', 190 | 'action' => $oldRating->status == 1 ? 'updated+' : 'updated-', 191 | 'message' => Yii::t('comments', 'Comment rating has been updated successfully.') 192 | ]; 193 | } 194 | } 195 | } else { 196 | if ($newRating->save()) { 197 | if ($newRating->status == 1) { 198 | CommentsHelper::setUprated($newRating->comment_id); 199 | } elseif ($newRating->status == 2) { 200 | CommentsHelper::setDownrated($newRating->comment_id); 201 | } 202 | 203 | TagDependency::invalidate( 204 | Yii::$app->cache, 205 | Url::previous(Yii::$app->controller->module->urlCacheSessionKey) 206 | ); 207 | 208 | return [ 209 | 'status' => 'success', 210 | 'action' => 'rated', 211 | 'message' => Yii::t('comments', 'Comment rating has been updated successfully.') 212 | ]; 213 | } 214 | } 215 | } else { 216 | return [ 217 | 'status' => 'error', 218 | 'errors' => $newRating->errors 219 | ]; 220 | } 221 | } 222 | 223 | return [ 224 | 'status' => 'error', 225 | 'message' => Yii::t('comments', 'Sorry, something went wrong. Please try again later.') 226 | ]; 227 | } 228 | } 229 | -------------------------------------------------------------------------------- /src/controllers/ManageController.php: -------------------------------------------------------------------------------- 1 | 'yii\filters\VerbFilter', 40 | 'actions' => [ 41 | 'delete' => ['POST'], 42 | ], 43 | ]; 44 | 45 | /** 46 | * @var array access control config 47 | */ 48 | public $accessControlConfig = [ 49 | 'class' => 'yii\filters\AccessControl', 50 | 'rules' => [ 51 | [ 52 | 'allow' => true, 53 | 'roles' => ['admin'], 54 | ], 55 | ], 56 | ]; 57 | 58 | /** 59 | * @inheritdoc 60 | */ 61 | public function behaviors() 62 | { 63 | return [ 64 | 'verbs' => $this->verbFilterConfig, 65 | 'access' => $this->accessControlConfig 66 | ]; 67 | } 68 | 69 | /** 70 | * Lists all Comments models. 71 | * @return mixed 72 | */ 73 | public function actionIndex() 74 | { 75 | $searchModel = Yii::createObject($this->searchModelClass); 76 | $dataProvider = $searchModel->search(Yii::$app->request->queryParams); 77 | 78 | return $this->render($this->indexView, [ 79 | 'searchModel' => $searchModel, 80 | 'dataProvider' => $dataProvider, 81 | ]); 82 | } 83 | 84 | /** 85 | * Displays a single Comments model. 86 | * @param integer $id 87 | * @return mixed 88 | */ 89 | public function actionView($id) 90 | { 91 | return $this->render($this->viewView, [ 92 | 'model' => $this->findModel($id), 93 | ]); 94 | } 95 | 96 | /** 97 | * Updates an existing Comments model. 98 | * If update is successful, the browser will be redirected to the 'view' page. 99 | * @param integer $id 100 | * @return mixed 101 | */ 102 | public function actionUpdate($id) 103 | { 104 | $model = $this->findModel($id); 105 | 106 | if ($model->load(Yii::$app->request->post()) && $model->save()) { 107 | return $this->redirect(['view', 'id' => $model->id]); 108 | } else { 109 | return $this->render($this->updateView, [ 110 | 'model' => $model, 111 | ]); 112 | } 113 | } 114 | 115 | /** 116 | * Deletes an existing Comments model and nested Comments models. 117 | * If deletion is successful, the browser will be redirected to the 'index' page. 118 | * @param integer $id 119 | * @return mixed 120 | */ 121 | public function actionDelete($id) 122 | { 123 | $model = $this->findModel($id)->delete(); 124 | 125 | if ($model) { 126 | $commentClass = CommentsModule::getInstance()->commentModelClass; 127 | if (($nestedComments = $commentClass::find()->where(['main_parent_id' => $id])->all()) !== null) { 128 | foreach ($nestedComments as $nestedComment) { 129 | $nestedComment->delete(); 130 | } 131 | } 132 | } 133 | 134 | return $this->redirect(['index']); 135 | } 136 | 137 | /** 138 | * Finds the Comments model based on its primary key value. 139 | * If the model is not found, a 404 HTTP exception will be thrown. 140 | * @param integer $id 141 | * @return mixed the loaded model 142 | * @throws NotFoundHttpException 143 | */ 144 | protected function findModel($id) 145 | { 146 | $commentClass = CommentsModule::getInstance()->commentModelClass; 147 | if (($model = $commentClass::findOne($id)) !== null) { 148 | return $model; 149 | } else { 150 | throw new NotFoundHttpException('The requested page does not exist.'); 151 | } 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /src/helpers/CommentsHelper.php: -------------------------------------------------------------------------------- 1 | getSecurity()->encryptByKey( 46 | Json::encode($decryptedData), CommentsModule::getInstance()->id 47 | ) 48 | ); 49 | } 50 | 51 | /** 52 | * Decrypt data 53 | * @param $encryptedData 54 | * @return mixed 55 | * @throws BadRequestHttpException 56 | */ 57 | public static function decryptData($encryptedData) 58 | { 59 | $decryptedData = Yii::$app->getSecurity()->decryptByKey( 60 | utf8_decode($encryptedData), CommentsModule::getInstance()->id 61 | ); 62 | 63 | if ($decryptedData !== false) { 64 | return Json::decode($decryptedData); 65 | } 66 | 67 | throw new BadRequestHttpException(Yii::t('comments', 'Sorry, something went wrong. Please try again later.')); 68 | } 69 | 70 | /** 71 | * Set username in session and cookies 72 | * @param $username 73 | */ 74 | public static function setUsername($username) 75 | { 76 | Yii::$app->session[CommentsModule::getInstance()->guestUsernameSessionKey] = $username; 77 | if (CommentsModule::getInstance()->guestCookieDuration) { 78 | $cookies = Yii::$app->response->cookies; 79 | $cookies->add(new \yii\web\Cookie([ 80 | 'name' => CommentsModule::getInstance()->guestUsernameCookieName, 81 | 'expire' => time() + (int)CommentsModule::getInstance()->guestCookieDuration, 82 | 'value' => $username, 83 | ])); 84 | } 85 | } 86 | 87 | /** 88 | * Get username from session or cookies 89 | * @return mixed|null 90 | */ 91 | public static function getUsername() 92 | { 93 | $username = Yii::$app->session->get(CommentsModule::getInstance()->guestUsernameSessionKey); 94 | 95 | if ($username === null) { 96 | $cookies = Yii::$app->request->cookies; 97 | if ($username === null && $cookies->has(CommentsModule::getInstance()->guestUsernameCookieName)) { 98 | $username = !empty($cookies[CommentsModule::getInstance()->guestUsernameCookieName]->value) ? 99 | $cookies[CommentsModule::getInstance()->guestUsernameCookieName]->value : null; 100 | } 101 | } 102 | 103 | return $username; 104 | } 105 | 106 | /** 107 | * Set email in session and cookies 108 | * @param $email 109 | */ 110 | public static function setEmail($email) 111 | { 112 | Yii::$app->session[CommentsModule::getInstance()->guestEmailSessionKey] = $email; 113 | if (CommentsModule::getInstance()->guestCookieDuration) { 114 | $cookies = Yii::$app->response->cookies; 115 | $cookies->add(new \yii\web\Cookie([ 116 | 'name' => CommentsModule::getInstance()->guestEmailCookieName, 117 | 'expire' => time() + (int)CommentsModule::getInstance()->guestCookieDuration, 118 | 'value' => $email, 119 | ])); 120 | } 121 | } 122 | 123 | /** 124 | * Get email from session or cookies 125 | * @return mixed|null 126 | */ 127 | public static function getEmail() 128 | { 129 | $email = Yii::$app->session->get(CommentsModule::getInstance()->guestEmailSessionKey); 130 | 131 | if ($email === null) { 132 | $cookies = Yii::$app->request->cookies; 133 | if ($email === null && $cookies->has(CommentsModule::getInstance()->guestEmailCookieName)) { 134 | $email = !empty($cookies[CommentsModule::getInstance()->guestEmailCookieName]->value) ? 135 | $cookies[CommentsModule::getInstance()->guestEmailCookieName]->value : null; 136 | } 137 | } 138 | 139 | return $email; 140 | } 141 | 142 | /** 143 | * Get uprated comments 144 | * @return null|string 145 | */ 146 | public static function getUprated() 147 | { 148 | $cookies = Yii::$app->request->cookies; 149 | if ($cookies->has(CommentsModule::getInstance()->upRatedCookieName)) { 150 | return !empty($cookies[CommentsModule::getInstance()->upRatedCookieName]->value) ? 151 | $cookies[CommentsModule::getInstance()->upRatedCookieName]->value : null; 152 | } 153 | 154 | return null; 155 | } 156 | 157 | /** 158 | * Check if comment is rated by user 159 | * @param $id 160 | * @return bool 161 | */ 162 | public static function isUprated($id) 163 | { 164 | $uprated = self::getUprated(); 165 | $uprated_arr = explode(',', $uprated); 166 | if (in_array($id, $uprated_arr)) { 167 | return true; 168 | } 169 | 170 | return false; 171 | } 172 | 173 | /** 174 | * Set uprated comment 175 | * @param $id 176 | */ 177 | public static function setUprated($id) 178 | { 179 | if (CommentsModule::getInstance()->ratingCookieDuration) { 180 | $cookies = Yii::$app->response->cookies; 181 | $uprated = self::getUprated(); 182 | 183 | if ($uprated === null) { 184 | $uprated = $id; 185 | } else { 186 | $uprated_arr = explode(',', $uprated); 187 | if (!in_array($id, $uprated_arr)) { 188 | array_push($uprated_arr, $id); 189 | } 190 | 191 | $uprated = implode(',', $uprated_arr); 192 | } 193 | 194 | $cookies->add(new \yii\web\Cookie([ 195 | 'name' => CommentsModule::getInstance()->upRatedCookieName, 196 | 'expire' => time() + (int)CommentsModule::getInstance()->ratingCookieDuration, 197 | 'value' => $uprated, 198 | ])); 199 | } 200 | } 201 | 202 | /** 203 | * Delete uprated comment 204 | * @param $id 205 | */ 206 | public static function deleteUprated($id) 207 | { 208 | if (CommentsModule::getInstance()->ratingCookieDuration) { 209 | $cookies = Yii::$app->response->cookies; 210 | $uprated = self::getUprated(); 211 | 212 | $uprated_arr = explode(',', $uprated); 213 | if (($key = array_search($id, $uprated_arr)) !== false) { 214 | unset($uprated_arr[$key]); 215 | } 216 | 217 | $uprated = implode(',', $uprated_arr); 218 | $cookies->add(new \yii\web\Cookie([ 219 | 'name' => CommentsModule::getInstance()->upRatedCookieName, 220 | 'expire' => time() + (int)CommentsModule::getInstance()->ratingCookieDuration, 221 | 'value' => $uprated, 222 | ])); 223 | } 224 | } 225 | 226 | /** 227 | * Get downrated comments 228 | * @return null|string 229 | */ 230 | public static function getDownrated() 231 | { 232 | $cookies = Yii::$app->request->cookies; 233 | if ($cookies->has(CommentsModule::getInstance()->downRatedCookieName)) { 234 | return !empty($cookies[CommentsModule::getInstance()->downRatedCookieName]->value) ? 235 | $cookies[CommentsModule::getInstance()->downRatedCookieName]->value : null; 236 | } 237 | 238 | return null; 239 | } 240 | 241 | /** 242 | * Check if comment is downrated by user 243 | * @param $id 244 | * @return bool 245 | */ 246 | public static function isDownrated($id) 247 | { 248 | $downrated = self::getDownrated(); 249 | $downrated_arr = explode(',', $downrated); 250 | if (in_array($id, $downrated_arr)) { 251 | return true; 252 | } 253 | 254 | return false; 255 | } 256 | 257 | /** 258 | * Set downrated comment 259 | * @param $id 260 | */ 261 | public static function setDownrated($id) 262 | { 263 | if (CommentsModule::getInstance()->ratingCookieDuration) { 264 | $cookies = Yii::$app->response->cookies; 265 | $downrated = self::getDownrated(); 266 | 267 | if ($downrated === null) { 268 | $downrated = $id; 269 | } else { 270 | $downrated_arr = explode(',', $downrated); 271 | if (!in_array($id, $downrated_arr)) { 272 | array_push($downrated_arr, $id); 273 | } 274 | 275 | $downrated = implode(',', $downrated_arr); 276 | } 277 | 278 | $cookies->add(new \yii\web\Cookie([ 279 | 'name' => CommentsModule::getInstance()->downRatedCookieName, 280 | 'expire' => time() + (int)CommentsModule::getInstance()->ratingCookieDuration, 281 | 'value' => $downrated, 282 | ])); 283 | } 284 | } 285 | 286 | /** 287 | * Delete downrated comment 288 | * @param $id 289 | */ 290 | public static function deleteDownrated($id) 291 | { 292 | if (CommentsModule::getInstance()->ratingCookieDuration) { 293 | $cookies = Yii::$app->response->cookies; 294 | $downrated = self::getDownrated(); 295 | 296 | $downrated_arr = explode(',', $downrated); 297 | if (($key = array_search($id, $downrated_arr)) !== false) { 298 | unset($downrated_arr[$key]); 299 | } 300 | 301 | $downrated = implode(',', $downrated_arr); 302 | $cookies->add(new \yii\web\Cookie([ 303 | 'name' => CommentsModule::getInstance()->downRatedCookieName, 304 | 'expire' => time() + (int)CommentsModule::getInstance()->ratingCookieDuration, 305 | 'value' => $downrated, 306 | ])); 307 | } 308 | } 309 | 310 | /** 311 | * Build comments tree 312 | * @param $comments 313 | * @param int $parentId 314 | * @return array 315 | */ 316 | public static function buildCommentsTree(&$comments, $parentId = 0) 317 | { 318 | $tree = []; 319 | 320 | foreach ($comments as &$comment) { 321 | if ($comment->parent_id == $parentId) { 322 | $children = self::buildCommentsTree($comments, $comment->id); 323 | if ($children) { 324 | $comment->children = $children; 325 | } 326 | $tree[$comment->id] = $comment; 327 | unset($comment); 328 | } 329 | } 330 | 331 | return $tree; 332 | } 333 | 334 | /** 335 | * Get cache properties 336 | * @param $tag 337 | * @param int $duration 338 | * @return array 339 | */ 340 | public static function getCacheProperties($tag, $duration = 3600) 341 | { 342 | return [ 343 | 'duration' => $duration, 344 | 'variations' => [ 345 | Yii::$app->language, 346 | Url::current() 347 | ], 348 | 'dependency' => [ 349 | 'class' => 'yii\caching\TagDependency', 350 | 'tags' => $tag 351 | ] 352 | ]; 353 | } 354 | } -------------------------------------------------------------------------------- /src/messages/ro/comments.php: -------------------------------------------------------------------------------- 1 | Log in to post a comment.' => 'Conectați-vă pentru a posta un comentariu.', 4 | 'Sorry, something went wrong. Please try again later.' => 'Ne pare rău, ceva a mers prost. Vă rugăm să încercați mai târziu.', 5 | 'Comment rating has been updated successfully.' => 'Ratingul comentariului a fost actualizat cu succes.', 6 | 'Comment has been added successfully.' => 'Comentariul a fost adăugat cu succes.', 7 | 'Be the first to comment.' => 'Fii primul care comentează.', 8 | 'Comments' => 'Comentarii', 9 | 'Share your thoughts...' => 'Împărtăşeşte-ţi gândurile...', 10 | 'Name' => 'Nume', 11 | 'Email' => 'Email', 12 | 'Cancel' => 'Anulează', 13 | 'Reply' => 'Răspunde', 14 | 'Post' => 'Publică', 15 | 'Hide' => 'Ascunde', 16 | 'As' => 'Ca' 17 | ]; -------------------------------------------------------------------------------- /src/messages/ru/comments.php: -------------------------------------------------------------------------------- 1 | Log in to post a comment.' => 'Войдите, чтобы оставить комментарий.', 4 | 'Sorry, something went wrong. Please try again later.' => 'К сожалению, что-то пошло не так. Пожалуйста, повторите попытку позже.', 5 | 'Comment rating has been updated successfully.' => 'Рейтинг комментариев обновлен.', 6 | 'Comment has been added successfully.' => 'Комментарий был успешно добавлен.', 7 | 'Be the first to comment.' => 'Оставьте первый комментарий.', 8 | 'Comments' => 'Коментарии', 9 | 'Share your thoughts...' => 'Поделитесь своими мыслями...', 10 | 'Name' => 'Имя', 11 | 'Email' => 'Эл. адрес', 12 | 'Cancel' => 'Отмена', 13 | 'Reply' => 'Ответить', 14 | 'Post' => 'Опубликовать', 15 | 'Hide' => 'Скрыть', 16 | 'As' => 'Как' 17 | ]; -------------------------------------------------------------------------------- /src/migrations/m161126_113528_comments.php: -------------------------------------------------------------------------------- 1 | db->driverName === 'mysql') { 15 | $this->tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; 16 | } 17 | 18 | $this->createTable('{{%comments}}', [ 19 | 20 | 'id' => Schema::TYPE_PK, 21 | 'url' => $this->string(255), 22 | 'model' => $this->string(64), 23 | 'model_key' => $this->string(64), 24 | 'main_parent_id' => $this->integer(), 25 | 'parent_id' => $this->integer(), 26 | 'email' => $this->string(128), 27 | 'username' => $this->string(128), 28 | 'content' => $this->text(), 29 | 'language' => $this->string(10), 30 | 'created_by' => $this->integer(), 31 | 'updated_by' => $this->integer(), 32 | 'created_at' => $this->integer(), 33 | 'updated_at' => $this->integer(), 34 | 'ip' => $this->string(46), 35 | 'status' => $this->smallInteger(1)->notNull()->defaultValue(1)->comment(' 36 | 0-pending, 37 | 1-published, 38 | 2-spam 39 | '), 40 | 41 | ], $this->tableOptions); 42 | 43 | $this->createIndex('comments_url1_idx', '{{%comments}}', 'url'); 44 | $this->createIndex('comments_model2_idx', '{{%comments}}', 'model'); 45 | $this->createIndex('comments_model_key3_idx', '{{%comments}}', 'model_key'); 46 | } 47 | 48 | public function down() 49 | { 50 | $this->dropTable('{{%comments}}'); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/migrations/m170222_120908_comments_rating.php: -------------------------------------------------------------------------------- 1 | db->driverName === 'mysql') { 15 | $this->tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; 16 | } 17 | 18 | $this->createTable('{{%comments_rating}}', [ 19 | 20 | 'id' => Schema::TYPE_PK, 21 | 'comment_id' => $this->integer(), 22 | 'created_by' => $this->integer(), 23 | 'updated_by' => $this->integer(), 24 | 'created_at' => $this->integer(), 25 | 'updated_at' => $this->integer(), 26 | 'ip' => $this->string(46), 27 | 'status' => $this->smallInteger(1)->notNull()->comment(' 28 | 1-like, 29 | 2-dislike, 30 | '), 31 | 32 | ], $this->tableOptions); 33 | 34 | $this->createIndex('comments_rating_comment_id1_idx', '{{%comments_rating}}', 'comment_id'); 35 | $this->createIndex('comments_rating_status2_idx', '{{%comments_rating}}', 'status'); 36 | $this->addForeignKey( 37 | 'comments_rating_fidkey', '{{%comments_rating}}', 'comment_id', '{{%comments}}', 'id', 'CASCADE', 'CASCADE' 38 | ); 39 | } 40 | 41 | public function down() 42 | { 43 | $this->dropTable('{{%comments_rating}}'); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/models/Comments.php: -------------------------------------------------------------------------------- 1 | [ 98 | 'class' => BlameableBehavior::className(), 99 | 'createdByAttribute' => 'created_by', 100 | 'updatedByAttribute' => 'updated_by', 101 | ], 102 | 'timestamp' => [ 103 | 'class' => TimestampBehavior::className(), 104 | 'attributes' => [ 105 | ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'], 106 | ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'], 107 | ] 108 | ] 109 | ]; 110 | } 111 | 112 | /** 113 | * @inheritdoc 114 | */ 115 | public function scenarios() 116 | { 117 | $scenarios = parent::scenarios(); 118 | 119 | $scenarios[self::SCENARIO_GUEST] = ['username', 'email', 'content', 'parent_id']; 120 | $scenarios[self::SCENARIO_USER] = ['content', 'parent_id']; 121 | 122 | return $scenarios; 123 | } 124 | 125 | /** 126 | * @inheritdoc 127 | */ 128 | public function rules() 129 | { 130 | return [ 131 | [['content'], 'required'], 132 | [['username', 'email'], 'required', 'on' => self::SCENARIO_GUEST], 133 | [['main_parent_id', 'created_by', 'updated_by', 'created_at', 'updated_at', 'status'], 'integer'], 134 | [['parent_id'], function ($attribute, $params, $validator) { 135 | $parent_id = CommentsHelper::decodeId($this->$attribute); 136 | if ((!intval($parent_id)) || (!self::find()->where(['id' => $parent_id])->exists())) { 137 | $this->addError( 138 | $attribute, Yii::t('comments', 'Sorry, something went wrong. Please try again later.') 139 | ); 140 | } 141 | }, 'on' => [ 142 | self::SCENARIO_GUEST, 143 | self::SCENARIO_USER 144 | ]], 145 | [['ip'], 'ip'], 146 | [['ip'], 'string', 'max' => 46], 147 | [['url'], 'string', 'max' => 255], 148 | [['language'], 'string', 'max' => 10], 149 | [['model', 'model_key'], 'string', 'max' => 64], 150 | [['email', 'username'], 'string', 'max' => 128], 151 | [['username', 'content'], 'string', 'min' => 4], 152 | ['username', 'match', 153 | 'pattern' => $this->usernameRegexp, 154 | 'on' => self::SCENARIO_GUEST 155 | ], 156 | ['username', 'match', 157 | 'not' => true, 158 | 'pattern' => $this->usernameBlackRegexp, 159 | 'on' => self::SCENARIO_GUEST 160 | ], 161 | ['username', 'unique', 162 | 'targetClass' => CommentsModule::getInstance()->userModel, 163 | 'targetAttribute' => 'username', 164 | 'on' => self::SCENARIO_GUEST, 165 | ], 166 | [['email'], 'email'], 167 | [['content', 'url', 'model', 'model_key'], 'filter', 'filter' => 'yii\helpers\HtmlPurifier::process'], 168 | ]; 169 | } 170 | 171 | /** 172 | * @return \yii\db\ActiveQuery 173 | */ 174 | public function getRating() 175 | { 176 | return $this->hasMany(CommentsModule::getInstance()->commentRatingModelClass, ['comment_id' => 'id']); 177 | } 178 | 179 | /** 180 | * Declares new relation based on 'rating', which provides aggregation. 181 | * @return \yii\db\ActiveQuery 182 | */ 183 | public function getRatingAggregation() 184 | { 185 | return $this->getRating()->select( 186 | [ 187 | 'comment_id', 188 | 'likes' => 'SUM(CASE status when 1 then 1 else 0 end)', 189 | 'dislikes' => 'SUM(CASE status when 2 then 1 else 0 end)' 190 | ] 191 | )->groupBy('comment_id')->asArray(true); 192 | } 193 | 194 | /** 195 | * Get rating based on module settings. 196 | * @return int|null 197 | */ 198 | public function getRatingCounter() 199 | { 200 | if ($this->isNewRecord) { 201 | return null; 202 | } 203 | 204 | if (!empty($this->ratingAggregation)) { 205 | return $this->ratingAggregation[0]['likes'] - $this->ratingAggregation[0]['dislikes']; 206 | } 207 | 208 | return 0; 209 | } 210 | 211 | /** 212 | * @return \yii\db\ActiveQuery 213 | */ 214 | public function getAuthor() 215 | { 216 | return $this->hasOne(CommentsModule::getInstance()->userModel, ['id' => 'created_by']); 217 | } 218 | 219 | /** 220 | * @return \yii\db\ActiveQuery 221 | */ 222 | public function getLastUpdateAuthor() 223 | { 224 | return $this->hasOne(CommentsModule::getInstance()->userModel, ['id' => 'updated_by']); 225 | } 226 | 227 | /** 228 | * Get author name. 229 | * @return mixed 230 | */ 231 | public function getAuthorName() 232 | { 233 | if ($this->author !== null) { 234 | if ($this->author->hasMethod('getUsername')) { 235 | return $this->author->getUsername(); 236 | } 237 | 238 | return $this->author->username; 239 | } 240 | 241 | return $this->username; 242 | } 243 | 244 | /** 245 | * Get author avatar. 246 | * @return null 247 | */ 248 | public function getAuthorAvatar() 249 | { 250 | if ($this->author !== null) { 251 | if ($this->author->hasMethod('getAvatar')) { 252 | return $this->author->getAvatar(); 253 | } 254 | } 255 | 256 | return null; 257 | } 258 | 259 | /** 260 | * Get link options for author url. 261 | * Return example: 262 | * ~~~ 263 | * return [ 264 | * '/profile', 'id' => $this->id 265 | * ]; 266 | * ~~~ 267 | * 268 | * @return null|array 269 | */ 270 | public function getAuthorUrl() 271 | { 272 | if ($this->author !== null) { 273 | if ($this->author->hasMethod('getUrl')) { 274 | return $this->author->getUrl(); 275 | } 276 | } 277 | 278 | return null; 279 | } 280 | 281 | /** 282 | * @return string 283 | */ 284 | public function getPostedDate() 285 | { 286 | return Yii::$app->formatter->asRelativeTime($this->created_at); 287 | } 288 | 289 | /** 290 | * Get counter for total number of comments 291 | * @param $params 292 | * @return CommentsQuery 293 | */ 294 | public static function getCommentsCounter($params) 295 | { 296 | if ($params['model'] !== null) { 297 | $models = self::find()->byModel([ 298 | 'model' => $params['model'], 299 | 'model_key' => $params['model_key'] 300 | ]); 301 | } else { 302 | $models = self::find()->byUrl([ 303 | 'url' => $params['url'] 304 | ]); 305 | } 306 | 307 | return $models; 308 | } 309 | 310 | /** 311 | * Get comments by model or url 312 | * @param $params 313 | * @return CommentsQuery 314 | */ 315 | public static function getComments($params) 316 | { 317 | if ($params['model'] !== null) { 318 | $models = self::find($params)->byModel([ 319 | 'model' => $params['model'], 320 | 'model_key' => $params['model_key'] 321 | ])->withoutChildren()->with('author', 'ratingAggregation'); 322 | } else { 323 | $models = self::find($params)->byUrl([ 324 | 'url' => $params['url'] 325 | ])->withoutChildren()->with('author', 'ratingAggregation'); 326 | } 327 | 328 | return $models; 329 | } 330 | 331 | /** 332 | * Check if comment has children 333 | * @return bool 334 | */ 335 | public function hasChildren() 336 | { 337 | return !empty($this->children); 338 | } 339 | 340 | /** 341 | * Get children comment 342 | * @return mixed 343 | */ 344 | public function getChildren() 345 | { 346 | return $this->children; 347 | } 348 | 349 | /** 350 | * Set children comment 351 | * @param $value 352 | */ 353 | public function setChildren($value) 354 | { 355 | $this->children = $value; 356 | } 357 | 358 | /** 359 | * @inheritdoc 360 | * @param bool $insert 361 | * @return bool 362 | */ 363 | public function beforeSave($insert) 364 | { 365 | if (parent::beforeSave($insert)) { 366 | if ($this->hasAttribute('status')) { 367 | if ($this->getAttribute('status') === null) { 368 | $this->setAttribute('status', $this->newCommentStatus); 369 | } 370 | } 371 | 372 | if ($this->hasAttribute('language')) { 373 | if ($this->getAttribute('language') === null) { 374 | $this->setAttribute('language', Yii::$app->language); 375 | } 376 | } 377 | 378 | if ($this->hasAttribute('ip')) { 379 | if ($this->getAttribute('ip') === null) { 380 | $this->setAttribute('ip', Yii::$app->request->getUserIP()); 381 | } 382 | } 383 | 384 | if ($this->hasAttribute('main_parent_id') && $this->hasAttribute('parent_id')) { 385 | if ($this->scenario !== 'default') { 386 | $parent_id = CommentsHelper::decodeId($this->getAttribute('parent_id')); 387 | if ($parent_id !== null && $parent_id) { 388 | $parent = self::find()->where(['id' => $parent_id])->select('main_parent_id')->one(); 389 | $main_parent_id = isset($parent->main_parent_id) ? $parent->main_parent_id : $parent_id; 390 | $this->setAttribute('main_parent_id', $main_parent_id); 391 | $this->setAttribute('parent_id', $parent_id); 392 | } 393 | } 394 | } 395 | 396 | return true; 397 | } 398 | 399 | return false; 400 | } 401 | 402 | /** 403 | * @inheritdoc 404 | * @param null $params 405 | * @return CommentsQuery the active query used by this AR class. 406 | */ 407 | public static function find($params = null) 408 | { 409 | $query = Yii::createObject(self::$commentsQueryModelClass, [get_called_class()]); 410 | 411 | if ($params) { 412 | $query->loadParams = $params; 413 | } 414 | 415 | return $query; 416 | } 417 | 418 | /** 419 | * @inheritdoc 420 | */ 421 | public function attributeLabels() 422 | { 423 | if ($this->scenario === null) { 424 | return [ 425 | 'id' => Yii::t('comments', 'ID'), 426 | 'url' => Yii::t('comments', 'Url'), 427 | 'model' => Yii::t('comments', 'Model'), 428 | 'model_key' => Yii::t('comments', 'Model Key'), 429 | 'main_parent_id' => Yii::t('comments', 'Main Parent ID'), 430 | 'parent_id' => Yii::t('comments', 'Parent ID'), 431 | 'email' => Yii::t('comments', 'Email'), 432 | 'username' => Yii::t('comments', 'Name'), 433 | 'content' => Yii::t('comments', 'Content'), 434 | 'language' => Yii::t('comments', 'Language'), 435 | 'created_by' => Yii::t('comments', 'Created By'), 436 | 'updated_by' => Yii::t('comments', 'Updated By'), 437 | 'created_at' => Yii::t('comments', 'Created At'), 438 | 'updated_at' => Yii::t('comments', 'Updated At'), 439 | 'ip' => Yii::t('comments', 'Ip'), 440 | 'status' => Yii::t('comments', ' 441 | 0-pending, 442 | 1-published, 443 | 2-spam 444 | '), 445 | ]; 446 | } else { 447 | return [ 448 | 'email' => Yii::t('comments', 'Email'), 449 | 'username' => Yii::t('comments', 'Name'), 450 | 'content' => Yii::t('comments', 'Share your thoughts...') 451 | ]; 452 | } 453 | } 454 | } 455 | -------------------------------------------------------------------------------- /src/models/CommentsQuery.php: -------------------------------------------------------------------------------- 1 | _params; 29 | } 30 | 31 | /** 32 | * @param $params 33 | */ 34 | public function setLoadParams($params) 35 | { 36 | $this->_params = $params; 37 | } 38 | 39 | /** 40 | * Select by model 41 | * @param $params 42 | * @return $this 43 | */ 44 | public function byModel($params) 45 | { 46 | $commentClass = CommentsModule::getInstance()->commentModelClass; 47 | 48 | return $this->andWhere([ 49 | 'model' => $params['model'], 50 | 'model_key' => $params['model_key'], 51 | 'language' => Yii::$app->language, 52 | 'status' => $commentClass::STATUS_PUBLISHED, 53 | ]); 54 | } 55 | 56 | /** 57 | * Select by url 58 | * @param $params 59 | * @return $this 60 | */ 61 | public function byUrl($params) 62 | { 63 | $commentClass = CommentsModule::getInstance()->commentModelClass; 64 | 65 | return $this->andWhere([ 66 | 'url' => $params['url'], 67 | 'language' => Yii::$app->language, 68 | 'status' => $commentClass::STATUS_PUBLISHED, 69 | ]); 70 | } 71 | 72 | /** 73 | * Select without children 74 | * @return $this 75 | */ 76 | public function withoutChildren() 77 | { 78 | return $this->andWhere([ 79 | 'main_parent_id' => null 80 | ]); 81 | } 82 | 83 | /** 84 | * @inheritdoc 85 | * @return Comments|array|null 86 | */ 87 | public function one($db = null) 88 | { 89 | return parent::one($db); 90 | } 91 | 92 | /** 93 | * @inheritdoc 94 | * @param null $db 95 | * @return array|\yii\db\ActiveRecord[] 96 | */ 97 | public function all($db = null) 98 | { 99 | $result = parent::all($db); 100 | 101 | if (!isset($this->loadParams['loadComments']) || $this->loadParams['loadComments'] !== true) { 102 | return $result; 103 | } 104 | 105 | $ids = []; 106 | foreach ($result as $model) { 107 | $ids[] = $model->id; 108 | } 109 | 110 | $parentsId = implode(',', $ids); 111 | if (!empty($parentsId)) { 112 | $commentClass = CommentsModule::getInstance()->commentModelClass; 113 | $nestedComments = $commentClass::find()->where("main_parent_id IN ($parentsId)")->orderBy([ 114 | 'created_at' => isset($this->loadParams['nestedOrder']) ? $this->loadParams['nestedOrder'] : null, 115 | ])->all(); 116 | 117 | if (!empty($nestedComments)) { 118 | $mergedComments = array_merge($result, $nestedComments); 119 | $result = CommentsHelper::buildCommentsTree($mergedComments); 120 | } 121 | } 122 | 123 | return $result; 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /src/models/CommentsRating.php: -------------------------------------------------------------------------------- 1 | [ 61 | 'class' => BlameableBehavior::className(), 62 | 'createdByAttribute' => 'created_by', 63 | 'updatedByAttribute' => 'updated_by', 64 | ], 65 | 'timestamp' => [ 66 | 'class' => TimestampBehavior::className(), 67 | 'attributes' => [ 68 | ActiveRecord::EVENT_BEFORE_INSERT => ['created_at', 'updated_at'], 69 | ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at'], 70 | ] 71 | ] 72 | ]; 73 | } 74 | 75 | /** 76 | * @inheritdoc 77 | */ 78 | public function scenarios() 79 | { 80 | $scenarios = parent::scenarios(); 81 | 82 | $scenarios[self::SCENARIO_SAVE] = ['comment_id', 'status']; 83 | $scenarios[self::SCENARIO_UPDATE] = ['comment_id', 'status']; 84 | $scenarios[self::SCENARIO_DELETE] = ['comment_id', 'status']; 85 | 86 | return $scenarios; 87 | } 88 | 89 | /** 90 | * @inheritdoc 91 | */ 92 | public function rules() 93 | { 94 | return [ 95 | [['comment_id', 'status'], 'required'], 96 | [['created_by', 'updated_by', 'created_at', 'updated_at', 'status'], 'integer'], 97 | [['comment_id'], function ($attribute, $params, $validator) { 98 | if ($this->scenario === self::SCENARIO_UPDATE) { 99 | $comment_id = $this->$attribute; 100 | } else { 101 | $comment_id = CommentsHelper::decodeId($this->$attribute); 102 | } 103 | $commentClass = CommentsModule::getInstance()->commentModelClass; 104 | if ((!intval($comment_id)) || (!$commentClass::find()->where(['id' => $comment_id])->exists())) { 105 | $this->addError( 106 | $attribute, Yii::t('comments', 'Sorry, something went wrong. Please try again later.') 107 | ); 108 | } 109 | }], 110 | [['ip'], 'ip'], 111 | [['ip'], 'string', 'max' => 46] 112 | ]; 113 | } 114 | 115 | /** 116 | * @inheritdoc 117 | */ 118 | public function beforeSave($insert) 119 | { 120 | if (parent::beforeSave($insert)) { 121 | if ($this->hasAttribute('ip')) { 122 | if ($this->getAttribute('ip') === null) { 123 | $this->setAttribute('ip', Yii::$app->request->getUserIP()); 124 | } 125 | } 126 | 127 | if ($this->hasAttribute('comment_id')) { 128 | $comment_id = $this->getAttribute('comment_id'); 129 | if ($comment_id !== null) { 130 | if ($this->scenario === self::SCENARIO_UPDATE) { 131 | $this->setAttribute('comment_id', $comment_id); 132 | } else { 133 | $this->setAttribute('comment_id', CommentsHelper::decodeId($comment_id)); 134 | } 135 | } 136 | } 137 | 138 | return true; 139 | } else { 140 | return false; 141 | } 142 | } 143 | 144 | /** 145 | * @inheritdoc 146 | * @return object CommentsRatingQuery the active query used by this AR class. 147 | */ 148 | public static function find() 149 | { 150 | return Yii::createObject(self::$commentRatingQueryModelClass, [get_called_class()]); 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /src/models/CommentsRatingQuery.php: -------------------------------------------------------------------------------- 1 | commentModelClass; 58 | $query = $commentClass::find(); 59 | 60 | // add conditions that should always apply here 61 | 62 | $dataProvider = new ActiveDataProvider([ 63 | 'query' => $query, 64 | ]); 65 | 66 | $this->load($params); 67 | 68 | if (!$this->validate()) { 69 | // uncomment the following line if you do not want to return any records when validation fails 70 | // $query->where('0=1'); 71 | return $dataProvider; 72 | } 73 | 74 | // grid filtering conditions 75 | $query->andFilterWhere([ 76 | 'id' => $this->id, 77 | 'main_parent_id' => $this->main_parent_id, 78 | 'parent_id' => $this->parent_id, 79 | 'created_by' => $this->created_by, 80 | 'updated_by' => $this->updated_by, 81 | 'created_at' => $this->created_at, 82 | 'updated_at' => $this->updated_at, 83 | 'status' => $this->status, 84 | ]); 85 | 86 | $query->andFilterWhere(['like', 'url', $this->url]) 87 | ->andFilterWhere(['like', 'model', $this->model]) 88 | ->andFilterWhere(['like', 'model_key', $this->model_key]) 89 | ->andFilterWhere(['like', 'email', $this->email]) 90 | ->andFilterWhere(['like', 'username', $this->username]) 91 | ->andFilterWhere(['like', 'content', $this->content]) 92 | ->andFilterWhere(['like', 'language', $this->language]) 93 | ->andFilterWhere(['like', 'ip', $this->ip]); 94 | 95 | return $dataProvider; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/views/manage/index.php: -------------------------------------------------------------------------------- 1 | title = Yii::t('comments', 'Comments'); 12 | $this->params['breadcrumbs'][] = $this->title; 13 | ?> 14 |
18 | = Html::a(Yii::t('comments', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> 19 | = Html::a(Yii::t('comments', 'Delete'), ['delete', 'id' => $model->id], [ 20 | 'class' => 'btn btn-danger', 21 | 'data' => [ 22 | 'confirm' => Yii::t('comments', 'Are you sure you want to delete this item?'), 23 | 'method' => 'post', 24 | ], 25 | ]) ?> 26 |
27 | 28 | = DetailView::widget([ 29 | 'model' => $model, 30 | 'attributes' => [ 31 | 'id', 32 | 'url:url', 33 | 'model', 34 | 'model_key', 35 | 'main_parent_id', 36 | 'parent_id', 37 | 'email:email', 38 | 'username', 39 | 'content:ntext', 40 | 'language', 41 | 'created_by', 42 | 'updated_by', 43 | 'created_at', 44 | 'updated_at', 45 | 'ip', 46 | 'status', 47 | ], 48 | ]) ?> 49 | 50 |
= Html::encode($this->title) ?>
17 | 18 | 19 | 20 | = GridView::widget([ 21 | 'dataProvider' => $dataProvider, 22 | 'filterModel' => $searchModel, 23 | 'columns' => [ 24 | ['class' => 'yii\grid\SerialColumn'], 25 | 26 | 'id', 27 | 'content:ntext', 28 | 'url:url', 29 | 'model', 30 | 'model_key', 31 | 'main_parent_id', 32 | // 'parent_id', 33 | // 'email:email', 34 | // 'username', 35 | 36 | // 'language', 37 | // 'created_by', 38 | // 'updated_by', 39 | // 'created_at', 40 | // 'updated_at', 41 | // 'ip', 42 | // 'status', 43 | 44 | ['class' => 'yii\grid\ActionColumn'], 45 | ], 46 | ]); ?> 47 | 48 | 49 | 50 |