enjoy_cms_catalog 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/enjoy_cms_catalog.gemspec +1 -1
- data/lib/enjoy/catalog/admin/item.rb +28 -16
- data/lib/enjoy/catalog/admin/item_category.rb +30 -21
- data/lib/enjoy/catalog/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50336fa30ed1da7b57b4a4ba843fe9da321a7295
|
4
|
+
data.tar.gz: 24595a6b9322d1cf2412afd7d4abb9df435db1d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9225f7b387bdcff7468b28c694e6ea69e29cdaeedcd8c572cc29d8b80e2484e763b46548adc27cf79295be426a914b2f525374700838c5c2843c9fbcb68b4677
|
7
|
+
data.tar.gz: fb4fa09a88703a146b3d32ac0a8c70d19394022c928437a53906c8fc1b304a21c90a3efa275361c5105d3b091e96f8705c88a3fa0fcf7b9e165d20e64a49616b
|
data/enjoy_cms_catalog.gemspec
CHANGED
@@ -16,26 +16,38 @@ module Enjoy::Catalog
|
|
16
16
|
edit do
|
17
17
|
field :enabled, :toggle
|
18
18
|
field :name
|
19
|
-
field :
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
19
|
+
field :item_categories
|
20
|
+
|
21
|
+
group :URL do
|
22
|
+
active false
|
23
|
+
field :slugs, :enum do
|
24
|
+
enum_method do
|
25
|
+
:slugs
|
26
|
+
end
|
27
|
+
visible do
|
28
|
+
bindings[:view].current_user.admin?
|
29
|
+
end
|
30
|
+
multiple do
|
31
|
+
true
|
32
|
+
end
|
28
33
|
end
|
34
|
+
field :text_slug
|
29
35
|
end
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
36
|
+
|
37
|
+
group :image do
|
38
|
+
active false
|
39
|
+
field :image, :jcrop do
|
40
|
+
jcrop_options do
|
41
|
+
:image_jcrop_options
|
42
|
+
end
|
34
43
|
end
|
35
44
|
end
|
36
|
-
|
37
|
-
|
38
|
-
|
45
|
+
|
46
|
+
group :content do
|
47
|
+
active false
|
48
|
+
field :excerpt, :enjoy_html
|
49
|
+
field :content, :enjoy_html
|
50
|
+
end
|
39
51
|
|
40
52
|
field :item_images
|
41
53
|
|
@@ -27,25 +27,31 @@ module Enjoy::Catalog
|
|
27
27
|
edit do
|
28
28
|
field :enabled, :toggle
|
29
29
|
field :name
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
30
|
+
group :URL do
|
31
|
+
field :slugs, :enum do
|
32
|
+
enum_method do
|
33
|
+
:slugs
|
34
|
+
end
|
35
|
+
visible do
|
36
|
+
bindings[:view].current_user.admin?
|
37
|
+
end
|
38
|
+
multiple do
|
39
|
+
true
|
40
|
+
end
|
39
41
|
end
|
42
|
+
field :text_slug
|
40
43
|
end
|
41
|
-
field :text_slug
|
42
44
|
field :image, :jcrop do
|
43
45
|
jcrop_options do
|
44
46
|
:image_jcrop_options
|
45
47
|
end
|
46
48
|
end
|
47
|
-
|
48
|
-
|
49
|
+
|
50
|
+
group :content do
|
51
|
+
active false
|
52
|
+
field :excerpt, :enjoy_html
|
53
|
+
field :content, :enjoy_html
|
54
|
+
end
|
49
55
|
|
50
56
|
field :item_category_images
|
51
57
|
|
@@ -74,16 +80,19 @@ module Enjoy::Catalog
|
|
74
80
|
end
|
75
81
|
end
|
76
82
|
|
77
|
-
|
78
|
-
|
79
|
-
|
83
|
+
group :items do
|
84
|
+
active false
|
85
|
+
field :items do
|
86
|
+
read_only true
|
87
|
+
help 'Список товаров'
|
80
88
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
89
|
+
pretty_value do
|
90
|
+
bindings[:object].items.to_a.map { |i|
|
91
|
+
route = (bindings[:view] || bindings[:controller])
|
92
|
+
model_name = i.rails_admin_model
|
93
|
+
route.link_to(i.name, route.rails_admin.show_path(model_name: model_name, id: i.id), title: i.name)
|
94
|
+
}.join("<br>").html_safe
|
95
|
+
end
|
87
96
|
end
|
88
97
|
end
|
89
98
|
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.3.
|
4
|
+
version: 0.3.2
|
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-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.3.
|
75
|
+
version: 0.3.2
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.3.
|
82
|
+
version: 0.3.2
|
83
83
|
description: Items catalog with EnjoyCMS support.
|
84
84
|
email:
|
85
85
|
- dev@enjoycreate.ru
|