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 +4 -4
- data/lib/enjoy/catalog/admin/category.rb +18 -15
- data/lib/enjoy/catalog/admin/item.rb +17 -13
- data/lib/enjoy/catalog/models/category.rb +1 -7
- data/lib/enjoy/catalog/models/category_image.rb +0 -4
- data/lib/enjoy/catalog/models/item.rb +1 -7
- data/lib/enjoy/catalog/models/item_image.rb +0 -4
- data/lib/enjoy/catalog/models/mongoid/category.rb +5 -3
- data/lib/enjoy/catalog/models/mongoid/item.rb +5 -3
- data/lib/enjoy/catalog/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07e41f2551400d60d1f0a4c0a677a7e6263323d5
|
4
|
+
data.tar.gz: 776f308b49aac629abba13befc9a45a1d996d45f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
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
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
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
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
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
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
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
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
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
|
@@ -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
|
@@ -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
|
-
|
18
|
-
|
19
|
-
|
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
|
-
|
21
|
-
|
22
|
-
|
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
|
|
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.
|
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-
|
11
|
+
date: 2016-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|