aboutsummaryrefslogblamecommitdiffstats
path: root/app/views/refinery/blog/posts/_comments.html.erb
blob: daccd786b163661b05b80156d1574cdd2ed6680e (plain) (tree)
1
2
3
4
5
6
                     
                                                    
                                                                               
                                                                

           






                                                     
 




















                                                                           

           
<aside id="comments">
  <% if (comments = @post.comments.approved).any? %>
    <h2><%= t('title', :scope => 'refinery.blog.posts.show.comments') %></h2>  
    <%= render :partial => "comment", :collection => comments %>
  <% 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>
    <% end %>
  <% end %>
</aside>