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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzhlMzNkYzE1YTRiM2FmY2RhZTBlODVjYTEyY2VjZTM4YWNiYWZjNA==
4
+ NTJhY2JkMjI5NDA5ZWJiYmM4NDQ1MzAwYTc4YWY5MWZjMmMxODFjZQ==
5
5
  data.tar.gz: !binary |-
6
- ZGI2ZGYyNDJhZTEwNjU3ZDhjODM2NTQxMGFkOGNhZDllMzQ0NDg4Mw==
6
+ YzBhMWFjNjNmZDQ5MzE3ZDA1OTZkMzU3Y2NjMTcyMGE4Y2VmZDRjZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZmQ2MWY0YThkYzA1YWJlNjI2MThiYjMyOTZkYjQ3NzcyYTY5ZTA5ZmE5YWRh
10
- MDNmOGRiMzE2ZTBiNzIzODFiMTUzN2UwNmQ3MjZjZTI5ZjFmMDQ4M2RkYWI0
11
- NTAwYmQ4MTFkZTU5OWEyZjI2MDQ3NWJmMDgzNDY4YzdlMGRlYzk=
9
+ YzNkZDk0N2ZiM2Q2MmZmZTY3NDhjN2I0ZTgwY2Y3MDFlMWMzOGM0MzNjMzNk
10
+ YzQyZWRjOWIyMzhkYjM2ZTdjMzY5MjM5YmE2YWI1ODczMGRhMmI1ZDAzZGE4
11
+ ZGQyNDg0MmIzYjQ5NDZiNDBkMDYzYzhlNWE5MDM0ODQwZmU1Mjc=
12
12
  data.tar.gz: !binary |-
13
- Nzk1ZTBhZWY1NTc4MzM5YmVjNDRkM2VjYjIxOWI1NzI4ZmMyNGVmM2IxOGNj
14
- YWE0MGJhMWE0M2RlMjk3M2JiMDExZDNmYjQwOGIxYTkzNjZkOTY0OTUzY2Ji
15
- OTFjOWVkN2M4YjhiMzMyN2ZmYWZjNTBkYmFjOGI5Njc1MDIzYzQ=
13
+ ODMzZjg5Y2YzYTk1MTAzNTg4ZmFkYTljMjExNmVmOThjN2I3YzBiN2ZiMTY3
14
+ YjI4Y2EyZWU3YmFmNjAzMWUxNGRmNWMzZWUwNGZhMzUwM2M4NDlmYzc0NjBh
15
+ ZWI1ZGJkMGFlOTVjY2VkY2U1NzdjOThlMTI2MDUyMjlkMWY5Yzk=
@@ -47,8 +47,8 @@ module Caboose
47
47
  end
48
48
  end
49
49
  render :json => blocks
50
- end
51
-
50
+ end
51
+
52
52
  def admin_tree_helper(b)
53
53
  arr = []
54
54
  b.children.each do |b2|
@@ -355,14 +355,15 @@ module Caboose
355
355
  resp.attributes['content_format'] = { 'text' => value }
356
356
 
357
357
  when 'meta_robots'
358
- if (value.include?('index') && value.include?('noindex'))
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 (value.include?('follow') && value.include?('nofollow'))
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 = value.join(', ')
365
+ else
366
+ page.meta_robots = arr.join(', ')
366
367
  resp.attributes['meta_robots'] = { 'text' => page.meta_robots }
367
368
  end
368
369
 
@@ -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
- <%= raw ERB.new(block.block_type.render_function).result(self.instance_eval { binding }) %>
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 },
@@ -21,6 +21,7 @@
21
21
  b = @page.block
22
22
  b.create_children
23
23
  end
24
+ #b.log_helper
24
25
  str = b.render(b, {
25
26
  :view => self,
26
27
  :controller_view_content => yield,
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.4.53'
2
+ VERSION = '0.4.54'
3
3
  end
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.53
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-25 00:00:00.000000000 Z
11
+ date: 2014-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails