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.

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

Instance Method Details


22
23
24
# File 'decidim-debates/app/cells/decidim/debates/debate_activity_cell.rb', line 22

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

#titleObject


7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'decidim-debates/app/cells/decidim/debates/debate_activity_cell.rb', line 7

def title
  case action
  when "update"
    I18n.t(
      "decidim.debates.last_activity.debate_updated_at_html",
      link: participatory_space_link
    )
  else
    I18n.t(
      "decidim.debates.last_activity.new_debate_at_html",
      link: participatory_space_link
    )
  end
end