From 2e048d94726ef7d812fe0bd7bad14c7946994481 Mon Sep 17 00:00:00 2001 From: Andreas N Date: Sat, 27 Dec 2014 16:38:07 +0100 Subject: [PATCH] add text for no comments --- app/views/moderation/_discussion.html.haml | 40 ++++++++++++---------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/app/views/moderation/_discussion.html.haml b/app/views/moderation/_discussion.html.haml index 3830e74b..d334a7b2 100644 --- a/app/views/moderation/_discussion.html.haml +++ b/app/views/moderation/_discussion.html.haml @@ -1,22 +1,24 @@ -There are no comments yet -%ul.comments - - report.moderation_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 - .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} - %li.text-danger - %a{href: '#', name: 'ab-destroy', data: { a_id: comment.id }} - %i.fa.fa-trash-o - Delete - %p.comments--content= comment.content +- if report.moderation_comments.all.count == 0 + There are no comments yet. +- else + %ul.comments + - report.moderation_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 + .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} + %li.text-danger + %a{href: '#', name: 'ab-destroy', data: { a_id: comment.id }} + %i.fa.fa-trash-o + Delete + %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