enjoy_cms_catalog 0.3.6 → 0.3.7

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: 02040c55e61a9e34c8812b356d54717f9a091011
4
- data.tar.gz: 8aa5f0a98eed2fa24676ace159fa789ee3bfad13
3
+ metadata.gz: 0117875d71ca0a24bdd0fcdec9fdcfe6260d3b0a
4
+ data.tar.gz: a53ecb5661763f15fca3c876919ff8bff15d585e
5
5
  SHA512:
6
- metadata.gz: 43fd56572ccb3f0fafee41bcdd149633fe86a13e17e5f7b2f1aca294874c14838317b2a36c8e8b7c8ca13171341d873935f2cfa50692d30a98cb9acc33a47d6a
7
- data.tar.gz: dabe729458c59a7ae1b183c896230aa2572de8e7a366f99d3875c302c4cd3273f9f0273dcc46691db28325b730e6f921ad29c2b2572a40c32d96931f16d6ef8e
6
+ metadata.gz: 7653b0246035cc8f77f78a8a1f4c09199df29151b5ccb3c6d0b61baf4ab85be54e111e2780db2698624659fa2e0937fb202750d82b07dd49650210139ff6d83e
7
+ data.tar.gz: 31daed42107fbdabf5fa43ab19a6a750963aa16ef497eb6dcd168788e060de5750ffa876be866e66704bd7d0218dd8dcad582b46cb97bcbcf0999a57ece5873a
@@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency 'money-rails'
35
35
  spec.add_dependency 'mongoid_money_field'
36
36
 
37
- spec.add_dependency 'enjoy_cms', "~> 0.3.5"
37
+ spec.add_dependency 'enjoy_cms', "~> 0.3.7"
38
38
  end
@@ -6,19 +6,30 @@ module Enjoy::Catalog
6
6
  list do
7
7
  scopes [:sorted, :enabled, nil]
8
8
 
9
- field :enabled, :toggle
10
- field :name
11
- field :price
12
- field :item_categories
9
+ field :enabled, :toggle do
10
+ searchable false
11
+ end
12
+ field :name do
13
+ searchable true
14
+ end
15
+ field :item_categories do
16
+ searchable :name
17
+ end
13
18
  field :connected_pages, :enjoy_connectable
14
- field :image
15
19
  end
16
20
 
17
21
  edit do
18
22
  field :enabled, :toggle
19
23
  field :name
20
- field :connected_pages, :enjoy_connectable
21
- field :item_categories
24
+ field :connected_pages, :enjoy_connectable do
25
+ read_only do
26
+ !bindings[:view].current_user.admin?
27
+ end
28
+ end
29
+ field :item_categories do
30
+ searchable :name
31
+ end
32
+ field :price
22
33
 
23
34
  group :URL do
24
35
  active false
@@ -43,6 +54,8 @@ module Enjoy::Catalog
43
54
  :image_jcrop_options
44
55
  end
45
56
  end
57
+
58
+ field :item_images
46
59
  end
47
60
 
48
61
  group :content do
@@ -51,8 +64,6 @@ module Enjoy::Catalog
51
64
  field :content, :enjoy_html
52
65
  end
53
66
 
54
- field :item_images
55
-
56
67
  Enjoy::RailsAdminGroupPatch::enjoy_cms_group(self, fields)
57
68
 
58
69
  group :seo do
@@ -7,22 +7,13 @@ module Enjoy::Catalog
7
7
  list do
8
8
  scopes [:sorted, :enabled, nil]
9
9
 
10
- field :enabled, :toggle
11
- field :name
12
- field :image
13
- field :connected_pages, :enjoy_connectable
14
-
15
- field :items do
16
- read_only true
17
-
18
- pretty_value do
19
- bindings[:object].items.to_a.map { |i|
20
- route = (bindings[:view] || bindings[:controller])
21
- model_name = i.rails_admin_model
22
- route.link_to(i.name, route.rails_admin.show_path(model_name: model_name, id: i.id), title: i.name)
23
- }.join("<br>").html_safe
24
- end
10
+ field :enabled, :toggle do
11
+ searchable false
12
+ end
13
+ field :name do
14
+ searchable true
25
15
  end
16
+ field :connected_pages, :enjoy_connectable
26
17
  end
27
18
 
28
19
  edit do
@@ -44,10 +35,16 @@ module Enjoy::Catalog
44
35
  end
45
36
  field :text_slug
46
37
  end
47
- field :image, :jcrop do
48
- jcrop_options do
49
- :image_jcrop_options
38
+
39
+
40
+ group :image do
41
+ active false
42
+ field :image, :jcrop do
43
+ jcrop_options do
44
+ :image_jcrop_options
45
+ end
50
46
  end
47
+ field :item_category_images
51
48
  end
52
49
 
53
50
  group :content do
@@ -56,8 +53,6 @@ module Enjoy::Catalog
56
53
  field :content, :enjoy_html
57
54
  end
58
55
 
59
- field :item_category_images
60
-
61
56
  Enjoy::RailsAdminGroupPatch::enjoy_cms_group(self, fields)
62
57
 
63
58
  group :seo do
@@ -1,5 +1,5 @@
1
1
  module Enjoy
2
2
  module Catalog
3
- VERSION = "0.3.6"
3
+ VERSION = "0.3.7"
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.3.6
4
+ version: 0.3.7
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-03-10 00:00:00.000000000 Z
11
+ date: 2016-03-14 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.5
75
+ version: 0.3.7
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.5
82
+ version: 0.3.7
83
83
  description: Items catalog with EnjoyCMS support.
84
84
  email:
85
85
  - dev@enjoycreate.ru