35 lines
1.3 KiB
Plaintext
35 lines
1.3 KiB
Plaintext
- reporter = abuse_report.reporter
|
|
- user = abuse_report.user
|
|
%tr
|
|
%th.visible-xs-block.visible-sm-block
|
|
%strong User
|
|
%td
|
|
- if user
|
|
= link_to user.name, user
|
|
.light.small
|
|
Joined #{time_ago_with_tooltip(user.created_at)}
|
|
- else
|
|
(removed)
|
|
%td
|
|
%strong.subheading.visible-xs-block.visible-sm-block Reported by
|
|
- if reporter
|
|
= link_to reporter.name, reporter
|
|
- else
|
|
(removed)
|
|
.light.small
|
|
= time_ago_with_tooltip(abuse_report.created_at)
|
|
%td
|
|
%strong.subheading.visible-xs-block.visible-sm-block Message
|
|
.message
|
|
= markdown_field(abuse_report, :message)
|
|
%td
|
|
- if user
|
|
= link_to 'Remove user & report', admin_abuse_report_path(abuse_report, remove_user: true),
|
|
data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, remote: true, method: :delete, class: "btn btn-sm btn-block btn-remove js-remove-tr"
|
|
- if user && !user.blocked?
|
|
= link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-sm btn-block"
|
|
- else
|
|
.btn.btn-sm.disabled.btn-block
|
|
Already blocked
|
|
= link_to 'Remove report', [:admin, abuse_report], remote: true, method: :delete, class: "btn btn-sm btn-block btn-close js-remove-tr"
|