Class: Decidim::CardCell

Inherits:
ViewModel
  • Object
show all
Defined in:
app/cells/decidim/card_cell.rb

Overview

This cell renders the card of the given instance of a Component delegated to the components' cell if specified in the manifest otherwise a primary cell will be shown.

Direct Known Subclasses

UserProfileCell

Constant Summary collapse

ICONS_MAPPING =
{
  published_at: "calendar-line",
  votings_count: "check-double-line",
  followers_count: "user-voice-line",
  participatory_space: "treasure-map-line"
}.freeze

Instance Method Summary collapse

Instance Method Details

#metadataObject



29
30
31
# File 'app/cells/decidim/card_cell.rb', line 29

def 
  @metadata ||= 
end

#showObject



15
16
17
18
19
20
21
# File 'app/cells/decidim/card_cell.rb', line 15

def show
  if resource_cell?
    cell(resource_cell, model, options)
  else
    render :show
  end
end

#titleObject



23
24
25
26
27
# File 'app/cells/decidim/card_cell.rb', line 23

def title
  return if title_value.blank?

  render
end