Commit 3e6486def62086435043fdd28f1ab425c62b48f5
1 parent
46b1243b
-Gallery attached to core's pages
Showing
15 changed files
with
29 additions
and
19 deletions
Show diff stats
.gitignore
backend/views/layouts/main.php
... | ... | @@ -6,11 +6,11 @@ |
6 | 6 | */ |
7 | 7 | |
8 | 8 | use artbox\core\assets\ArtboxCoreAsset; |
9 | + use artbox\core\components\imagemanager\components\ImageManagerGetPath; | |
9 | 10 | use artbox\core\models\User; |
10 | 11 | use artbox\core\models\UserData; |
11 | 12 | use artbox\core\widgets\FeedbackWidget; |
12 | 13 | use artbox\core\widgets\FlashWidget; |
13 | - use noam148\imagemanager\components\ImageManagerGetPath; | |
14 | 14 | use yii\bootstrap\Html; |
15 | 15 | use yii\web\View; |
16 | 16 | use yii\widgets\Breadcrumbs; | ... | ... |
... | ... | @@ -31,11 +31,15 @@ |
31 | 31 | ], |
32 | 32 | [ |
33 | 33 | 'label' => \Yii::t('core', 'Static pages'), |
34 | - 'url' => [ 'page/index' ], | |
34 | + 'url' => '#', | |
35 | 35 | 'icon' => 'file-text', |
36 | - 'active' => function () { | |
37 | - return \Yii::$app->controller->id === 'page'; | |
38 | - }, | |
36 | + 'items' => [ | |
37 | + [ | |
38 | + 'label' => \Yii::t('core', 'Static pages'), | |
39 | + 'url' => [ '/page/index' ], | |
40 | + 'icon' => 'file-text', | |
41 | + ] | |
42 | + ], | |
39 | 43 | ], |
40 | 44 | [ |
41 | 45 | 'label' => \Yii::t('core', 'SEO'), |
... | ... | @@ -44,17 +48,17 @@ |
44 | 48 | 'items' => [ |
45 | 49 | [ |
46 | 50 | 'label' => \Yii::t('core', 'Seo pages'), |
47 | - 'url' => [ 'alias/index' ], | |
51 | + 'url' => [ '/alias/index' ], | |
48 | 52 | 'icon' => 'file-text', |
49 | 53 | ], |
50 | 54 | [ |
51 | 55 | 'label' => \Yii::t('core', 'Robots'), |
52 | - 'url' => [ 'settings/robots' ], | |
56 | + 'url' => [ '/settings/robots' ], | |
53 | 57 | 'icon' => 'android', |
54 | 58 | ], |
55 | 59 | [ |
56 | 60 | 'label' => \Yii::t('core', 'Codes'), |
57 | - 'url' => [ 'settings/codes' ], | |
61 | + 'url' => [ '/settings/codes' ], | |
58 | 62 | 'icon' => 'code', |
59 | 63 | ], |
60 | 64 | [ |
... | ... | @@ -64,5 +68,10 @@ |
64 | 68 | ], |
65 | 69 | ], |
66 | 70 | ], |
71 | + [ | |
72 | + 'label' => \Yii::t('core', 'Image manager'), | |
73 | + 'url' => [ '/imagemanager' ], | |
74 | + 'icon' => 'image', | |
75 | + ], | |
67 | 76 | ] |
68 | 77 | ); |
69 | 78 | \ No newline at end of file | ... | ... |
backend/views/settings/_main_tab.php
1 | 1 | <?php |
2 | + use artbox\core\components\imagemanager\components\ImageManagerInputWidget; | |
2 | 3 | use common\models\Settings; |
3 | 4 | use yii\bootstrap\ActiveForm; |
4 | 5 | use yii\web\View; |
... | ... | @@ -12,7 +13,7 @@ |
12 | 13 | ->textInput(); |
13 | 14 | echo $form->field($model, 'logo') |
14 | 15 | ->widget( |
15 | - \noam148\imagemanager\components\ImageManagerInputWidget::className(), | |
16 | + ImageManagerInputWidget::className(), | |
16 | 17 | [ |
17 | 18 | 'showPreview' => true, |
18 | 19 | 'showDeletePickedImageConfirm' => false, | ... | ... |
common/config/.gitignore
common/config/main.php
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', |
6 | 6 | 'modules' => [ |
7 | 7 | 'imagemanager' => [ |
8 | - 'class' => 'noam148\imagemanager\Module', | |
8 | + 'class' => 'artbox\core\components\imagemanager\Module', | |
9 | 9 | 'canUploadImage' => true, |
10 | 10 | 'canRemoveImage' => function () { |
11 | 11 | return true; |
... | ... | @@ -45,9 +45,9 @@ |
45 | 45 | 'class' => SeoComponent::className(), |
46 | 46 | ], |
47 | 47 | 'imagemanager' => [ |
48 | - 'class' => 'noam148\imagemanager\components\ImageManagerGetPath', | |
49 | - 'mediaPath' => dirname(dirname(__DIR__)) . '/common/images', | |
50 | - 'cachePath' => 'assets/images', | |
48 | + 'class' => 'artbox\core\components\imagemanager\components\ImageManagerGetPath', | |
49 | + 'mediaPath' => dirname(dirname(__DIR__)) . '/storage', | |
50 | + 'cachePath' => '../../storage/cache', | |
51 | 51 | 'useFilename' => true, |
52 | 52 | 'absoluteUrl' => false, |
53 | 53 | ], | ... | ... |
common/models/Settings.php
frontend/views/layouts/main.php
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | use artbox\core\models\User; |
13 | 13 | use common\models\Settings; |
14 | 14 | use frontend\assets\AppAsset; |
15 | - use noam148\imagemanager\models\ImageManager; | |
15 | + use artbox\core\components\imagemanager\models\ImageManager; | |
16 | 16 | use yii\bootstrap\ActiveForm; |
17 | 17 | use yii\bootstrap\Nav; |
18 | 18 | use yii\bootstrap\Html; |
... | ... | @@ -78,7 +78,7 @@ |
78 | 78 | m.parentNode.insertBefore(a, m) |
79 | 79 | })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); |
80 | 80 | |
81 | - ga('create', <?=$settings->ga_code?>, 'auto'); | |
81 | + ga('create', '<?=$settings->ga_code?>', 'auto'); | |
82 | 82 | ga('send', 'pageview'); |
83 | 83 | |
84 | 84 | </script> | ... | ... |