Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-25 11:52:10 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-25 11:52:10 +0300
commite02b7bf4435d0ff151239ac790849994066c0bc1 (patch)
treed0ff4d9d3a53d05e0a321e45f659adf4b5b84d92 /app/views
parentf9ac553db1d0b97525ae4bdfbc83adff4537fa82 (diff)
Improve abuse reports management
* Link to user profile instead of user admin page * One button for remove user and report * Remove user and report with page reloading Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/abuse_reports/_abuse_report.html.haml11
-rw-r--r--app/views/admin/abuse_reports/index.html.haml2
2 files changed, 8 insertions, 5 deletions
diff --git a/app/views/admin/abuse_reports/_abuse_report.html.haml b/app/views/admin/abuse_reports/_abuse_report.html.haml
index 4449721ae38..785ce4b759e 100644
--- a/app/views/admin/abuse_reports/_abuse_report.html.haml
+++ b/app/views/admin/abuse_reports/_abuse_report.html.haml
@@ -3,7 +3,7 @@
%tr
%td
- if reporter
- = link_to reporter.name, [:admin, reporter]
+ = link_to reporter.name, reporter
- else
(removed)
%td
@@ -12,12 +12,15 @@
= abuse_report.message
%td
- if user
- = link_to user.name, [:admin, user]
+ = link_to user.name, user
- else
(removed)
%td
- if user
- = link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs btn-warning"
- = link_to 'Remove user', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "btn btn-xs btn-remove"
+ = 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-xs btn-remove js-remove-tr"
+
%td
+ - if user
+ = link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs btn-warning"
= link_to 'Remove report', [:admin, abuse_report], method: :delete, class: "btn btn-xs btn-close"
diff --git a/app/views/admin/abuse_reports/index.html.haml b/app/views/admin/abuse_reports/index.html.haml
index 4a25848f156..2e8746146d1 100644
--- a/app/views/admin/abuse_reports/index.html.haml
+++ b/app/views/admin/abuse_reports/index.html.haml
@@ -9,7 +9,7 @@
%th Reported at
%th Message
%th User
- %th
+ %th Primary action
%th
= render @abuse_reports
= paginate @abuse_reports