Commit 098b35d667ff7893c14c87dfd4075273809a24e3
1 parent
dd15bb0c
закрыл сайт в noindex nofollow
Showing
3 changed files
with
24 additions
and
14 deletions
Show diff stats
backend/views/layouts/menu_items.php
| ... | ... | @@ -31,6 +31,12 @@ |
| 31 | 31 | 'template' => '<a href="{url}"><b class="home"></b><span>{label}</span>{badge}</a>', |
| 32 | 32 | ], |
| 33 | 33 | [ |
| 34 | + 'label' => \Yii::t('core', 'Image manager'), | |
| 35 | + 'url' => [ 'imagemanager' ], | |
| 36 | + 'icon' => 'image', | |
| 37 | + 'template' => '<a href="imagemanager"><b class="static"></b><span>{label}</span>{badge}</a>', | |
| 38 | + ], | |
| 39 | + [ | |
| 34 | 40 | 'label' => \Yii::t('core', 'Pages'), |
| 35 | 41 | 'url' => '#', |
| 36 | 42 | 'template' => '<a href="#"><b class="static"></b><span>{label}</span>{badge}</a>', | ... | ... |
common/config/main.php
| ... | ... | @@ -10,20 +10,22 @@ |
| 10 | 10 | ], |
| 11 | 11 | 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', |
| 12 | 12 | 'modules' => [ |
| 13 | - 'imagemanager' => [ | |
| 14 | - 'class' => 'artbox\core\components\imagemanager\Module', | |
| 15 | - 'canUploadImage' => true, | |
| 16 | - 'canRemoveImage' => function () { | |
| 17 | - return true; | |
| 18 | - }, | |
| 19 | - 'setBlameableBehavior' => false, | |
| 20 | - 'cssFiles' => [ | |
| 21 | - 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css', | |
| 22 | - ], | |
| 23 | - ], | |
| 13 | + # ctrl-c/ctrl-v из garant-service | |
| 14 | + 'imagemanager' => [ | |
| 15 | + 'class' => 'backend\components\imagemanager\Module', | |
| 16 | + 'canUploadImage' => true, | |
| 17 | + 'canRemoveImage' => function () { | |
| 18 | + return true; | |
| 19 | + }, | |
| 20 | + 'setBlameableBehavior' => false, | |
| 21 | + 'cssFiles' => [ | |
| 22 | + 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css', | |
| 23 | + ], | |
| 24 | +], | |
| 24 | 25 | 'rating' => [ |
| 25 | 26 | 'class' => Module::className() |
| 26 | - ] | |
| 27 | + ], | |
| 28 | + | |
| 27 | 29 | ], |
| 28 | 30 | 'components' => [ |
| 29 | 31 | 'cache' => [ | ... | ... |
frontend/controllers/SiteController.php
| ... | ... | @@ -302,10 +302,12 @@ |
| 302 | 302 | 'query' => Comment::find() |
| 303 | 303 | ->where(['status' => true]) |
| 304 | 304 | ->andWhere(['entity' => Service::className()]) |
| 305 | - ->andFilterWhere(['entity_id' => $service_id]),//'SELECT * FROM \"comment\" WHERE (\"status\"=TRUE) AND (\"entity\"=\'common\\models\\Service\')' | |
| 306 | - 'pagination' => [ | |
| 305 | + ->andFilterWhere(['entity_id' => $service_id])//'SELECT * FROM \"comment\" WHERE (\"status\"=TRUE) AND (\"entity\"=\'common\\models\\Service\')' | |
| 306 | + ->orderBy(['id'=>SORT_DESC]), | |
| 307 | + 'pagination' => [ | |
| 307 | 308 | 'pageSize' => 10, |
| 308 | 309 | ], |
| 310 | + | |
| 309 | 311 | ]); |
| 310 | 312 | $services = Service::find()->where(['status' => true])->andWhere(['parent_id' => null])->all(); |
| 311 | 313 | ... | ... |