aboutsummaryrefslogblamecommitdiffstats
path: root/app/views/refinery/blog/posts/_comments.html.erb
blob: 9bc0a13d3f7c011fa398b1cec9edcd94d32b6e95 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
                     
                                                                           













                                                                  
                                                                         


















                                                              
                                                                       


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

  <h2><%= t('add', :scope => 'refinery.blog.posts.show.comments') %></h2>
  <%= form_for [main_app, :blog_post, @blog_comment] do |f| %>
    <%= render :partial => "/refinery/admin/error_messages",
               :locals => {
                 :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 %>
</aside>