alchemy_cms 2.0.5 → 2.0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -2
- data/app/controllers/alchemy_controller.rb +9 -1
- data/app/controllers/pages_controller.rb +24 -21
- data/lib/alchemy/version.rb +1 -1
- metadata +36 -36
data/.gitignore
CHANGED
@@ -245,5 +245,13 @@ protected
|
|
245
245
|
def trash_empty?(category)
|
246
246
|
category.singularize.classify.constantize.trashed.blank?
|
247
247
|
end
|
248
|
-
|
248
|
+
|
249
|
+
def layout_for_page
|
250
|
+
if !params[:layout].blank? && params[:layout] != 'none'
|
251
|
+
params[:layout]
|
252
|
+
else
|
253
|
+
'pages'
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
249
257
|
end
|
@@ -5,26 +5,29 @@ class PagesController < AlchemyController
|
|
5
5
|
|
6
6
|
filter_access_to :show, :attribute_check => true
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
8
|
+
caches_action(
|
9
|
+
:show,
|
10
|
+
:cache_path => proc { url_for(:action => :show, :urlname => params[:urlname], :lang => multi_language? ? params[:lang] : nil) },
|
11
|
+
:if => proc {
|
12
|
+
if Alchemy::Config.get(:cache_pages)
|
13
|
+
page = Page.find_by_urlname_and_language_id_and_public(
|
14
|
+
params[:urlname],
|
15
|
+
session[:language_id],
|
16
|
+
true,
|
17
|
+
:select => 'page_layout, language_id, urlname'
|
18
|
+
)
|
19
|
+
if page
|
20
|
+
pagelayout = PageLayout.get(page.page_layout)
|
21
|
+
pagelayout['cache'].nil? || pagelayout['cache']
|
22
|
+
end
|
23
|
+
else
|
24
|
+
false
|
25
|
+
end
|
26
|
+
},
|
27
|
+
:layout => false
|
28
|
+
)
|
29
|
+
|
30
|
+
layout :layout_for_page
|
28
31
|
|
29
32
|
# Showing page from params[:urlname]
|
30
33
|
# @page is fetched via before filter
|
@@ -37,7 +40,7 @@ class PagesController < AlchemyController
|
|
37
40
|
end
|
38
41
|
respond_to do |format|
|
39
42
|
format.html {
|
40
|
-
render
|
43
|
+
render
|
41
44
|
}
|
42
45
|
format.rss {
|
43
46
|
if @page.contains_feed?
|
data/lib/alchemy/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy_cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2012-01-04 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
18
|
-
requirement: &
|
18
|
+
requirement: &70273328690000 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: '3.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *70273328690000
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: authlogic
|
29
|
-
requirement: &
|
29
|
+
requirement: &70273328689320 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ~>
|
@@ -34,10 +34,10 @@ dependencies:
|
|
34
34
|
version: '3.0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *70273328689320
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
39
|
name: awesome_nested_set
|
40
|
-
requirement: &
|
40
|
+
requirement: &70273328688720 !ruby/object:Gem::Requirement
|
41
41
|
none: false
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
@@ -45,10 +45,10 @@ dependencies:
|
|
45
45
|
version: '2.0'
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
|
-
version_requirements: *
|
48
|
+
version_requirements: *70273328688720
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: declarative_authorization
|
51
|
-
requirement: &
|
51
|
+
requirement: &70273328688180 !ruby/object:Gem::Requirement
|
52
52
|
none: false
|
53
53
|
requirements:
|
54
54
|
- - ~>
|
@@ -56,10 +56,10 @@ dependencies:
|
|
56
56
|
version: '0.5'
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
|
-
version_requirements: *
|
59
|
+
version_requirements: *70273328688180
|
60
60
|
- !ruby/object:Gem::Dependency
|
61
61
|
name: tvdeyen-fleximage
|
62
|
-
requirement: &
|
62
|
+
requirement: &70273328687340 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
65
65
|
- - ~>
|
@@ -67,10 +67,10 @@ dependencies:
|
|
67
67
|
version: 1.0.7
|
68
68
|
type: :runtime
|
69
69
|
prerelease: false
|
70
|
-
version_requirements: *
|
70
|
+
version_requirements: *70273328687340
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: gettext_i18n_rails
|
73
|
-
requirement: &
|
73
|
+
requirement: &70273328685840 !ruby/object:Gem::Requirement
|
74
74
|
none: false
|
75
75
|
requirements:
|
76
76
|
- - ! '>='
|
@@ -78,10 +78,10 @@ dependencies:
|
|
78
78
|
version: '0.3'
|
79
79
|
type: :runtime
|
80
80
|
prerelease: false
|
81
|
-
version_requirements: *
|
81
|
+
version_requirements: *70273328685840
|
82
82
|
- !ruby/object:Gem::Dependency
|
83
83
|
name: will_paginate
|
84
|
-
requirement: &
|
84
|
+
requirement: &70273328685360 !ruby/object:Gem::Requirement
|
85
85
|
none: false
|
86
86
|
requirements:
|
87
87
|
- - ~>
|
@@ -89,10 +89,10 @@ dependencies:
|
|
89
89
|
version: '3.0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
|
-
version_requirements: *
|
92
|
+
version_requirements: *70273328685360
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
94
|
name: acts_as_ferret
|
95
|
-
requirement: &
|
95
|
+
requirement: &70273328684860 !ruby/object:Gem::Requirement
|
96
96
|
none: false
|
97
97
|
requirements:
|
98
98
|
- - ~>
|
@@ -100,10 +100,10 @@ dependencies:
|
|
100
100
|
version: '0.5'
|
101
101
|
type: :runtime
|
102
102
|
prerelease: false
|
103
|
-
version_requirements: *
|
103
|
+
version_requirements: *70273328684860
|
104
104
|
- !ruby/object:Gem::Dependency
|
105
105
|
name: acts_as_list
|
106
|
-
requirement: &
|
106
|
+
requirement: &70273328684080 !ruby/object:Gem::Requirement
|
107
107
|
none: false
|
108
108
|
requirements:
|
109
109
|
- - ~>
|
@@ -111,10 +111,10 @@ dependencies:
|
|
111
111
|
version: '0.1'
|
112
112
|
type: :runtime
|
113
113
|
prerelease: false
|
114
|
-
version_requirements: *
|
114
|
+
version_requirements: *70273328684080
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: userstamp
|
117
|
-
requirement: &
|
117
|
+
requirement: &70273328683140 !ruby/object:Gem::Requirement
|
118
118
|
none: false
|
119
119
|
requirements:
|
120
120
|
- - ~>
|
@@ -122,10 +122,10 @@ dependencies:
|
|
122
122
|
version: 2.0.1
|
123
123
|
type: :runtime
|
124
124
|
prerelease: false
|
125
|
-
version_requirements: *
|
125
|
+
version_requirements: *70273328683140
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: dynamic_form
|
128
|
-
requirement: &
|
128
|
+
requirement: &70273328704100 !ruby/object:Gem::Requirement
|
129
129
|
none: false
|
130
130
|
requirements:
|
131
131
|
- - ~>
|
@@ -133,10 +133,10 @@ dependencies:
|
|
133
133
|
version: '1.1'
|
134
134
|
type: :runtime
|
135
135
|
prerelease: false
|
136
|
-
version_requirements: *
|
136
|
+
version_requirements: *70273328704100
|
137
137
|
- !ruby/object:Gem::Dependency
|
138
138
|
name: jquery-rails
|
139
|
-
requirement: &
|
139
|
+
requirement: &70273328703620 !ruby/object:Gem::Requirement
|
140
140
|
none: false
|
141
141
|
requirements:
|
142
142
|
- - ~>
|
@@ -144,10 +144,10 @@ dependencies:
|
|
144
144
|
version: '1.0'
|
145
145
|
type: :runtime
|
146
146
|
prerelease: false
|
147
|
-
version_requirements: *
|
147
|
+
version_requirements: *70273328703620
|
148
148
|
- !ruby/object:Gem::Dependency
|
149
149
|
name: tinymce_hammer
|
150
|
-
requirement: &
|
150
|
+
requirement: &70273328703100 !ruby/object:Gem::Requirement
|
151
151
|
none: false
|
152
152
|
requirements:
|
153
153
|
- - ~>
|
@@ -155,10 +155,10 @@ dependencies:
|
|
155
155
|
version: '0.2'
|
156
156
|
type: :runtime
|
157
157
|
prerelease: false
|
158
|
-
version_requirements: *
|
158
|
+
version_requirements: *70273328703100
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: attachment_magic
|
161
|
-
requirement: &
|
161
|
+
requirement: &70273328702580 !ruby/object:Gem::Requirement
|
162
162
|
none: false
|
163
163
|
requirements:
|
164
164
|
- - ~>
|
@@ -166,10 +166,10 @@ dependencies:
|
|
166
166
|
version: 0.1.1
|
167
167
|
type: :runtime
|
168
168
|
prerelease: false
|
169
|
-
version_requirements: *
|
169
|
+
version_requirements: *70273328702580
|
170
170
|
- !ruby/object:Gem::Dependency
|
171
171
|
name: rspec-rails
|
172
|
-
requirement: &
|
172
|
+
requirement: &70273328702080 !ruby/object:Gem::Requirement
|
173
173
|
none: false
|
174
174
|
requirements:
|
175
175
|
- - ~>
|
@@ -177,10 +177,10 @@ dependencies:
|
|
177
177
|
version: '2.6'
|
178
178
|
type: :development
|
179
179
|
prerelease: false
|
180
|
-
version_requirements: *
|
180
|
+
version_requirements: *70273328702080
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: sqlite3
|
183
|
-
requirement: &
|
183
|
+
requirement: &70273328701680 !ruby/object:Gem::Requirement
|
184
184
|
none: false
|
185
185
|
requirements:
|
186
186
|
- - ! '>='
|
@@ -188,10 +188,10 @@ dependencies:
|
|
188
188
|
version: '0'
|
189
189
|
type: :development
|
190
190
|
prerelease: false
|
191
|
-
version_requirements: *
|
191
|
+
version_requirements: *70273328701680
|
192
192
|
- !ruby/object:Gem::Dependency
|
193
193
|
name: ruby-debug19
|
194
|
-
requirement: &
|
194
|
+
requirement: &70273328701140 !ruby/object:Gem::Requirement
|
195
195
|
none: false
|
196
196
|
requirements:
|
197
197
|
- - ! '>='
|
@@ -199,7 +199,7 @@ dependencies:
|
|
199
199
|
version: '0'
|
200
200
|
type: :development
|
201
201
|
prerelease: false
|
202
|
-
version_requirements: *
|
202
|
+
version_requirements: *70273328701140
|
203
203
|
description: Alchemy is an awesome Rails CMS with an extremely flexible content storing
|
204
204
|
architecture.
|
205
205
|
email:
|