added some view logic

This commit is contained in:
nilsding 2014-12-27 16:14:57 +01:00
parent 84806a8001
commit e75284dba0
3 changed files with 15 additions and 6 deletions

View file

@ -1,6 +1,6 @@
There are no comments yet
%ul.comments
- a.comments.all.each do |comment|
- report.moderation_comments.all.each do |comment|
%li{data: { comment_id: comment.id }}
.media.comments--media
.pull-left

View file

@ -1,9 +1,17 @@
.panel.panel-default.moderationbox
.panel-heading
%img.img-rounded.answerbox--img-small
username reported some minutes ago
%img.img-rounded.answerbox--img{src: gravatar_url(report.user)}
= user_screen_name report.user
reported a
= report.type.sub('Reports::', '')
= time_ago_in_words(report.created_at)
ago
.panel-body
%p really, really bad content
%p
- if report.type == 'Reports::User'
= user_screen_name report.target
- else
= report.target.content
.row
.col-md-6.col-sm-4.col-xs-6.text-left
%button.btn.btn-primary
@ -20,4 +28,4 @@
%i.fa.fa-comments
%span 0
.panel-footer
= render 'moderation/discussion'
= render 'moderation/discussion', report: report

View file

@ -2,4 +2,5 @@
.row
= render 'moderation/moderation_tabs'
.col-md-9.col-sm-9.col-xs-12
= render 'moderation/moderationbox'
- Report.all.reverse_order.each do |r|
= render 'moderation/moderationbox', report: r