Class: Decidim::CardMetadataCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::CardMetadataCell
- Includes:
- IconHelper
- Defined in:
- decidim-core/app/cells/decidim/card_metadata_cell.rb
Overview
This cell is used to display metadata inside a list card so other cells only have to customize a few methods or overwrite views.
Constant Summary
Constants included from IconHelper
IconHelper::DEFAULT_RESOURCE_TYPE_ICONS
Instance Method Summary collapse
-
#initialize ⇒ CardMetadataCell
constructor
A new instance of CardMetadataCell.
- #show ⇒ Object
Methods included from IconHelper
#component_icon, #manifest_icon, #resource_icon, #resource_type_icon, #resource_type_icon_key
Constructor Details
#initialize ⇒ CardMetadataCell
Returns a new instance of CardMetadataCell.
17 18 19 20 21 22 |
# File 'decidim-core/app/cells/decidim/card_metadata_cell.rb', line 17 def initialize(*) super @items ||= [] @items << space_item if show_space? end |
Instance Method Details
#show ⇒ Object
11 12 13 14 15 |
# File 'decidim-core/app/cells/decidim/card_metadata_cell.rb', line 11 def show return if items.blank? render end |