diaspora/app/views/report/index.html.haml
Lukas Matt d1e3e568b9 Report tab; bootstrap3 compatible, add user detail btn
The reported_user_details button will redirect you
to admin user_search. This can be useful if the podmin
wants to lock, unlock or delete the account which is
responsible for the reported post

Signed-off-by: Lukas Matt <lukas@zauberstuhl.de>
2015-10-03 10:58:01 +02:00

36 lines
1.4 KiB
Text

- content_for :head do
= stylesheet_link_tag :admin
.container
.row
.col-md-3
- if current_user.admin?
= render partial: "admins/admin_bar"
.col-md-9
#reports
%h1
= t("report.title")
- @reports.each do |r|
.panel.panel-default
- username = User.find_by_id(r.user_id).username
.panel-heading
.reporter.pull-right
= raw t("report.reported_label", person: link_to(username, user_profile_path(username)))
.title
= report_content(r.item_id, r.item_type)
.panel-body
.reason
= t("report.reason_label", text: r.text)
= button_to t("report.reported_user_details"),
user_search_path(admins_controller_user_search: {guid: get_reported_guid(r.item_id,
r.item_type)}), class: "btn pull-left btn-info btn-small",
method: :post
= button_to t("report.review_link"), report_path(r.id, type: r.item_type),
class: "btn pull-left btn-info btn-small",
method: :put
= button_to t("report.delete_link"), report_path(r.id, type: r.item_type),
data: {confirm: t("report.confirm_deletion")},
class: "btn pull-right btn-danger btn-small",
method: :delete