From 84806a8001532b95780f53f4ce777b034967b7fb Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sat, 27 Dec 2014 16:09:04 +0100 Subject: [PATCH] copy-pasted comment section for moderation --- app/views/moderation/_discussion.html.haml | 27 ++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/app/views/moderation/_discussion.html.haml b/app/views/moderation/_discussion.html.haml index 9c1278ce..235acfd3 100644 --- a/app/views/moderation/_discussion.html.haml +++ b/app/views/moderation/_discussion.html.haml @@ -1,9 +1,28 @@ There are no comments yet %ul.comments - %li - %img.img-rounded.answerbox--img-small - %b username - comment + - a.comments.all.each do |comment| + %li{data: { comment_id: comment.id }} + .media.comments--media + .pull-left + %img.img-rounded.answerbox--img{src: gravatar_url(comment.user)} + .media-body.comments--body + %h6.media-heading.answerbox--question-user= user_screen_name comment.user + - if user_signed_in? + .pull-right + .btn-group + %button.btn.btn-link.btn-sm.dropdown-toggle{data: { toggle: :dropdown }, aria: { expanded: :false }} + %span.caret + %ul.dropdown-menu.dropdown-menu-right{role: :menu} + - if privileged? a.user + %li.text-danger + %a{href: '#', name: 'ab-destroy', data: { a_id: comment.id }} + %i.fa.fa-trash-o + Delete + %li + %a{href: '#', name: 'ab-report', data: { a_id: comment.id }} + %i.fa.fa-exclamation-triangle + Report + %p.comments--content= comment.content .form-group.has-feedback %input.form-control.comments--box{type: :text, placeholder: 'Comment...'} %span.text-muted.form-control-feedback.comments--count 160 \ No newline at end of file