Skip to content

Commit

Permalink
Merge pull request #3258 from manyfold3d/link-to-reported-item
Browse files Browse the repository at this point in the history
Link to reported items from report UI
  • Loading branch information
Floppy authored Nov 29, 2024
2 parents 23b2f3d + 5eebe7a commit 0f9a168
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/settings/reports/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</tr>
<% @reports.each do |report| %>
<tr>
<td>coming soon...</td>
<td><%= link_to report.object.entity.name, report.object.entity if report.object&.entity %></td>
<td><%= report.reporter_address %></td>
<td><%= report.created_at %></td>
<td><%= link_to safe_join([icon("search", t("general.view")), t("general.view")], " "), settings_report_path(report), {class: "float-end btn btn-primary"} %></td>
Expand Down
16 changes: 16 additions & 0 deletions app/views/settings/reports/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@
</div>
<% end %>

<h4><%= Federails::Moderation::Report.human_attribute_name(:object) %></h4>
<table class="table table-striped">
<% Array(@report.object).each do |object| %>
<tr>
<% if @report.object&.entity %>
<td>
<%= @report.object.entity.model_name.human %>
</td>
<td>
<%= link_to @report.object.entity.name, @report.object.entity %>
</td>
<% end %>
</tr>
<% end %>
</table>

<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" %>
Expand Down

0 comments on commit 0f9a168

Please sign in to comment.