Class: Kuhsaft::AssetBrick
- Inherits:
-
Brick
- Object
- ActiveRecord::Base
- Brick
- Kuhsaft::AssetBrick
show all
- Defined in:
- app/models/kuhsaft/asset_brick.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Brick
#available_display_styles, #backend_label, #brick_list_type, #has_siblings?, #parents, #set_position, #to_edit_childs_partial_path, #to_edit_partial_path, #to_style_id, #update_fulltext
Methods included from BrickList
#allowed_brick_types, #brick_types, included, #renders_own_childs?, #to_brick_item_id, #to_brick_list_id, #uploader?, #user_can_delete?, #user_can_save?
Class Method Details
.styles ⇒ Object
9
10
11
|
# File 'app/models/kuhsaft/asset_brick.rb', line 9
def self.styles
%w(pdf word excel button)
end
|
Instance Method Details
#asset_present? ⇒ Boolean
25
26
27
|
# File 'app/models/kuhsaft/asset_brick.rb', line 25
def asset_present?
asset.present?
end
|
#collect_fulltext ⇒ Object
17
18
19
|
# File 'app/models/kuhsaft/asset_brick.rb', line 17
def collect_fulltext
[super, caption].join(' ')
end
|
#to_style_class ⇒ Object
13
14
15
|
# File 'app/models/kuhsaft/asset_brick.rb', line 13
def to_style_class
[super, link_style.presence].join(' ')
end
|
#user_can_add_childs? ⇒ Boolean
21
22
23
|
# File 'app/models/kuhsaft/asset_brick.rb', line 21
def user_can_add_childs?
false
end
|