Commit b807a23b authored by Robert Speicher's avatar Robert Speicher

Redesign the AbuseReports index

- Shows when the reported user joined
- Show relative timestamp for when the report was created
- Parse message with restricted Markdown pipeline to autolink URLs
parent 6f4ea679
......@@ -2,19 +2,21 @@
- user = abuse_report.user
%tr
%td
- if reporter
= link_to reporter.name, reporter
- if user
= link_to user.name, [:admin, user]
.light.small
Joined #{time_ago_with_tooltip(user.created_at)}
- else
(removed)
%td
= abuse_report.created_at.to_s(:short)
%td
= abuse_report.message
%td
- if user
= link_to user.name, user
- if reporter
= link_to reporter.name, [:admin, reporter]
- else
(removed)
.light.small
= time_ago_with_tooltip(abuse_report.created_at)
%td
= markdown(abuse_report.message.squish!, pipeline: :single_line)
%td
- if user
= link_to 'Remove user & report', admin_abuse_report_path(abuse_report, remove_user: true),
......
......@@ -6,10 +6,9 @@
%table.table
%thead
%tr
%th User
%th Reported by
%th Reported at
%th Message
%th User
%th Primary action
%th
= render @abuse_reports
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment