File tree Expand file tree Collapse file tree
views/decidim/blogs/posts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ module Blogs
55 # The data store for a Blog in the Decidim::Blogs component. It stores a
66 # title, description and any other useful information to render a blog.
77 class Post < Blogs ::ApplicationRecord
8+ include Decidim ::Reportable
89 include Decidim ::Resourceable
910 include Decidim ::HasAttachments
1011 include Decidim ::HasAttachmentCollections
@@ -84,6 +85,21 @@ def users_to_notify_on_comment_created
8485 def attachment_context
8586 :admin
8687 end
88+
89+ # Public: Overrides the `reported_content_url` Reportable concern method.
90+ def reported_content_url
91+ ResourceLocatorPresenter . new ( self ) . url
92+ end
93+
94+ # Public: Overrides the `reported_attributes` Reportable concern method.
95+ def reported_attributes
96+ [ :title , :body ]
97+ end
98+
99+ # Public: Overrides the `reported_searchable_content_extras` Reportable concern method.
100+ def reported_searchable_content_extras
101+ [ ]
102+ end
87103 end
88104 end
89105end
Original file line number Diff line number Diff line change 1313
1414 <%= cell "decidim/share_button" , nil %>
1515
16- <%= cell "decidim/report_button" , nil %>
16+ <%= cell "decidim/report_button" , post %>
1717 </ div >
1818</ div >
1919
You can’t perform that action at this time.
0 commit comments