enjoy_cms_catalog 0.4.0.5 → 0.4.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 382f3f25dff5c8728a76b0ea445cc37f1255b510
4
- data.tar.gz: b059b140107ff7d9abc3f4c21df6c02f42f3a291
3
+ metadata.gz: 07e41f2551400d60d1f0a4c0a677a7e6263323d5
4
+ data.tar.gz: 776f308b49aac629abba13befc9a45a1d996d45f
5
5
  SHA512:
6
- metadata.gz: ccb80ae4af4750ebc881c2c7a9df2c1c1cbc52ed9115d218a1ab0172b91bac09e2e95aa9d966d4cba34c3cf08963087721564dac7bcdf65a6af0c3e4821f127c
7
- data.tar.gz: 488ca326dfc252ec6b2e51d06cdc7e189ca211828d0f728ae75cdb09d6390a78cee5bb18cb12caefbfeae365877ec31fd45663f3d6736547a9352096f992dcaa
6
+ metadata.gz: b8741f153b8c912b4f269a0380cd69f117b36d9d4bd0fe65ba0bee0c6135189b60006c674c8a77073537b197a4aa1e3e1e076b44b49687c92c079784bc4c881a
7
+ data.tar.gz: 7145517b6e0aa95bfb13a9b59e58208e4d35337dda2ba0a1a005e832c50a6207f934507f2dfd6e7a22b2fdbed75da580f1bf4b565999510c7e389e8019b9bf2b
@@ -38,11 +38,12 @@ module Enjoy::Catalog
38
38
  field :text_slug
39
39
  end
40
40
 
41
-
42
- group :image do
43
- active false
44
- field :image, :enjoy_image
45
- field :category_images
41
+ if Enjoy::Catalog.config.gallery_support
42
+ group :image do
43
+ active false
44
+ field :image, :enjoy_image
45
+ field :category_images
46
+ end
46
47
  end
47
48
 
48
49
  group :content do
@@ -52,17 +53,19 @@ module Enjoy::Catalog
52
53
  end
53
54
 
54
55
  Enjoy::RailsAdminGroupPatch::enjoy_cms_group(self, fields)
55
-
56
- group :seo do
57
- active false
58
- field :seo do
59
- active true
56
+
57
+ if Enjoy::Catalog.config.seo_support
58
+ group :seo do
59
+ active false
60
+ field :seo do
61
+ active true
62
+ end
60
63
  end
61
- end
62
- group :sitemap_data do
63
- active false
64
- field :sitemap_data do
65
- active true
64
+ group :sitemap_data do
65
+ active false
66
+ field :sitemap_data do
67
+ active true
68
+ end
66
69
  end
67
70
  end
68
71
 
@@ -47,10 +47,12 @@ module Enjoy::Catalog
47
47
  field :text_slug
48
48
  end
49
49
 
50
- group :image do
51
- active false
52
- field :image, :enjoy_image
53
- field :item_images
50
+ if Enjoy::Catalog.config.gallery_support
51
+ group :image do
52
+ active false
53
+ field :image, :enjoy_image
54
+ field :item_images
55
+ end
54
56
  end
55
57
 
56
58
  group :content do
@@ -61,16 +63,18 @@ module Enjoy::Catalog
61
63
 
62
64
  Enjoy::RailsAdminGroupPatch::enjoy_cms_group(self, fields)
63
65
 
64
- group :seo do
65
- active false
66
- field :seo do
67
- active true
66
+ if Enjoy::Catalog.config.seo_support
67
+ group :seo do
68
+ active false
69
+ field :seo do
70
+ active true
71
+ end
68
72
  end
69
- end
70
- group :sitemap_data do
71
- active false
72
- field :sitemap_data do
73
- active true
73
+ group :sitemap_data do
74
+ active false
75
+ field :sitemap_data do
76
+ active true
77
+ end
74
78
  end
75
79
  end
76
80
  end
@@ -27,9 +27,7 @@ module Enjoy::Catalog
27
27
  end
28
28
 
29
29
  if Enjoy::Catalog.config.gallery_support and Enjoy::Catalog.configuration.category_image_styles
30
- enjoy_cms_attached_file(:image,
31
- styles: lambda { |attachment| attachment.instance.image_styles }
32
- )
30
+ enjoy_cms_attached_file(:image)
33
31
  end
34
32
  end
35
33
 
@@ -41,10 +39,6 @@ module Enjoy::Catalog
41
39
  Enjoy::Catalog.configuration.category_image_styles
42
40
  end
43
41
 
44
- def image_jcrop_options
45
- {}
46
- end
47
-
48
42
  end
49
43
  end
50
44
  end
@@ -13,10 +13,6 @@ module Enjoy::Catalog
13
13
  def image_styles
14
14
  Enjoy::Catalog.configuration.category_images_image_styles
15
15
  end
16
-
17
- def image_jcrop_options
18
- {}
19
- end
20
16
  end
21
17
  end
22
18
  end
@@ -28,19 +28,13 @@ module Enjoy::Catalog
28
28
  end
29
29
 
30
30
  if Enjoy::Catalog.config.gallery_support and Enjoy::Catalog.configuration.item_image_styles
31
- enjoy_cms_attached_file(:image,
32
- styles: lambda { |attachment| attachment.instance.image_styles }
33
- )
31
+ enjoy_cms_attached_file(:image)
34
32
  end
35
33
  end
36
34
 
37
35
  def image_styles
38
36
  Enjoy::Catalog.configuration.item_image_styles
39
37
  end
40
-
41
- def image_jcrop_options
42
- {}
43
- end
44
38
  end
45
39
  end
46
40
  end
@@ -13,10 +13,6 @@ module Enjoy::Catalog
13
13
  def image_styles
14
14
  Enjoy::Catalog.configuration.item_images_image_styles
15
15
  end
16
-
17
- def image_jcrop_options
18
- {}
19
- end
20
16
  end
21
17
  end
22
18
  end
@@ -14,9 +14,11 @@ module Enjoy::Catalog
14
14
  enjoy_cms_html_field :excerpt, type: String, localize: Enjoy::Catalog.configuration.localize, default: ""
15
15
  enjoy_cms_html_field :content, type: String, localize: Enjoy::Catalog.configuration.localize, default: ""
16
16
 
17
- embeds_many :category_images, cascade_callbacks: true, class_name: "Enjoy::Catalog::CategoryImage"
18
- alias :images :category_images
19
- accepts_nested_attributes_for :category_images, allow_destroy: true
17
+ if Enjoy::Catalog.config.gallery_support
18
+ embeds_many :category_images, cascade_callbacks: true, class_name: "Enjoy::Catalog::CategoryImage"
19
+ alias :images :category_images
20
+ accepts_nested_attributes_for :category_images, allow_destroy: true
21
+ end
20
22
  end
21
23
 
22
24
  def items
@@ -17,9 +17,11 @@ module Enjoy::Catalog
17
17
 
18
18
  has_and_belongs_to_many :categories, class_name: "Enjoy::Catalog::Category", inverse_of: nil
19
19
 
20
- embeds_many :item_images, cascade_callbacks: true, class_name: "Enjoy::Catalog::ItemImage"
21
- alias :images :item_images
22
- accepts_nested_attributes_for :item_images, allow_destroy: true
20
+ if Enjoy::Catalog.config.gallery_support
21
+ embeds_many :item_images, cascade_callbacks: true, class_name: "Enjoy::Catalog::ItemImage"
22
+ alias :images :item_images
23
+ accepts_nested_attributes_for :item_images, allow_destroy: true
24
+ end
23
25
 
24
26
  has_and_belongs_to_many :related_items, :class_name => "Enjoy::Catalog::Item", :inverse_of => :related_items
25
27
 
@@ -1,5 +1,5 @@
1
1
  module Enjoy
2
2
  module Catalog
3
- VERSION = "0.4.0.5"
3
+ VERSION = "0.4.0.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enjoy_cms_catalog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.5
4
+ version: 0.4.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kiseliev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-18 00:00:00.000000000 Z
11
+ date: 2016-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler