ecm_cms2 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ecm/cms/resolvers/ecm/cms/page_resolver.rb +23 -4
- data/lib/ecm/cms/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: fcf16db9c902ff4a888e6a4c4a4152d368326bf5
|
4
|
+
data.tar.gz: f1ea612f387bdecb5798fddc7a20c429ddfa736b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae9edfb5fd7365b12e80a674154057677d9df1569bb34a4b4ac944baff014b2e7996af52c0dd1bf1c67fb0b3fae03794d4cb1c63a3bd3413acf06cbb74c902b4
|
7
|
+
data.tar.gz: caffef5bf2a357644a584af6ba0a8627283b8737a72f52f2d3b1947743ea295419b626b87889d76e9cec397ce6f4dc3ee00f6e8fba4dc136ce3ef74a033c67dc
|
@@ -16,10 +16,9 @@ module Ecm
|
|
16
16
|
rendered_body = RedCloth.new(content_block.body).to_html
|
17
17
|
output << "<% content_for :#{content_block.content_box_name} do %>#{rendered_body}<% end %>"
|
18
18
|
end
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
output << content_for_title << content_for_meta_description
|
19
|
+
|
20
|
+
output << content_for_title(record)
|
21
|
+
output << content_for_meta_description(record)
|
23
22
|
|
24
23
|
output << record.body unless record.body.nil?
|
25
24
|
|
@@ -37,6 +36,26 @@ module Ecm
|
|
37
36
|
def template_class
|
38
37
|
'Ecm::Cms::Page'
|
39
38
|
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def content_for_title(record)
|
43
|
+
case record.handler
|
44
|
+
when 'haml'
|
45
|
+
"= content_for(:title) { \"#{record.title}\" }\r\n"
|
46
|
+
else
|
47
|
+
"<% content_for :title do %>#{record.title}<% end %>"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def content_for_meta_description(record)
|
52
|
+
case record.handler
|
53
|
+
when 'haml'
|
54
|
+
"= content_for(:meta_description) { \"#{record.meta_description}\" }\r\n"
|
55
|
+
else
|
56
|
+
"<% content_for :meta_description do %>#{record.meta_description}<% end %>"
|
57
|
+
end
|
58
|
+
end
|
40
59
|
end
|
41
60
|
end
|
42
61
|
end
|
data/lib/ecm/cms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_cms2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|