enjoy_cms 0.3.0.3 → 0.3.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/models/concerns/enjoy/decorators/page_block.rb +5 -0
- data/app/models/concerns/enjoy/decorators/page_blockset.rb +5 -0
- data/app/models/enjoy/page_block.rb +4 -0
- data/app/models/enjoy/page_blockset.rb +4 -0
- data/lib/enjoy/admin/page_block.rb +13 -12
- data/lib/enjoy/admin/page_blockset.rb +15 -12
- data/lib/enjoy/configuration.rb +1 -1
- data/lib/enjoy/models/mongoid/page_block.rb +2 -0
- data/lib/enjoy/version.rb +1 -1
- data/lib/enjoy_cms.rb +9 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ae5da74a58d1eb3e17743f4c15776d9d7c4aff2
|
4
|
+
data.tar.gz: 38dd9e7610598eea2e5db3a8ca6123a8916fc5d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a419713fdc0e06afb71897a2913160fad87572d66f50111c2da4916121d977fbeb9b98088a849cef0142cbadb1114e114e451e04aff1815763eb1aa56d3eb9b7
|
7
|
+
data.tar.gz: b77afda381a54a93dbdd2158b5744bf49f61c9c16c58539cf6660e0e8b19b1183caebb3fbd2c95eddde8da69ef5245b3344e3e96eb3124d52e6a2705bb02e747
|
data/Gemfile.lock
CHANGED
@@ -7,6 +7,7 @@ module Enjoy
|
|
7
7
|
|
8
8
|
field :enabled, :toggle
|
9
9
|
field :name
|
10
|
+
field :content, :enjoy_html
|
10
11
|
|
11
12
|
fields.each_pair do |name, type|
|
12
13
|
if type.nil?
|
@@ -20,18 +21,18 @@ module Enjoy
|
|
20
21
|
end
|
21
22
|
end
|
22
23
|
|
23
|
-
field :
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end
|
24
|
+
# field :blocksets do
|
25
|
+
# read_only true
|
26
|
+
# help 'Список групп блоков'
|
27
|
+
#
|
28
|
+
# pretty_value do
|
29
|
+
# bindings[:object].blocksets.to_a.map { |bs|
|
30
|
+
# route = (bindings[:view] || bindings[:controller])
|
31
|
+
# model_name = bs.rails_admin_model
|
32
|
+
# route.link_to(bs.name, route.rails_admin.show_path(model_name: model_name, id: bs.id), title: bs.name)
|
33
|
+
# }.join("<br>").html_safe
|
34
|
+
# end
|
35
|
+
# end
|
35
36
|
|
36
37
|
if block_given?
|
37
38
|
yield self
|
@@ -8,6 +8,9 @@ module Enjoy
|
|
8
8
|
field :enabled, :toggle
|
9
9
|
field :name
|
10
10
|
|
11
|
+
|
12
|
+
field :blocks
|
13
|
+
|
11
14
|
fields.each_pair do |name, type|
|
12
15
|
if type.nil?
|
13
16
|
field name
|
@@ -20,18 +23,18 @@ module Enjoy
|
|
20
23
|
end
|
21
24
|
end
|
22
25
|
|
23
|
-
field :
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
end
|
26
|
+
# field :blocks do
|
27
|
+
# read_only true
|
28
|
+
# help 'Список блоков'
|
29
|
+
#
|
30
|
+
# pretty_value do
|
31
|
+
# bindings[:object].blocks.to_a.map { |b|
|
32
|
+
# route = (bindings[:view] || bindings[:controller])
|
33
|
+
# model_name = b.rails_admin_model
|
34
|
+
# route.link_to(b.name, route.rails_admin.show_path(model_name: model_name, id: b.id), title: b.name)
|
35
|
+
# }.join("<br>").html_safe
|
36
|
+
# end
|
37
|
+
# end
|
35
38
|
|
36
39
|
if block_given?
|
37
40
|
yield self
|
data/lib/enjoy/configuration.rb
CHANGED
data/lib/enjoy/version.rb
CHANGED
data/lib/enjoy_cms.rb
CHANGED
@@ -76,6 +76,9 @@ module Enjoy
|
|
76
76
|
autoload :EmbeddedGalleryImage, 'enjoy/admin/embedded_gallery_image'
|
77
77
|
autoload :GalleryImage, 'enjoy/admin/gallery_image'
|
78
78
|
autoload :Gallery, 'enjoy/admin/gallery'
|
79
|
+
|
80
|
+
autoload :PageBlock, 'enjoy/admin/page_block'
|
81
|
+
autoload :PageBlockset, 'enjoy/admin/page_blockset'
|
79
82
|
end
|
80
83
|
|
81
84
|
module Models
|
@@ -92,6 +95,9 @@ module Enjoy
|
|
92
95
|
autoload :GalleryImage, 'enjoy/models/gallery_image'
|
93
96
|
autoload :Gallery, 'enjoy/models/gallery'
|
94
97
|
|
98
|
+
autoload :PageBlock, 'enjoy/models/page_block'
|
99
|
+
autoload :PageBlockset, 'enjoy/models/page_blockset'
|
100
|
+
|
95
101
|
module Mongoid
|
96
102
|
autoload :SitemapData, 'enjoy/models/mongoid/sitemap_data'
|
97
103
|
autoload :Seo, 'enjoy/models/mongoid/seo'
|
@@ -105,6 +111,9 @@ module Enjoy
|
|
105
111
|
autoload :EmbeddedGalleryImage, 'enjoy/models/mongoid/embedded_gallery_image'
|
106
112
|
autoload :GalleryImage, 'enjoy/models/mongoid/gallery_image'
|
107
113
|
autoload :Gallery, 'enjoy/models/mongoid/gallery'
|
114
|
+
|
115
|
+
autoload :PageBlock, 'enjoy/models/mongoid/page_block'
|
116
|
+
autoload :PageBlockset, 'enjoy/models/mongoid/page_blockset'
|
108
117
|
end
|
109
118
|
|
110
119
|
module ActiveRecord
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enjoy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0.
|
4
|
+
version: 0.3.0.4
|
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-02-
|
11
|
+
date: 2016-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -483,6 +483,8 @@ files:
|
|
483
483
|
- app/models/concerns/enjoy/decorators/menu.rb
|
484
484
|
- app/models/concerns/enjoy/decorators/news.rb
|
485
485
|
- app/models/concerns/enjoy/decorators/page.rb
|
486
|
+
- app/models/concerns/enjoy/decorators/page_block.rb
|
487
|
+
- app/models/concerns/enjoy/decorators/page_blockset.rb
|
486
488
|
- app/models/concerns/enjoy/decorators/seo.rb
|
487
489
|
- app/models/concerns/enjoy/decorators/sitemap_data.rb
|
488
490
|
- app/models/concerns/enjoy/enableable.rb
|