enjoy_cms 0.3.1.2 → 0.3.2

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: 450bfca66a304970d20076882809a8d12036c27d
4
- data.tar.gz: 497f597e35f6e549d6305aaadf9615663517e5ab
3
+ metadata.gz: e33a4e7ad3766cc568450aa9727d67007767e578
4
+ data.tar.gz: 5b1163592a2342e6909390363095a0cd94766e8a
5
5
  SHA512:
6
- metadata.gz: a8a60ec96ee9702d5f936a7d04cdff907c20931a82a9e4114076ee037cdc2872e7499a4903f865a0fbd4be5271e2480ada7cfde7806b43b44084e9194ffeaac4
7
- data.tar.gz: 4392affe4373c6ce16b5a49a4b308651f900b0c907e46565cdeaa7c99535662c693c14531abe37084cbe22a8766784f1089b587389562fd134f36f37fd46c957
6
+ metadata.gz: 716b95fed34f32026ebe624807e5fca67c89e94dbc58fe4cf46ee1f29cc93576f0cfb63879989216e240073502605df41f2095baeb06aee772747471bda3593a
7
+ data.tar.gz: 2c89eea1c204394f1bc0321e830bde1936bca3e274fae3c31145799d2deed2b7441641ab490e45fb89fa46a63c948930552ead100ebbee82a3b2bd41b5cb306a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- enjoy_cms (0.3.1.2)
4
+ enjoy_cms (0.3.2)
5
5
  ack_rails_admin_jcrop
6
6
  addressable
7
7
  ckeditor
@@ -7,18 +7,21 @@ module Enjoy
7
7
  field :enabled, :toggle
8
8
 
9
9
  field :name, :string
10
- field :slugs, :enum do
11
- enum_method do
12
- :slugs
13
- end
14
- visible do
15
- bindings[:view].current_user.admin?
16
- end
17
- multiple do
18
- true
10
+ group :URL do
11
+ active false
12
+ field :slugs, :enum do
13
+ enum_method do
14
+ :slugs
15
+ end
16
+ visible do
17
+ bindings[:view].current_user.admin?
18
+ end
19
+ multiple do
20
+ true
21
+ end
19
22
  end
23
+ field :text_slug
20
24
  end
21
- field :text_slug
22
25
 
23
26
  field :image, :jcrop do
24
27
  jcrop_options :image_jcrop_options
@@ -18,30 +18,39 @@ module Enjoy
18
18
  jcrop_options :image_jcrop_options
19
19
  end
20
20
  end
21
- field :excerpt, :enjoy_html
22
- # field :excerpt_html, :ck_editor
23
- # field :excerpt_clear, :toggle
24
- field :slugs, :enum do
25
- enum_method do
26
- :slugs
27
- end
28
- visible do
29
- bindings[:view].current_user.admin?
30
- end
31
- multiple do
32
- true
21
+ group :content do
22
+ active false
23
+ field :excerpt, :enjoy_html
24
+ # field :excerpt_html, :ck_editor
25
+ # field :excerpt_clear, :toggle
26
+ end
27
+ group :URL do
28
+ active false
29
+ field :slugs, :enum do
30
+ enum_method do
31
+ :slugs
32
+ end
33
+ visible do
34
+ bindings[:view].current_user.admin?
35
+ end
36
+ multiple do
37
+ true
38
+ end
33
39
  end
40
+ field :text_slug
34
41
  end
35
- field :text_slug
36
42
 
37
43
  list do
38
44
  sort_by :time
39
45
  end
40
46
 
41
47
  edit do
42
- field :content, :enjoy_html
43
- # field :content_html, :ck_editor
44
- # field :content_clear, :toggle
48
+ group :text do
49
+ active false
50
+ field :content, :enjoy_html
51
+ # field :content_html, :ck_editor
52
+ # field :content_clear, :toggle
53
+ end
45
54
  fields.each_pair do |name, type|
46
55
  if type.nil?
47
56
  field name
@@ -21,14 +21,19 @@ module Enjoy
21
21
 
22
22
  edit do
23
23
  field :name
24
- field :excerpt, :enjoy_html
25
- # field :excerpt_html, :ck_editor
26
- # field :excerpt_clear, :toggle
27
- field :content, :enjoy_html
28
- # field :content_html, :ck_editor
29
- # field :content_clear, :toggle
24
+
25
+ group :content do
26
+ active false
27
+ field :excerpt, :enjoy_html
28
+ # field :excerpt_html, :ck_editor
29
+ # field :excerpt_clear, :toggle
30
+ field :content, :enjoy_html
31
+ # field :content_html, :ck_editor
32
+ # field :content_clear, :toggle
33
+ end
30
34
 
31
35
  group :menu do
36
+ active false
32
37
  label I18n.t('enjoy.menu')
33
38
  field :menus
34
39
  field :fullpath, :string do
data/lib/enjoy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Enjoy
2
- VERSION = "0.3.1.2"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -7,6 +7,8 @@ class Ability
7
7
  can :access, :rails_admin # grant access to rails_admin
8
8
  can :dashboard # grant access to the dashboard
9
9
 
10
+ can :comments, :all #RailsAdminComments
11
+
10
12
  if user.admin?
11
13
  admin_ui(user)
12
14
  elsif user.manager?
@@ -40,7 +42,7 @@ class Ability
40
42
  [
41
43
  Enjoy::Page, Enjoy::News,
42
44
  Enjoy::Seo, Enjoy::SitemapData,
43
- RailsAdminSettings::Settings
45
+ RailsAdminSettings::Setting
44
46
  ]
45
47
  end
46
48
  end
data/template.rb CHANGED
@@ -406,7 +406,7 @@ inject_into_file 'app/models/user.rb', before: /^end/ do <<-TEXT
406
406
  edit do
407
407
  field :email, :string do
408
408
  visible do
409
- bindings[:controller].current_user.admin? or (bindings[:controller].current_user.manager? bindings[:controller].current_user == bindings[:object])
409
+ bindings[:controller].current_user.admin? or (bindings[:controller].current_user.manager? and bindings[:controller].current_user == bindings[:object])
410
410
  end
411
411
  end
412
412
  field :name, :string
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enjoy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1.2
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kiseliev