Class: Decidim::Proposals::ProposalActivityCell

Inherits:
ActivityCell
  • Object
show all
Defined in:
app/cells/decidim/proposals/proposal_activity_cell.rb

Overview

A cell to display when actions happen on a proposal.

Instance Method Summary collapse

Instance Method Details

#descriptionObject



15
16
17
# File 'app/cells/decidim/proposals/proposal_activity_cell.rb', line 15

def description
  strip_tags(presenter.body(links: true))
end

#presenterObject



19
20
21
# File 'app/cells/decidim/proposals/proposal_activity_cell.rb', line 19

def presenter
  @presenter ||= Decidim::Proposals::ProposalPresenter.new(resource)
end


11
12
13
# File 'app/cells/decidim/proposals/proposal_activity_cell.rb', line 11

def resource_link_text
  decidim_html_escape(presenter.title)
end

#titleObject



7
8
9
# File 'app/cells/decidim/proposals/proposal_activity_cell.rb', line 7

def title
  action == "update" ? I18n.t("decidim.proposals.last_activity.proposal_updated") : I18n.t("decidim.proposals.last_activity.new_proposal")
end