Sha256: beea5276770720e9fd061a52d6c3fd152c813bc2aa0a2041aa41e234247b7c5b
Contents?: true
Size: 1.24 KB
Versions: 44
Compression:
Stored size: 1.24 KB
Contents
= Reportable == Resources can be reportable `Reportable` is a feature that allows Decidim resources to be reported by users. A resource can be reported by a user as 'spam', 'offensive' or 'does_not_belong'. When a resource is reported, a `Report` is created. All ``Report``s of a resource are grouped in a `Moderation` and can be moderated by the admins. A `Reportable` is expected to implement: * `reported_content_url`: the URL for the reportable resource; * `reported_attributes`: a list of attributes that can be reported (e.g. `[:title, :body]`) - used to display the report content by the `ReportedContentCell`; * `reported_searchable_content_extras` (optional): a list of attributes other than `reported_attributes` the report can be search by (e.g. `[author.name]`) - used in the reports search bar of the admin panel. == Public view === The ReportedContentCell The reccomended way to render the content of a `Reportable` is with a `decidim/reported_content` cell. [source,ruby] ---- cell("decidim/reported_content", reportable) ---- By default, this will render the generic `Decidim::ReportedContentCell`. You can also customize the template for your `Reportable` by extending `Decidim::ReportedContentCell` (see `Decidim::Proposal::ReportedContentCell`)
Version data entries
44 entries across 44 versions & 1 rubygems