Sha256: 896bdeeb76b50bfeb70225f60f137ffadb368ca01100f78e479cecb066cfa5dd
Contents?: true
Size: 1.24 KB
Versions: 9
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 recommended 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
9 entries across 9 versions & 1 rubygems