caboose-cms 0.2.23 → 0.2.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/controllers/caboose/pages_controller.rb +277 -217
- data/app/controllers/caboose/roles_controller.rb +8 -8
- data/app/models/caboose/page.rb +2 -1
- data/app/views/caboose/pages/edit.html.erb +52 -8
- data/app/views/caboose/pages/edit_content.html.erb +49 -37
- data/app/views/caboose/pages/edit_css.html.erb +43 -28
- data/app/views/caboose/pages/edit_js.html.erb +42 -27
- data/app/views/caboose/pages/edit_resources.html.erb +41 -0
- data/app/views/caboose/pages/edit_seo.html.erb +6 -4
- data/app/views/caboose/pages/edit_settings.html.erb +6 -4
- data/app/views/caboose/pages/edit_title.html.erb +1 -0
- data/app/views/caboose/pages/show.html.erb +15 -0
- data/app/views/caboose/pages/sitemap.html.erb +4 -4
- data/app/views/caboose/roles/edit.html.erb +45 -4
- data/config/routes.rb +2 -0
- data/config/tinymce.yml +11 -0
- data/lib/caboose/caboose_helper.rb +1 -1
- data/lib/caboose/migration_version.rb +47 -0
- data/lib/caboose/migrations.rb +7 -0
- data/lib/caboose/version.rb +1 -1
- data/lib/tasks/caboose.rake +75 -12
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTUxZWUzYzkxNGJiYTJkMmFkNTU0YmVhNGQyNWMxNDQxNTBhNTFkMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODE3OTQxMmZiZmU0YTlhZWQ5Y2NhM2ViMzYwMDcxYzcwNjIwYzQ2Mg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmMyY2FhYjJlYmQwNzUzNTg4ZWRjYjE3MmZlODk1MjE2ODBjMDIwMjczZTgx
|
10
|
+
Y2UwZDUyMDkyNDJkY2QyNDRiMTgwMjYwOTBmMWI0M2M4NThiZTQ1ZmIxOWE1
|
11
|
+
YzljNjEwMDVlYWUyOGFkZDY2Mjk4MjM4YTM1ODM0ZGMwYTI3ZDg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWNlMmExZTJkN2Q3YzdkOGU3NWJiNDk4YWEwYmY4MTQ5NWRmZDdiNDdmNzI2
|
14
|
+
NzI3MzkwODUyYWEzMWFlMmY2MmI5NGFjN2MyNDlhNDljYTQyMGZlYjJlOTI4
|
15
|
+
ZTkzYjY5OTIzZmE1OTBiMmNjOTljMTUzN2U3M2M4YjQyMmUxOTU=
|
@@ -10,90 +10,106 @@ module Caboose
|
|
10
10
|
def index
|
11
11
|
end
|
12
12
|
|
13
|
+
def view_formatted_resources(page)
|
14
|
+
resources = { js: [], css: [] }
|
15
|
+
return resources if page.linked_resources.nil?
|
16
|
+
page.linked_resources.each_line do |r|
|
17
|
+
r.chomp!
|
18
|
+
case r
|
19
|
+
when /\.js$/
|
20
|
+
resources[:js] += [r]
|
21
|
+
when /\.css$/
|
22
|
+
resources[:css] += [r]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
return resources
|
26
|
+
end
|
27
|
+
|
13
28
|
# GET /pages/:id
|
14
29
|
def show
|
15
30
|
|
16
31
|
# Find the page with an exact URI match
|
17
32
|
page = Page.page_with_uri(request.fullpath, false)
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
33
|
+
|
34
|
+
if (!page)
|
35
|
+
asset
|
36
|
+
return
|
37
|
+
end
|
38
|
+
|
39
|
+
user = logged_in_user
|
40
|
+
if (!user.is_allowed(page, 'view'))
|
41
|
+
if (user.id == User.logged_out_user_id)
|
42
|
+
redirect_to "/login?return_url=" + URI.encode(request.fullpath)
|
43
|
+
return
|
44
|
+
else
|
45
|
+
page.title = 'Access Denied'
|
46
|
+
page.content = "<p class='note error'>You do not have access to view this page.</p>"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
if (session['use_redirect_urls'] && !page.redirect_url.nil? && page.redirect_url.strip.length > 0)
|
51
|
+
redirect_to page.redirect_url
|
52
|
+
return
|
53
|
+
end
|
54
|
+
|
55
|
+
page.content = Caboose.plugin_hook('page_content', page.content)
|
56
|
+
@page = page
|
57
|
+
@user = user
|
58
|
+
@editmode = !params['edit'].nil? && user.is_allowed('pages', 'edit') ? true : false
|
59
|
+
@crumb_trail = Caboose::Page.crumb_trail(@page)
|
60
|
+
@subnav = Caboose::Page.subnav(@page, session['use_redirect_urls'], @user)
|
61
|
+
|
47
62
|
#@subnav.links = @tasks.collect {|href, task| {'href' => href, 'text' => task, 'is_current' => uri == href}}
|
63
|
+
|
64
|
+
@resources = view_formatted_resources(@page)
|
48
65
|
|
49
66
|
end
|
50
67
|
|
51
68
|
def asset
|
52
|
-
|
53
69
|
uri = uri.to_s.gsub(/^(.*?)\?.*?$/, '\1')
|
54
70
|
uri.chop! if uri.end_with?('/')
|
55
71
|
uri[0] = '' if uri.starts_with?('/')
|
56
|
-
|
72
|
+
|
57
73
|
page = Page.page_with_uri(File.dirname(uri), false)
|
58
74
|
if (page.nil? || !page)
|
59
75
|
render :file => "caboose/extras/error404", :layout => "caboose/error404"
|
60
76
|
return
|
61
77
|
end
|
62
78
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
#
|
82
|
-
#$path = ASSETS_PATH ."/". $asset->id .".". $asset->extension
|
83
|
-
#
|
84
|
-
#$finfo = finfo_open(FILEINFO_MIME_TYPE) // return mime type ala mimetype extension
|
85
|
-
#$mime = finfo_file($finfo, $path)
|
86
|
-
#finfo_close($finfo)
|
79
|
+
asset = Asset.where(:page_id => page.id, :filename => File.basename(uri)).first
|
80
|
+
if (asset.nil?)
|
81
|
+
render :file => "caboose/extras/error404", :layout => "caboose/error404"
|
82
|
+
return
|
83
|
+
end
|
84
|
+
|
85
|
+
user = logged_in_user
|
86
|
+
if (!Page.is_allowed(user, asset.page_id, 'view'))
|
87
|
+
render "caboose/pages/asset_no_permission"
|
88
|
+
return
|
89
|
+
end
|
90
|
+
|
91
|
+
#Caboose.log(Caboose::assets_path, 'Caboose::assets_path')
|
92
|
+
path = Caboose::assets_path.join("#{asset.id}.#{asset.extension}")
|
93
|
+
#Caboose.log("Sending asset #{path}")
|
94
|
+
#send_file(path)
|
95
|
+
#send_file(path, :filename => "your_document.pdf", :type => "application/pdf")
|
96
|
+
|
87
97
|
#
|
88
|
-
|
89
|
-
|
90
|
-
|
98
|
+
#$path = ASSETS_PATH ."/". $asset->id .".". $asset->extension
|
99
|
+
#
|
100
|
+
#$finfo = finfo_open(FILEINFO_MIME_TYPE) // return mime type ala mimetype extension
|
101
|
+
#$mime = finfo_file($finfo, $path)
|
102
|
+
#finfo_close($finfo)
|
103
|
+
#
|
104
|
+
#header("X-Sendfile: $path")
|
105
|
+
#header("Content-Type: $mime")
|
106
|
+
#header("Content-Disposition: inline filename=\"$asset->filename\"")
|
91
107
|
|
92
108
|
end
|
93
109
|
|
94
110
|
# GET /pages/new
|
95
111
|
def new
|
96
|
-
return
|
112
|
+
return unless user_is_allowed('pages', 'add')
|
97
113
|
@parent_id = params[:parent_id].nil? ? params[:parent_id] : 1
|
98
114
|
@parent = Page.find(@parent_id)
|
99
115
|
render :layout => 'caboose/modal'
|
@@ -107,64 +123,72 @@ module Caboose
|
|
107
123
|
|
108
124
|
# GET /pages/1/edit
|
109
125
|
def edit
|
110
|
-
return
|
126
|
+
return unless user_is_allowed('pages', 'edit')
|
111
127
|
@page = Page.find(params[:id])
|
128
|
+
@resources = view_formatted_resources(@page)
|
112
129
|
end
|
113
130
|
|
114
131
|
# GET /pages/1/edit-title
|
115
132
|
def edit_title
|
116
|
-
return
|
133
|
+
return unless user_is_allowed('pages', 'edit')
|
117
134
|
@page = Page.find(params[:id])
|
118
135
|
render :layout => 'caboose/modal'
|
119
136
|
end
|
120
137
|
|
121
138
|
# GET /pages/1/edit-content
|
122
139
|
def edit_content
|
123
|
-
return
|
140
|
+
return unless user_is_allowed('pages', 'edit')
|
124
141
|
@page = Page.find(params[:id])
|
125
142
|
render :layout => 'caboose/modal'
|
126
143
|
end
|
127
144
|
|
128
145
|
# GET /pages/1/edit-settings
|
129
146
|
def edit_settings
|
130
|
-
return
|
147
|
+
return unless user_is_allowed('pages', 'edit')
|
131
148
|
@page = Page.find(params[:id])
|
132
149
|
render :layout => 'caboose/modal'
|
133
150
|
end
|
134
151
|
|
135
152
|
# GET /pages/1/edit-css
|
136
153
|
def edit_css
|
137
|
-
return
|
154
|
+
return unless user_is_allowed('pages', 'edit')
|
138
155
|
@page = Page.find(params[:id])
|
139
156
|
render :layout => 'caboose/modal'
|
140
157
|
end
|
141
158
|
|
142
159
|
# GET /pages/1/edit-js
|
143
160
|
def edit_js
|
144
|
-
return
|
161
|
+
return unless user_is_allowed('pages', 'edit')
|
145
162
|
@page = Page.find(params[:id])
|
146
163
|
render :layout => 'caboose/modal'
|
147
164
|
end
|
148
165
|
|
149
166
|
# GET /pages/1/edit-seo
|
150
167
|
def edit_seo
|
151
|
-
return
|
168
|
+
return unless user_is_allowed('pages', 'edit')
|
169
|
+
@page = Page.find(params[:id])
|
170
|
+
render :layout => 'caboose/modal'
|
171
|
+
end
|
172
|
+
|
173
|
+
# GET /pages/1/edit-resources
|
174
|
+
def edit_resources
|
175
|
+
return unless user_is_allowed('pages', 'edit')
|
152
176
|
@page = Page.find(params[:id])
|
153
177
|
render :layout => 'caboose/modal'
|
154
178
|
end
|
155
179
|
|
156
180
|
# POST /pages
|
157
181
|
def create
|
158
|
-
return
|
159
|
-
|
182
|
+
return unless user_is_allowed('pages', 'add')
|
183
|
+
|
160
184
|
resp = Caboose::StdClass.new({
|
161
185
|
'error' => nil,
|
162
186
|
'redirect' => nil
|
163
187
|
})
|
164
|
-
|
188
|
+
|
165
189
|
parent_id = params[:parent_id]
|
166
190
|
title = params[:title]
|
167
|
-
|
191
|
+
|
168
192
|
if (title.strip.length == 0)
|
169
193
|
resp.error = "A page title is required."
|
170
194
|
elsif (!logged_in_user.is_allowed('all', 'all') &&
|
@@ -176,119 +200,155 @@ module Caboose
|
|
176
200
|
render json: resp
|
177
201
|
return
|
178
202
|
end
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
203
|
+
|
204
|
+
parent = Caboose::Page.find(parent_id)
|
205
|
+
|
206
|
+
page = Caboose::Page.new
|
207
|
+
page.title = title
|
208
|
+
page.parent_id = parent_id
|
209
|
+
page.hide = true
|
210
|
+
page.content_format = Caboose::Page::CONTENT_FORMAT_HTML
|
211
|
+
|
212
|
+
i = 0
|
213
|
+
begin
|
214
|
+
page.slug = Page.slug(page.title + (i > 0 ? " #{i}" : ""))
|
215
|
+
page.uri = parent.parent_id == -1 ? page.slug : "#{parent.uri}/#{page.slug}"
|
216
|
+
i = i+1
|
217
|
+
end while (Page.where(:uri => page.uri).count > 0 && i < 10)
|
218
|
+
|
219
|
+
page.save
|
220
|
+
|
221
|
+
# Set the new page's permissions
|
222
|
+
viewers = Caboose::PagePermission.where({ :page_id => parent.id, :action => 'view' }).pluck(:role_id)
|
223
|
+
editors = Caboose::PagePermission.where({ :page_id => parent.id, :action => 'edit' }).pluck(:role_id)
|
224
|
+
Caboose::Page.update_authorized_for_action(page.id, 'view', viewers)
|
225
|
+
Caboose::Page.update_authorized_for_action(page.id, 'edit', editors)
|
226
|
+
|
227
|
+
# Send back the response
|
228
|
+
resp.redirect = "/pages/#{page.id}/edit"
|
205
229
|
render json: resp
|
206
230
|
end
|
207
231
|
|
208
232
|
# PUT /pages/1
|
209
233
|
def update
|
210
|
-
return
|
234
|
+
return unless user_is_allowed('pages', 'edit')
|
211
235
|
|
212
236
|
resp = StdClass.new({'attributes' => {}})
|
213
237
|
page = Page.find(params[:id])
|
214
238
|
|
215
239
|
save = true
|
216
240
|
user = logged_in_user
|
217
|
-
params.each do |name,value|
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
241
|
+
params.each do |name, value|
|
242
|
+
case name
|
243
|
+
when 'parent_id'
|
244
|
+
if (page.id == value)
|
245
|
+
resp.error = "The page's parent cannot be itself."
|
246
|
+
elsif (Page.is_child(page.id, value))
|
247
|
+
resp.error = "You can't set the current page's parent to be one of its child pages."
|
248
|
+
elsif (value != page.parent_id)
|
249
|
+
p = Page.find(value)
|
250
|
+
if (!user.is_allowed(p, 'edit'))
|
251
|
+
resp.error = "You don't have access to put the current page there."
|
252
|
+
end
|
253
|
+
end
|
254
|
+
if (resp.error.length > 0)
|
255
|
+
save = false
|
256
|
+
else
|
257
|
+
parent = Page.find(value)
|
258
|
+
Page.update_parent(page.id, value)
|
259
|
+
resp.attributes['parent_id'] = { 'text' => parent.title }
|
260
|
+
end
|
261
|
+
|
262
|
+
when 'custom_css', 'custom_js'
|
263
|
+
value.strip!
|
264
|
+
page[name.to_sym] = value
|
265
|
+
|
266
|
+
when 'title', 'menu_title', 'alias', 'hide', 'layout', 'redirect_url',
|
267
|
+
'seo_title', 'meta_description', 'fb_description', 'gp_description', 'canonical_url'
|
268
|
+
page[name.to_sym] = value
|
269
|
+
|
270
|
+
when 'linked_resources'
|
271
|
+
result = ''
|
272
|
+
value.each_line do |line|
|
273
|
+
|
274
|
+
line.strip!
|
275
|
+
next if line.empty?
|
276
|
+
|
277
|
+
comps = line.split('.')
|
278
|
+
if comps.length < 2
|
279
|
+
resp.error = "Resource '#{line}' has an unspecified file type. (e.g. given 'myScript.js', '.js' would specify a javascript file type.)"
|
280
|
+
save = false
|
281
|
+
next
|
282
|
+
end
|
283
|
+
|
284
|
+
case comps.last
|
285
|
+
when 'js', 'css'
|
286
|
+
if value =~ URI::regexp()
|
287
|
+
uri = URI.parse(value)
|
288
|
+
if !(uri =~ URI::HTTP || uri =~ URI::HTTPS)
|
289
|
+
resp.error = "Resource '#{line}' is an unrecognized URI format."
|
290
|
+
save = false
|
291
|
+
end
|
292
|
+
end
|
293
|
+
else
|
294
|
+
resp.error = "Resource '#{line}' has an unsupported file type ('#{comps.last}')."
|
295
|
+
save = false
|
296
|
+
next
|
297
|
+
end
|
298
|
+
|
299
|
+
result += "\n" unless result.empty?
|
300
|
+
result += line
|
301
|
+
end
|
302
|
+
page.linked_resources = result
|
303
|
+
|
304
|
+
when 'content_format'
|
305
|
+
page.content_format = value
|
306
|
+
resp.attributes['content_format'] = { 'text' => value }
|
307
|
+
|
308
|
+
when 'meta_robots'
|
309
|
+
if (value.include?('index') && value.include?('noindex'))
|
310
|
+
resp.error = "You can't have both index and noindex"
|
311
|
+
save = false
|
312
|
+
elsif (value.include?('follow') && value.include?('nofollow'))
|
313
|
+
resp.error = "You can't have both follow and nofollow"
|
314
|
+
save = false
|
315
|
+
else
|
316
|
+
page.meta_robots = value.join(', ')
|
317
|
+
resp.attributes['meta_robots'] = { 'text' => page.meta_robots }
|
318
|
+
end
|
319
|
+
|
320
|
+
when 'content'
|
321
|
+
page.content = value.strip.gsub(/<meta.*?>/, '').gsub(/<link.*?>/, '').gsub(/\<\!--[\S\s]*?--\>/, '')
|
322
|
+
|
323
|
+
when 'slug'
|
324
|
+
page.slug = Page.slug(value.strip.length > 0 ? value : page.title)
|
325
|
+
resp.attributes['slug'] = { 'value' => page.slug }
|
326
|
+
|
327
|
+
when 'custom_sort_children'
|
328
|
+
if (value == 0)
|
329
|
+
page.children.each do |p|
|
330
|
+
p.sort_order = 1
|
331
|
+
p.save
|
332
|
+
end
|
333
|
+
end
|
334
|
+
page.custom_sort_children = value
|
335
|
+
|
336
|
+
when 'viewers'
|
337
|
+
Page.update_authorized_for_action(page.id, 'view', value)
|
338
|
+
when 'editors'
|
339
|
+
Page.update_authorized_for_action(page.id, 'edit', value)
|
340
|
+
when 'approvers'
|
341
|
+
Page.update_authorized_for_action(page.id, 'approve', value)
|
342
|
+
end
|
343
|
+
end
|
344
|
+
|
345
|
+
resp.success = save && page.save
|
346
|
+
render json: resp
|
287
347
|
end
|
288
348
|
|
289
349
|
# DELETE /pages/1
|
290
350
|
def destroy
|
291
|
-
return
|
351
|
+
return unless user_is_allowed('pages', 'delete')
|
292
352
|
user = Page.find(params[:id])
|
293
353
|
user.destroy
|
294
354
|
|
@@ -300,58 +360,58 @@ module Caboose
|
|
300
360
|
|
301
361
|
def sitemap
|
302
362
|
parent_id = params[:parent_id]
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
363
|
+
top_page = Page.index_page
|
364
|
+
p = !parent_id.nil? ? Page.find(parent_id) : top_page
|
365
|
+
options = []
|
366
|
+
sitemap_helper2(top_page, options)
|
367
|
+
@options = options
|
308
368
|
end
|
309
|
-
|
369
|
+
|
310
370
|
def sitemap_helper2(page, options, prefix = '')
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
371
|
+
options << { 'value' => page.id, 'text' => prefix + page.title }
|
372
|
+
page.children.each do |kid|
|
373
|
+
sitemap_helper(kid, options, prefix + ' - ')
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
317
377
|
def sitemap_options
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
378
|
+
parent_id = params[:parent_id]
|
379
|
+
top_page = Page.index_page
|
380
|
+
p = !parent_id.nil? ? Page.find(parent_id) : top_page
|
381
|
+
options = []
|
382
|
+
sitemap_helper(top_page, options)
|
383
|
+
|
384
|
+
render json: options
|
385
|
+
end
|
386
|
+
|
387
|
+
def sitemap_helper(page, options, prefix = '')
|
388
|
+
options << { 'value' => page.id, 'text' => prefix + page.title }
|
389
|
+
page.children.each do |kid|
|
390
|
+
sitemap_helper(kid, options, prefix + ' - ')
|
391
|
+
end
|
392
|
+
end
|
393
|
+
|
394
|
+
def robots_options
|
395
|
+
options = [
|
396
|
+
{ 'value' => 'index' , 'text' => 'index' },
|
397
|
+
{ 'value' => 'noindex' , 'text' => 'noindex' },
|
398
|
+
{ 'value' => 'follow' , 'text' => 'follow' },
|
399
|
+
{ 'value' => 'nofollow' , 'text' => 'nofollow' },
|
400
|
+
{ 'value' => 'nosnippet' , 'text' => 'nosnippet' },
|
401
|
+
{ 'value' => 'noodp' , 'text' => 'noodp' },
|
402
|
+
{ 'value' => 'noarchive' , 'text' => 'noarchive' }
|
403
|
+
]
|
404
|
+
render json: options
|
405
|
+
end
|
406
|
+
|
407
|
+
def content_format_options
|
408
|
+
options = [
|
409
|
+
{ 'value' => 'html', 'text' => 'html' },
|
410
|
+
{ 'value' => 'text', 'text' => 'text' },
|
411
|
+
{ 'value' => 'ruby', 'text' => 'ruby' }
|
412
|
+
]
|
413
|
+
render json: options
|
414
|
+
end
|
355
415
|
|
356
416
|
end
|
357
417
|
end
|