Class: Decidim::Comments::CommentActivityCell

Inherits:
ActivityCell
  • Object
show all
Includes:
CommentCellsHelper
Defined in:
app/cells/decidim/comments/comment_activity_cell.rb

Overview

A cell to display when a comment has been created.

Instance Method Summary collapse

Methods included from CommentCellsHelper

#renderable?, #resource_link_path, #resource_link_text, #root_commentable_title, #url_params

Instance Method Details

#commentObject



27
28
29
# File 'app/cells/decidim/comments/comment_activity_cell.rb', line 27

def comment
  model.resource_lazy
end

#hide_participatory_space?Boolean

Returns:

  • (Boolean)


25
# File 'app/cells/decidim/comments/comment_activity_cell.rb', line 25

def hide_participatory_space? = false

#participatory_spaceObject



13
14
15
# File 'app/cells/decidim/comments/comment_activity_cell.rb', line 13

def participatory_space
  model.participatory_space_lazy
end

#participatory_space_iconObject



21
22
23
# File 'app/cells/decidim/comments/comment_activity_cell.rb', line 21

def participatory_space_icon
  resource_type_icon(root_commentable.class)
end


17
18
19
# File 'app/cells/decidim/comments/comment_activity_cell.rb', line 17

def participatory_space_link
  link_to(root_commentable_title, resource_link_path)
end

#titleObject



9
10
11
# File 'app/cells/decidim/comments/comment_activity_cell.rb', line 9

def title
  I18n.t("decidim.comments.last_activity.new_comment")
end