diff options
author | Marek Labos <keraml@gmail.com> | 2012-08-20 01:33:54 +0200 |
---|---|---|
committer | Marek Labos <keraml@gmail.com> | 2012-08-20 01:33:54 +0200 |
commit | 84ac24af752b01013a5c306e736e69d53be5cb3a (patch) | |
tree | d811dd75f68208742bcc6d53e923604337ed9379 /app/views/refinery | |
parent | 06fe63e5f02dc98c0573d497cad145538db97bf2 (diff) | |
download | refinerycms-blog-84ac24af752b01013a5c306e736e69d53be5cb3a.tar.gz refinerycms-blog-84ac24af752b01013a5c306e736e69d53be5cb3a.tar.bz2 refinerycms-blog-84ac24af752b01013a5c306e736e69d53be5cb3a.zip |
removing noisy "no comments" message
Diffstat (limited to 'app/views/refinery')
-rw-r--r-- | app/views/refinery/blog/posts/_comments.html.erb | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/app/views/refinery/blog/posts/_comments.html.erb b/app/views/refinery/blog/posts/_comments.html.erb index 8415971..daccd78 100644 --- a/app/views/refinery/blog/posts/_comments.html.erb +++ b/app/views/refinery/blog/posts/_comments.html.erb @@ -1,38 +1,37 @@ <aside id="comments"> - <h2><%= t('title', :scope => 'refinery.blog.posts.show.comments') %></h2> <% if (comments = @post.comments.approved).any? %> + <h2><%= t('title', :scope => 'refinery.blog.posts.show.comments') %></h2> <%= render :partial => "comment", :collection => comments %> - <% else %> - <p> - <%= t('none', :scope => 'refinery.blog.shared.comments') %>. - </p> <% end %> - <% flash.each do |key, value| %> - <div id='flash' class="flash flash_<%= key %>"> - <%= value %> - </div> - <% end %> + <% if Refinery::Blog::Post.comments_allowed? %> + + <% flash.each do |key, value| %> + <div id='flash' class="flash flash_<%= key %>"> + <%= value %> + </div> + <% end %> - <h2><%= t('add', :scope => 'refinery.blog.posts.show.comments') %></h2> - <%= form_for [refinery, :blog, @comment] do |f| %> - <%= render "/refinery/admin/error_messages", - :object => f.object, - :include_object_name => true %> - <div class='field'> - <%= f.label :name %> - <%= f.text_field :name %> - </div> - <div class='field'> - <%= f.label :email %> - <%= f.email_field :email %> - </div> - <div class='field message_field'> - <%= f.label :message %> - <%= f.text_area :message, :rows => 6 %> - </div> - <div class='field form-actions'> - <%= f.submit t('submit', :scope => 'refinery.blog.posts.show') %> - </div> + <h2><%= t('add', :scope => 'refinery.blog.posts.show.comments') %></h2> + <%= form_for [refinery, :blog, @comment] do |f| %> + <%= render "/refinery/admin/error_messages", + :object => f.object, + :include_object_name => true %> + <div class='field'> + <%= f.label :name %> + <%= f.text_field :name %> + </div> + <div class='field'> + <%= f.label :email %> + <%= f.email_field :email %> + </div> + <div class='field message_field'> + <%= f.label :message %> + <%= f.text_area :message, :rows => 6 %> + </div> + <div class='field form-actions'> + <%= f.submit t('submit', :scope => 'refinery.blog.posts.show') %> + </div> + <% end %> <% end %> </aside> |