Commit 3e6486def62086435043fdd28f1ab425c62b48f5

Authored by Alexey Boroda
1 parent 46b1243b

-Gallery attached to core's pages

@@ -34,4 +34,5 @@ phpunit.phar @@ -34,4 +34,5 @@ phpunit.phar
34 # vagrant runtime 34 # vagrant runtime
35 /.vagrant 35 /.vagrant
36 /artweb/ 36 /artweb/
37 -/storage  
38 \ No newline at end of file 37 \ No newline at end of file
  38 +/storage
  39 +/composer.lock
backend/views/layouts/main.php
@@ -6,11 +6,11 @@ @@ -6,11 +6,11 @@
6 */ 6 */
7 7
8 use artbox\core\assets\ArtboxCoreAsset; 8 use artbox\core\assets\ArtboxCoreAsset;
  9 + use artbox\core\components\imagemanager\components\ImageManagerGetPath;
9 use artbox\core\models\User; 10 use artbox\core\models\User;
10 use artbox\core\models\UserData; 11 use artbox\core\models\UserData;
11 use artbox\core\widgets\FeedbackWidget; 12 use artbox\core\widgets\FeedbackWidget;
12 use artbox\core\widgets\FlashWidget; 13 use artbox\core\widgets\FlashWidget;
13 - use noam148\imagemanager\components\ImageManagerGetPath;  
14 use yii\bootstrap\Html; 14 use yii\bootstrap\Html;
15 use yii\web\View; 15 use yii\web\View;
16 use yii\widgets\Breadcrumbs; 16 use yii\widgets\Breadcrumbs;
backend/views/layouts/menu_items.php 100644 → 100755
@@ -31,11 +31,15 @@ @@ -31,11 +31,15 @@
31 ], 31 ],
32 [ 32 [
33 'label' => \Yii::t('core', 'Static pages'), 33 'label' => \Yii::t('core', 'Static pages'),
34 - 'url' => [ 'page/index' ], 34 + 'url' => '#',
35 'icon' => 'file-text', 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 'label' => \Yii::t('core', 'SEO'), 45 'label' => \Yii::t('core', 'SEO'),
@@ -44,17 +48,17 @@ @@ -44,17 +48,17 @@
44 'items' => [ 48 'items' => [
45 [ 49 [
46 'label' => \Yii::t('core', 'Seo pages'), 50 'label' => \Yii::t('core', 'Seo pages'),
47 - 'url' => [ 'alias/index' ], 51 + 'url' => [ '/alias/index' ],
48 'icon' => 'file-text', 52 'icon' => 'file-text',
49 ], 53 ],
50 [ 54 [
51 'label' => \Yii::t('core', 'Robots'), 55 'label' => \Yii::t('core', 'Robots'),
52 - 'url' => [ 'settings/robots' ], 56 + 'url' => [ '/settings/robots' ],
53 'icon' => 'android', 57 'icon' => 'android',
54 ], 58 ],
55 [ 59 [
56 'label' => \Yii::t('core', 'Codes'), 60 'label' => \Yii::t('core', 'Codes'),
57 - 'url' => [ 'settings/codes' ], 61 + 'url' => [ '/settings/codes' ],
58 'icon' => 'code', 62 'icon' => 'code',
59 ], 63 ],
60 [ 64 [
@@ -64,5 +68,10 @@ @@ -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 \ No newline at end of file 78 \ No newline at end of file
backend/views/settings/_main_tab.php
1 <?php 1 <?php
  2 + use artbox\core\components\imagemanager\components\ImageManagerInputWidget;
2 use common\models\Settings; 3 use common\models\Settings;
3 use yii\bootstrap\ActiveForm; 4 use yii\bootstrap\ActiveForm;
4 use yii\web\View; 5 use yii\web\View;
@@ -12,7 +13,7 @@ @@ -12,7 +13,7 @@
12 ->textInput(); 13 ->textInput();
13 echo $form->field($model, 'logo') 14 echo $form->field($model, 'logo')
14 ->widget( 15 ->widget(
15 - \noam148\imagemanager\components\ImageManagerInputWidget::className(), 16 + ImageManagerInputWidget::className(),
16 [ 17 [
17 'showPreview' => true, 18 'showPreview' => true,
18 'showDeletePickedImageConfirm' => false, 19 'showDeletePickedImageConfirm' => false,
common/config/.gitignore
@@ -2,4 +2,4 @@ main-local.php @@ -2,4 +2,4 @@ main-local.php
2 db* 2 db*
3 params-local.php 3 params-local.php
4 test-local.php 4 test-local.php
5 -#settings.php  
6 \ No newline at end of file 5 \ No newline at end of file
  6 +settings.php
7 \ No newline at end of file 7 \ No newline at end of file
common/config/main.php
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor', 5 'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
6 'modules' => [ 6 'modules' => [
7 'imagemanager' => [ 7 'imagemanager' => [
8 - 'class' => 'noam148\imagemanager\Module', 8 + 'class' => 'artbox\core\components\imagemanager\Module',
9 'canUploadImage' => true, 9 'canUploadImage' => true,
10 'canRemoveImage' => function () { 10 'canRemoveImage' => function () {
11 return true; 11 return true;
@@ -45,9 +45,9 @@ @@ -45,9 +45,9 @@
45 'class' => SeoComponent::className(), 45 'class' => SeoComponent::className(),
46 ], 46 ],
47 'imagemanager' => [ 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 'useFilename' => true, 51 'useFilename' => true,
52 'absoluteUrl' => false, 52 'absoluteUrl' => false,
53 ], 53 ],
common/images/13_kkl4mozaMJ8zPlIbqSp_Fn-QoYehLYXV.jpg 100644 → 100755

55.4 KB | W: | H:

55.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
common/images/3_QotMz-N2qttbYPDIacZFaogulUFKe1FX.jpg 100644 → 100755

55.4 KB | W: | H:

55.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
common/images/4_GqOguExNaYGZG64YgbUEmec4xKKAKK8G.jpg 100644 → 100755

76.1 KB | W: | H:

76.1 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
common/images/5_2sVxteui6Xv-mD4vlFCQK0G38FOgqUXO.jpg 100644 → 100755

105 KB | W: | H:

105 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
common/images/6_nBM9N5_kUsjcCkVpJXuwwfWYnOt3N7Um.jpg 100644 → 100755

76.6 KB | W: | H:

76.6 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
common/images/7_SFsnRpreGcM6YJceVbOeAJeJ5PZpxmmo.jpg 100644 → 100755

64.4 KB | W: | H:

64.4 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
common/models/Settings.php
1 <?php 1 <?php
2 namespace common\models; 2 namespace common\models;
3 3
4 - use noam148\imagemanager\models\ImageManager; 4 + use artbox\core\components\imagemanager\models\ImageManager;
5 use yii2tech\filedb\ActiveRecord; 5 use yii2tech\filedb\ActiveRecord;
6 use Yii; 6 use Yii;
7 7
composer.json 100644 → 100755
@@ -18,7 +18,6 @@ @@ -18,7 +18,6 @@
18 "minimum-stability": "stable", 18 "minimum-stability": "stable",
19 "require": { 19 "require": {
20 "php": ">=7.0", 20 "php": ">=7.0",
21 - "artweb/artbox-core": "~0.0.1",  
22 "yiisoft/yii2": "~2.0", 21 "yiisoft/yii2": "~2.0",
23 "yiisoft/yii2-bootstrap": "~2.0", 22 "yiisoft/yii2-bootstrap": "~2.0",
24 "yiisoft/yii2-swiftmailer": "~2.0", 23 "yiisoft/yii2-swiftmailer": "~2.0",
frontend/views/layouts/main.php
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 use artbox\core\models\User; 12 use artbox\core\models\User;
13 use common\models\Settings; 13 use common\models\Settings;
14 use frontend\assets\AppAsset; 14 use frontend\assets\AppAsset;
15 - use noam148\imagemanager\models\ImageManager; 15 + use artbox\core\components\imagemanager\models\ImageManager;
16 use yii\bootstrap\ActiveForm; 16 use yii\bootstrap\ActiveForm;
17 use yii\bootstrap\Nav; 17 use yii\bootstrap\Nav;
18 use yii\bootstrap\Html; 18 use yii\bootstrap\Html;
@@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
78 m.parentNode.insertBefore(a, m) 78 m.parentNode.insertBefore(a, m)
79 })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); 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 ga('send', 'pageview'); 82 ga('send', 'pageview');
83 83
84 </script> 84 </script>