mirror of
https://github.com/manyfold3d/manyfold.git
synced 2026-10-22 11:42:19 -05:00
Add ability to resolve or ignore reports in moderation UI
This commit is contained in:
4 files changed
+52
-15
No files matched your search
@@ -12,11 +12,15 @@ class Settings::ReportsController < ApplicationController
|
||||
end
|
||||
|
||||
def update
|
||||
# if @domain_block.valid?
|
||||
# redirect_to settings_domain_blocks_path, notice: t(".success")
|
||||
# else
|
||||
# render "new", layout: "settings", status: :unprocessable_entity
|
||||
# end
|
||||
if params[:resolve]
|
||||
@report.resolve!
|
||||
redirect_to settings_reports_path, notice: t(".resolved")
|
||||
elsif params[:ignore]
|
||||
@report.ignore!
|
||||
redirect_to settings_reports_path, notice: t(".ignored")
|
||||
else
|
||||
redirect_to settings_report_path(@report)
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -1,10 +1,24 @@
|
||||
<h3><%= t(".title") %></h3>
|
||||
<h3><%= Federails::Moderation::Report.model_name.human %> #<%= @report.id %></h3>
|
||||
|
||||
<p>
|
||||
<%= Federails::Moderation::Report.human_attribute_name(:federails_actor) %>:
|
||||
<%= @report.reporter_address %>
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<%= Federails::Moderation::Report.human_attribute_name(:created_at) %>:
|
||||
<%= @report.created_at %>
|
||||
</li>
|
||||
<li>
|
||||
<%= Federails::Moderation::Report.human_attribute_name(:federails_actor) %>:
|
||||
<%= @report.reporter_address %>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<blockquote>
|
||||
<%= @report.content %>
|
||||
</blockquote>
|
||||
<% if @report.content.present? %>
|
||||
<h4><%= Federails::Moderation::Report.human_attribute_name(:content) %>:</h4>
|
||||
<div class="alert alert-warning">
|
||||
<%= @report.content %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="mt-3">
|
||||
<%= link_to t(".resolve"), settings_report_path(@report, resolve: true), method: :patch, class: "btn btn-primary" %>
|
||||
<%= link_to t(".ignore"), settings_report_path(@report, ignore: true), method: :patch, class: "btn btn-danger" %>
|
||||
</div>
|
||||
+16
-1
@@ -15,7 +15,8 @@ en:
|
||||
created_at: Created at
|
||||
domain: Domain
|
||||
federails/moderation/report:
|
||||
created_at: Reported at
|
||||
content: Comment
|
||||
created_at: Received at
|
||||
federails_actor: Reported by
|
||||
object: Object
|
||||
library:
|
||||
@@ -132,6 +133,20 @@ en:
|
||||
other: Creators
|
||||
two: Creators
|
||||
zero: Creators
|
||||
federails/moderation/domain_block:
|
||||
few: Domain Blocks
|
||||
many: Domain Blocks
|
||||
one: Domain Block
|
||||
other: Domain Blocks
|
||||
two: Domain Blocks
|
||||
zero: Domain Blocks
|
||||
federails/moderation/report:
|
||||
few: Reports
|
||||
many: Reports
|
||||
one: Report
|
||||
other: Reports
|
||||
two: Reports
|
||||
zero: Reports
|
||||
library:
|
||||
few: Libraries
|
||||
many: Libraries
|
||||
|
||||
@@ -74,7 +74,11 @@ en:
|
||||
description: Content reported by local or Fediverse users shows up here for moderation.
|
||||
title: Reports
|
||||
show:
|
||||
title: View report
|
||||
ignore: Ignore
|
||||
resolve: Mark as resolved
|
||||
update:
|
||||
ignored: The report has been ignored.
|
||||
resolved: The report has been marked as resolved.
|
||||
tag_settings:
|
||||
auto_tag_new:
|
||||
label: Automatically tag new models with
|
||||
|
||||
Reference in new issue
Block a user