This commit is contained in:
Yuki 2015-04-28 07:55:46 +05:30
parent bd3564d6f3
commit d012423b29
1 changed files with 43 additions and 42 deletions

View File

@ -1,43 +1,44 @@
.panel.panel-default.moderationbox{data: { id: report.id }}
.panel-heading
%img.img-rounded.answerbox--img{src: gravatar_url(report.user)}
= user_screen_name report.user
reported a
= report.type.sub('Reports::', '')
%span{title: report.created_at, data: { toggle: :tooltip, placement: :bottom }}
= time_ago_in_words(report.created_at)
ago
.panel-body
%p
- if report.type == 'Reports::User'
= user_screen_name report.target
- else
= report.target.content
%p
%b
Reason:
%br
- (report.reason || "No reason provided.").lines.each do |reason|
- next unless reason.strip.length > 0
= reason.strip
= unless report.target.nil?
.panel.panel-default.moderationbox{data: { id: report.id }}
.panel-heading
%img.img-rounded.answerbox--img{src: gravatar_url(report.user)}
= user_screen_name report.user
reported a
= report.type.sub('Reports::', '')
%span{title: report.created_at, data: { toggle: :tooltip, placement: :bottom }}
= time_ago_in_words(report.created_at)
ago
.panel-body
%p
- if report.type == 'Reports::User'
= user_screen_name report.target
- else
= report.target.content
%p
%b
Reason:
%br
.row
.col-md-6.col-sm-4.col-xs-6.text-left
%a.btn.btn-primary{href: content_url(report)}
View reported
= report.type.sub('Reports::', '')
.col-md-6.col-sm-8.col-xs-6.text-right
%span.mod-count{id: "mod-count-#{report.id}"}
= report.votes
.btn-group
%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' }}
%i.fa.fa-thumbs-up
%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' }}
%i.fa.fa-thumbs-down
%button.btn.btn-primary.btn-sm{type: :button, name: 'mod-comments', data: { id: report.id, state: :hidden }}
%i.fa.fa-comments
%span{id: "mod-comment-count-#{report.id}"}= report.moderation_comments.all.count
%button.btn.btn-default.btn-sm{type: :button, name: "mod-delete-report", data: { id: report.id }}
%i.fa.fa-trash-o
.panel-footer{id: "mod-comments-section-#{report.id}", style: 'display: none'}
%div{id: "mod-comments-#{report.id}"}= render 'moderation/discussion', report: report
- (report.reason || "No reason provided.").lines.each do |reason|
- next unless reason.strip.length > 0
= reason.strip
%br
.row
.col-md-6.col-sm-4.col-xs-6.text-left
%a.btn.btn-primary{href: content_url(report)}
View reported
= report.type.sub('Reports::', '')
.col-md-6.col-sm-8.col-xs-6.text-right
%span.mod-count{id: "mod-count-#{report.id}"}
= report.votes
.btn-group
%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' }}
%i.fa.fa-thumbs-up
%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' }}
%i.fa.fa-thumbs-down
%button.btn.btn-primary.btn-sm{type: :button, name: 'mod-comments', data: { id: report.id, state: :hidden }}
%i.fa.fa-comments
%span{id: "mod-comment-count-#{report.id}"}= report.moderation_comments.all.count
%button.btn.btn-default.btn-sm{type: :button, name: "mod-delete-report", data: { id: report.id }}
%i.fa.fa-trash-o
.panel-footer{id: "mod-comments-section-#{report.id}", style: 'display: none'}
%div{id: "mod-comments-#{report.id}"}= render 'moderation/discussion', report: report