Class: Decidim::Debates::DebateActivityCell

Inherits:
ActivityCell
  • Object
show all
Defined in:
decidim-debates/app/cells/decidim/debates/debate_activity_cell.rb

Overview

A cell to display when actions happen on a debate.

Constant Summary

Constants included from IconHelper

IconHelper::DEFAULT_RESOURCE_TYPE_ICONS

Instance Method Summary collapse

Methods inherited from ActivityCell

#cache_hash, #created_at, #description, #element_id, #renderable?, #resource, #resource_link_path, #show, #user

Methods included from IconHelper

#component_icon, #manifest_icon, #resource_icon, #resource_type_icon, #resource_type_icon_key

Instance Method Details



11
12
13
# File 'decidim-debates/app/cells/decidim/debates/debate_activity_cell.rb', line 11

def resource_link_text
  Decidim::Debates::DebatePresenter.new(resource).title
end

#titleObject



7
8
9
# File 'decidim-debates/app/cells/decidim/debates/debate_activity_cell.rb', line 7

def title
  action == "update" ? I18n.t("decidim.debates.last_activity.debate_updated") : I18n.t("decidim.debates.last_activity.new_debate")
end