caboose-cms 0.4.53 → 0.4.54
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/blocks_controller.rb +2 -2
- data/app/controllers/caboose/pages_controller.rb +5 -4
- data/app/models/caboose/block.rb +8 -0
- data/app/views/caboose/blocks/_render_function.html.erb +1 -1
- data/app/views/caboose/pages/admin_edit_seo.html.erb +1 -1
- data/app/views/layouts/caboose/application.html.erb +1 -0
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NTJhY2JkMjI5NDA5ZWJiYmM4NDQ1MzAwYTc4YWY5MWZjMmMxODFjZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzBhMWFjNjNmZDQ5MzE3ZDA1OTZkMzU3Y2NjMTcyMGE4Y2VmZDRjZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YzNkZDk0N2ZiM2Q2MmZmZTY3NDhjN2I0ZTgwY2Y3MDFlMWMzOGM0MzNjMzNk
|
10
|
+
YzQyZWRjOWIyMzhkYjM2ZTdjMzY5MjM5YmE2YWI1ODczMGRhMmI1ZDAzZGE4
|
11
|
+
ZGQyNDg0MmIzYjQ5NDZiNDBkMDYzYzhlNWE5MDM0ODQwZmU1Mjc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODMzZjg5Y2YzYTk1MTAzNTg4ZmFkYTljMjExNmVmOThjN2I3YzBiN2ZiMTY3
|
14
|
+
YjI4Y2EyZWU3YmFmNjAzMWUxNGRmNWMzZWUwNGZhMzUwM2M4NDlmYzc0NjBh
|
15
|
+
ZWI1ZGJkMGFlOTVjY2VkY2U1NzdjOThlMTI2MDUyMjlkMWY5Yzk=
|
@@ -355,14 +355,15 @@ module Caboose
|
|
355
355
|
resp.attributes['content_format'] = { 'text' => value }
|
356
356
|
|
357
357
|
when 'meta_robots'
|
358
|
-
|
358
|
+
arr = value.split(',').collect { |v| v.strip }
|
359
|
+
if arr.include?('index') && arr.include?('noindex')
|
359
360
|
resp.error = "You can't have both index and noindex"
|
360
361
|
save = false
|
361
|
-
elsif
|
362
|
+
elsif arr.include?('follow') && arr.include?('nofollow')
|
362
363
|
resp.error = "You can't have both follow and nofollow"
|
363
364
|
save = false
|
364
|
-
else
|
365
|
-
page.meta_robots =
|
365
|
+
else
|
366
|
+
page.meta_robots = arr.join(', ')
|
366
367
|
resp.attributes['meta_robots'] = { 'text' => page.meta_robots }
|
367
368
|
end
|
368
369
|
|
data/app/models/caboose/block.rb
CHANGED
@@ -125,6 +125,7 @@ class Caboose::Block < ActiveRecord::Base
|
|
125
125
|
#return erb.result(locals.instance_eval { binding })
|
126
126
|
|
127
127
|
#eval("def render_my_function\n#{block.block_type.render_function}\nend\n\n, :locals => options2)
|
128
|
+
#Caboose.log(block.id)
|
128
129
|
str = view.render(:partial => "caboose/blocks/render_function", :locals => options2)
|
129
130
|
else
|
130
131
|
#view = ActionView::Base.new(ActionController::Base.view_paths, options2, )
|
@@ -231,5 +232,12 @@ class Caboose::Block < ActiveRecord::Base
|
|
231
232
|
}
|
232
233
|
}
|
233
234
|
end
|
235
|
+
|
236
|
+
def log_helper(prefix = '')
|
237
|
+
puts "#{prefix}#{self.id}"
|
238
|
+
self.children.each do |b|
|
239
|
+
b.log_helper("#{prefix}-")
|
240
|
+
end
|
241
|
+
end
|
234
242
|
|
235
243
|
end
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
<% if block && block.block_type && block.block_type.render_function %><%= raw ERB.new(block.block_type.render_function).result(self.instance_eval { binding }) %><% end %>
|
@@ -18,7 +18,7 @@ $(document).ready(function() {
|
|
18
18
|
m = new ModelBinder({
|
19
19
|
name: 'Page',
|
20
20
|
id: <%= @page.id %>,
|
21
|
-
update_url: '/pages/<%= @page.id %>',
|
21
|
+
update_url: '/admin/pages/<%= @page.id %>',
|
22
22
|
authenticity_token: '<%= form_authenticity_token %>',
|
23
23
|
attributes: [
|
24
24
|
{ name: 'seo_title' , nice_name: 'SEO Title' , type: 'text' , value: <%= raw Caboose.json(@page.seo_title) %>, width: 580 },
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.54
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|