Commit 3e6486def62086435043fdd28f1ab425c62b48f5

Authored by Alexey Boroda
1 parent 46b1243b

-Gallery attached to core's pages

.gitignore
... ... @@ -34,4 +34,5 @@ phpunit.phar
34 34 # vagrant runtime
35 35 /.vagrant
36 36 /artweb/
37   -/storage
38 37 \ No newline at end of file
  38 +/storage
  39 +/composer.lock
... ...
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;
... ...
backend/views/layouts/menu_items.php 100644 → 100755
... ... @@ -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
... ... @@ -2,4 +2,4 @@ main-local.php
2 2 db*
3 3 params-local.php
4 4 test-local.php
5   -#settings.php
6 5 \ No newline at end of file
  6 +settings.php
7 7 \ No newline at end of file
... ...
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/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 1 <?php
2 2 namespace common\models;
3 3  
4   - use noam148\imagemanager\models\ImageManager;
  4 + use artbox\core\components\imagemanager\models\ImageManager;
5 5 use yii2tech\filedb\ActiveRecord;
6 6 use Yii;
7 7  
... ...
composer.json 100644 → 100755
... ... @@ -18,7 +18,6 @@
18 18 "minimum-stability": "stable",
19 19 "require": {
20 20 "php": ">=7.0",
21   - "artweb/artbox-core": "~0.0.1",
22 21 "yiisoft/yii2": "~2.0",
23 22 "yiisoft/yii2-bootstrap": "~2.0",
24 23 "yiisoft/yii2-swiftmailer": "~2.0",
... ...
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>
... ...