caboose-cms 0.9.209 → 0.9.210
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/caboose/block.rb +12 -92
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa4b9f3f961e868b7baef178a2bc4c19e0bbe86ad159f886809c503b11c127ee
|
4
|
+
data.tar.gz: 6aee3e09b6a7565dd94c678c5f0918a880c8e2024d3b85caae811332dc94989b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 366712d4d4dc14b5e8de78c48352aab495452641ff37d05675b180199195267232a8ffdfd24ade7a747e444efa4827c405dc13016d6d8c47f6b06692e9b97e06
|
7
|
+
data.tar.gz: 0bf9f3779b3a90f8c6a2a2a459f662dae9aa7023eea5da03fb22bfc7a75cd1d8416e6a978afe952a575fbbc0ef713b1c4e282bcf7669d6d89789e899cfae445f
|
data/app/models/caboose/block.rb
CHANGED
@@ -52,13 +52,6 @@ class Caboose::Block < ActiveRecord::Base
|
|
52
52
|
end
|
53
53
|
self.block_type_id = bt.id
|
54
54
|
end
|
55
|
-
#if self.block_type_id.field_type.nil?
|
56
|
-
# self.block_type.field_type = 'text'
|
57
|
-
#end
|
58
|
-
#if self.block_type.field_type == 'checkbox'
|
59
|
-
# v = self.value
|
60
|
-
# self.value = v ? (v == 1 || v == '1' || v == true ? 1 : 0) : 0
|
61
|
-
#end
|
62
55
|
end
|
63
56
|
|
64
57
|
def full_name
|
@@ -245,53 +238,8 @@ class Caboose::Block < ActiveRecord::Base
|
|
245
238
|
if site.nil?
|
246
239
|
self.block_message(block, "Error: site variable is nil.")
|
247
240
|
end
|
248
|
-
|
249
|
-
#begin str = view.render(:partial => "../../sites/#{site.name}/blocks/#{full_name}", :locals => options2)
|
250
|
-
#rescue ActionView::MissingTemplate => ex
|
251
|
-
# begin str = view.render(:partial => "../../sites/#{site.name}/blocks/#{block.block_type.name}", :locals => options2)
|
252
|
-
# rescue ActionView::MissingTemplate => ex
|
253
|
-
# begin str = view.render(:partial => "../../sites/#{site.name}/blocks/#{block.block_type.field_type}", :locals => options2)
|
254
|
-
# rescue ActionView::MissingTemplate => ex
|
255
|
-
# begin str = view.render(:partial => "../../app/views/caboose/blocks/#{full_name}", :locals => options2)
|
256
|
-
# rescue ActionView::MissingTemplate => ex
|
257
|
-
# begin str = view.render(:partial => "../../app/views/caboose/blocks/#{block.block_type.name}", :locals => options2)
|
258
|
-
# rescue ActionView::MissingTemplate => ex
|
259
|
-
# begin str = view.render(:partial => "../../app/views/caboose/blocks/#{block.block_type.field_type}", :locals => options2)
|
260
|
-
# rescue ActionView::MissingTemplate => ex
|
261
|
-
# begin str = view.render(:partial => "caboose/blocks/#{full_name}", :locals => options2)
|
262
|
-
# rescue ActionView::MissingTemplate => ex
|
263
|
-
# begin str = view.render(:partial => "caboose/blocks/#{block.block_type.name}", :locals => options2)
|
264
|
-
# rescue ActionView::MissingTemplate => ex
|
265
|
-
# begin str = view.render(:partial => "caboose/blocks/#{block.block_type.field_type}", :locals => options2)
|
266
|
-
# rescue Exception => ex
|
267
|
-
# str = "<p class='note error'>#{self.block_message(block, ex)}</p>"
|
268
|
-
# end
|
269
|
-
# rescue Exception => ex { str = "<p class='note error'>#{self.block_message(block, ex)}</p>" }
|
270
|
-
# end
|
271
|
-
# rescue Exception => ex { str = "<p class='note error'>#{self.block_message(block, ex)}</p>" }
|
272
|
-
# end
|
273
|
-
# rescue Exception => ex { str = "<p class='note error'>#{self.block_message(block, ex)}</p>" }
|
274
|
-
# end
|
275
|
-
# rescue Exception => ex { str = "<p class='note error'>#{self.block_message(block, ex)}</p>" }
|
276
|
-
# end
|
277
|
-
# rescue Exception => ex { str = "<p class='note error'>#{self.block_message(block, ex)}</p>" }
|
278
|
-
# end
|
279
|
-
# rescue Exception => ex { str = "<p class='note error'>#{self.block_message(block, ex)}</p>" }
|
280
|
-
# end
|
281
|
-
#rescue Exception => ex { str = "<p class='note error'>#{self.block_message(block, ex)}</p>" }
|
282
|
-
#end
|
283
241
|
|
284
242
|
arr = [
|
285
|
-
#"../../sites/#{site.name}/blocks/#{full_name}",
|
286
|
-
#"../../sites/#{site.name}/blocks/#{block.block_type.name}",
|
287
|
-
#"../../sites/#{site.name}/blocks/#{block.block_type.field_type}",
|
288
|
-
#"../../app/views/caboose/blocks/#{full_name}",
|
289
|
-
#"../../app/views/caboose/blocks/#{block.block_type.name}",
|
290
|
-
#"../../app/views/caboose/blocks/#{block.block_type.field_type}",
|
291
|
-
#"caboose/blocks/#{full_name}",
|
292
|
-
#"caboose/blocks/#{block.block_type.name}",
|
293
|
-
#"caboose/blocks/#{block.block_type.field_type}"
|
294
|
-
|
295
243
|
"../../app/views/caboose/blocks/#{site.name}/#{full_name}",
|
296
244
|
"../../app/views/caboose/blocks/#{site.name}/#{block.block_type.name}",
|
297
245
|
"../../app/views/caboose/blocks/#{site.name}/#{block.block_type.field_type}",
|
@@ -305,10 +253,6 @@ class Caboose::Block < ActiveRecord::Base
|
|
305
253
|
"caboose/blocks/#{block.block_type.field_type}"
|
306
254
|
]
|
307
255
|
|
308
|
-
# Caboose.log("searching #{arr.to_s}")
|
309
|
-
|
310
|
-
# Caboose.log("editing: " + options2[:editing].to_s)
|
311
|
-
|
312
256
|
if options2[:editing] == true
|
313
257
|
if !block.new_value.blank? && block.new_value != 'EMPTY'
|
314
258
|
block.value = block.new_value
|
@@ -316,32 +260,15 @@ class Caboose::Block < ActiveRecord::Base
|
|
316
260
|
block.value = nil
|
317
261
|
end
|
318
262
|
block.media_id = block.new_media_id if !block.new_media_id.nil?
|
319
|
-
|
320
|
-
# block.parent_id = block.new_parent_id if !block.new_parent_id.blank?
|
321
|
-
# Caboose.log("temp setting #{block.id}")
|
322
|
-
# block.children.each do |bc|
|
323
|
-
# Caboose.log("temp setting #{bc.id}")
|
324
|
-
# bc.value = bc.new_value if !bc.new_value.blank?
|
325
|
-
# bc.sort_order = bc.new_sort_order if !bc.new_sort_order.blank?
|
326
|
-
# bc.parent_id = bc.new_parent_id if !bc.new_parent_id.blank?
|
327
|
-
# Caboose.log("bc value: #{bc.value}")
|
328
|
-
# end
|
329
|
-
|
330
|
-
# if block && block.id == 430363
|
331
|
-
# Caboose.log( block.value )
|
332
|
-
# end
|
333
|
-
|
334
|
-
if block.status != 'deleted' #&& ( block.new_parent_id.blank? || options2[:is_new] )
|
263
|
+
if block.status != 'deleted'
|
335
264
|
str = self.render_helper(view, options2, block, full_name, arr, 0)
|
336
265
|
end
|
337
|
-
# str.gsub('child_value','edited_child_value')
|
338
266
|
else
|
339
267
|
if block.status != 'added'
|
340
268
|
str = self.render_helper(view, options2, block, full_name, arr, 0)
|
341
269
|
end
|
342
270
|
end
|
343
271
|
|
344
|
-
|
345
272
|
end
|
346
273
|
return str
|
347
274
|
end
|
@@ -415,17 +342,20 @@ class Caboose::Block < ActiveRecord::Base
|
|
415
342
|
view = options2[:view]
|
416
343
|
view = ActionView::Base.new(ActionController::Base.view_paths) if view.nil?
|
417
344
|
site = options[:site]
|
418
|
-
|
345
|
+
|
419
346
|
begin
|
420
|
-
#str = view.render(:partial => "../../sites/#{site.name}/blocks/#{name}", :locals => options2)
|
421
347
|
str = view.render(:partial => "../../app/views/caboose/blocks/#{site.name}/#{name}", :locals => options2)
|
422
348
|
rescue ActionView::MissingTemplate => ex
|
423
349
|
begin
|
424
|
-
str = view.render(:partial => "caboose/blocks/#{name}", :locals => options2)
|
425
|
-
rescue
|
426
|
-
|
427
|
-
|
428
|
-
|
350
|
+
str = view.render(:partial => "../../app/views/caboose/blocks/default_theme/#{name}", :locals => options2)
|
351
|
+
rescue ActionView::MissingTemplate => ex
|
352
|
+
begin
|
353
|
+
str = view.render(:partial => "caboose/blocks/#{name}", :locals => options2)
|
354
|
+
rescue Exception => ex
|
355
|
+
Caboose.log("Partial caboose/blocks/#{name} doesn't exist.")
|
356
|
+
str = "<p class='note error'>#{self.partial_message(name, ex)}</p>"
|
357
|
+
end
|
358
|
+
end
|
429
359
|
end
|
430
360
|
|
431
361
|
return str
|
@@ -441,16 +371,6 @@ class Caboose::Block < ActiveRecord::Base
|
|
441
371
|
return msg
|
442
372
|
end
|
443
373
|
|
444
|
-
#def child_block_link
|
445
|
-
# return "<div class='new_block' id='new_block_#{self.id}'>New Block</div>"
|
446
|
-
#end
|
447
|
-
#def new_block_before_link
|
448
|
-
# return "<div class='new_block_before' id='new_block_before_#{self.id}'>New Block</div>"
|
449
|
-
#end
|
450
|
-
#def new_block_after_link
|
451
|
-
# return "<div class='new_block_after' id='new_block_after_#{self.id}'>New Block</div>"
|
452
|
-
#end
|
453
|
-
|
454
374
|
def title
|
455
375
|
str = "#{self.block_type.name}"
|
456
376
|
if self.name && self.name.strip.length > 0
|
@@ -549,7 +469,7 @@ class Caboose::Block < ActiveRecord::Base
|
|
549
469
|
checked = arr[1].to_i == 1
|
550
470
|
if v == 'all'
|
551
471
|
if checked && b.block_type && !b.block_type.options.blank?
|
552
|
-
Caboose.log(b.block_type.options)
|
472
|
+
# Caboose.log(b.block_type.options)
|
553
473
|
return b.block_type.options.split("\n").join('|')
|
554
474
|
else
|
555
475
|
return ''
|
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.9.
|
4
|
+
version: 0.9.210
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|