2014-12-28 15:21:06 -08:00
|
|
|
.panel.panel-default.moderationbox{data: { id: report.id }}
|
2014-12-25 14:47:11 -08:00
|
|
|
.panel-heading
|
2014-12-27 07:14:57 -08:00
|
|
|
%img.img-rounded.answerbox--img{src: gravatar_url(report.user)}
|
|
|
|
= user_screen_name report.user
|
|
|
|
reported a
|
|
|
|
= report.type.sub('Reports::', '')
|
2015-02-19 15:40:41 -08:00
|
|
|
%span{title: report.created_at, data: { toggle: :tooltip, placement: :bottom }}
|
|
|
|
= time_ago_in_words(report.created_at)
|
2014-12-27 07:14:57 -08:00
|
|
|
ago
|
2014-12-25 14:47:11 -08:00
|
|
|
.panel-body
|
2014-12-27 07:14:57 -08:00
|
|
|
%p
|
|
|
|
- if report.type == 'Reports::User'
|
|
|
|
= user_screen_name report.target
|
|
|
|
- else
|
|
|
|
= report.target.content
|
2015-04-21 19:59:10 -07:00
|
|
|
%p
|
|
|
|
%b
|
|
|
|
Reason:
|
|
|
|
%br
|
|
|
|
- (report.reason || "No reason provided.").lines.each do |reason|
|
|
|
|
- next unless reason.strip.length > 0
|
|
|
|
= reason.strip
|
|
|
|
%br
|
2014-12-25 14:47:11 -08:00
|
|
|
.row
|
|
|
|
.col-md-6.col-sm-4.col-xs-6.text-left
|
2014-12-28 11:05:30 -08:00
|
|
|
%a.btn.btn-primary{href: content_url(report)}
|
2014-12-25 14:47:11 -08:00
|
|
|
View reported
|
2014-12-28 11:05:30 -08:00
|
|
|
= report.type.sub('Reports::', '')
|
2015-04-25 14:53:22 -07:00
|
|
|
- if report.target.respond_to? :user and not report.target.user.nil?
|
|
|
|
%a.btn.btn-primary{href: show_user_profile_path(report.target.user.screen_name)}
|
|
|
|
View reported User
|
2014-12-25 14:47:11 -08:00
|
|
|
.col-md-6.col-sm-8.col-xs-6.text-right
|
2014-12-28 14:26:16 -08:00
|
|
|
%span.mod-count{id: "mod-count-#{report.id}"}
|
|
|
|
= report.votes
|
|
|
|
.btn-group
|
2014-12-28 15:21:06 -08:00
|
|
|
%button.btn.btn-success.btn-sm{type: :button, name: "mod-vote", disabled: current_user.report_x_voted?(report, true) ? 'disabled' : nil, data: { id: report.id, action: current_user.report_voted?(report) ? 'unvote' : 'vote', vote_type: 'upvote' }}
|
2014-12-28 14:26:16 -08:00
|
|
|
%i.fa.fa-thumbs-up
|
2014-12-28 15:21:06 -08:00
|
|
|
%button.btn.btn-danger.btn-sm{type: :button, name: "mod-vote", disabled: current_user.report_x_voted?(report, false) ? 'disabled' : nil, data: { id: report.id, action: current_user.report_voted?(report) ? 'unvote' : 'vote', vote_type: 'downvote' }}
|
2014-12-28 14:26:16 -08:00
|
|
|
%i.fa.fa-thumbs-down
|
2014-12-28 15:50:14 -08:00
|
|
|
%button.btn.btn-primary.btn-sm{type: :button, name: 'mod-comments', data: { id: report.id, state: :hidden }}
|
2014-12-25 14:47:11 -08:00
|
|
|
%i.fa.fa-comments
|
2014-12-28 15:50:14 -08:00
|
|
|
%span{id: "mod-comment-count-#{report.id}"}= report.moderation_comments.all.count
|
2014-12-28 15:21:06 -08:00
|
|
|
%button.btn.btn-default.btn-sm{type: :button, name: "mod-delete-report", data: { id: report.id }}
|
2014-12-28 11:13:45 -08:00
|
|
|
%i.fa.fa-trash-o
|
2014-12-28 15:50:14 -08:00
|
|
|
.panel-footer{id: "mod-comments-section-#{report.id}", style: 'display: none'}
|
2015-04-21 19:59:10 -07:00
|
|
|
%div{id: "mod-comments-#{report.id}"}= render 'moderation/discussion', report: report
|