Commit b079e165 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'rs-abuse-reports' into 'master'

Redesign the AbuseReports index

- User profile links go to the admin area
- Shows when the reported user joined
- Show relative timestamp for when the report was created
- Parse message with restricted Markdown pipeline to autolink URLs

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/4667

See merge request !2292
parents 6f4ea679 b807a23b
...@@ -2,19 +2,21 @@ ...@@ -2,19 +2,21 @@
- user = abuse_report.user - user = abuse_report.user
%tr %tr
%td %td
- if reporter - if user
= link_to reporter.name, reporter = link_to user.name, [:admin, user]
.light.small
Joined #{time_ago_with_tooltip(user.created_at)}
- else - else
(removed) (removed)
%td %td
= abuse_report.created_at.to_s(:short) - if reporter
%td = link_to reporter.name, [:admin, reporter]
= abuse_report.message
%td
- if user
= link_to user.name, user
- else - else
(removed) (removed)
.light.small
= time_ago_with_tooltip(abuse_report.created_at)
%td
= markdown(abuse_report.message.squish!, pipeline: :single_line)
%td %td
- if user - if user
= link_to 'Remove user & report', admin_abuse_report_path(abuse_report, remove_user: true), = link_to 'Remove user & report', admin_abuse_report_path(abuse_report, remove_user: true),
......
...@@ -6,10 +6,9 @@ ...@@ -6,10 +6,9 @@
%table.table %table.table
%thead %thead
%tr %tr
%th User
%th Reported by %th Reported by
%th Reported at
%th Message %th Message
%th User
%th Primary action %th Primary action
%th %th
= render @abuse_reports = 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