Class: Kuhsaft::TwoColumnBrick

Inherits:
ColumnBrick show all
Defined in:
app/models/kuhsaft/two_column_brick.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BrickList

#allowed_brick_types, #brick_types, #collect_fulltext, included, #to_brick_item_id, #to_brick_list_id, #uploader?

Methods inherited from Brick

#available_display_styles, #backend_label, #brick_list_type, #cache_key, #has_siblings?, #parents, #partial_digest, #set_position, #to_edit_childs_partial_path, #to_edit_partial_path, #to_style_id, #translated_available_display_styles, #update_fulltext

Class Method Details

.partitioningsObject



32
33
34
# File 'app/models/kuhsaft/two_column_brick.rb', line 32

def self.partitionings
  [Partition.new('70/30', 0), Partition.new('50/50', 1), Partition.new('30/70', 2)]
end

Instance Method Details

#partitioningObject



28
29
30
# File 'app/models/kuhsaft/two_column_brick.rb', line 28

def partitioning
  super || 0
end

#renders_own_childs?Boolean

Use own rendering implementation to show columns side by side

Returns:

  • (Boolean)


24
25
26
# File 'app/models/kuhsaft/two_column_brick.rb', line 24

def renders_own_childs?
  true
end

#to_style_classObject



36
37
38
# File 'app/models/kuhsaft/two_column_brick.rb', line 36

def to_style_class
  [super, 'row-fluid'].join(' ')
end

#user_can_add_childs?Boolean

Childs should only contain ColumnBricks, therefore we don’t want the user to mess with it

Returns:

  • (Boolean)


9
10
11
# File 'app/models/kuhsaft/two_column_brick.rb', line 9

def user_can_add_childs?
  false
end

#user_can_delete?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/models/kuhsaft/two_column_brick.rb', line 13

def user_can_delete?
  true
end

#user_can_save?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/models/kuhsaft/two_column_brick.rb', line 17

def user_can_save?
  true
end