<%= render :partial => "layouts/navigation_1" -%>
<%=h @loop.title %>
<%= @loop.body.html_safe %>
<%= link_to 'Back to news', loops_path %><%= render @loop.comments.reverse %>
Make your opinion known!
<% semantic_form_for [@loop, Comment.new], :remote => true, :html => { :'data-type' => 'html', :id => 'create_comment_form' } do |f| %>
<%= error_messages_for :comment %>
<% f.inputs do %>
<%= f.errors_on :body, :class => "string required error" %>
<%= f.input :body, :label => "Your Comment", :input_html => { :class => :mceEditor } %>
<%= f.inline_errors_for :body -%>
<% unless current_user.nil? %>
<%= f.input :contact_id, :as => :hidden, :include_blank => false, :value => current_user.contact_id %>
<% else %>
<%= f.input :contact_id, :as => :hidden, :include_blank => false, :value => '1' %>
<% end %>
<%= f.input :loop_id, :as => :hidden, :include_blank => false, :value => @loop.id %>
<% end %>
<%= f.buttons %>
<% end %>
<% unless current_user.admin_id > 1 %>
<%= link_to 'Edit', edit_loop_path(@loop) %> |
<%= link_to 'Back', loops_path %>
<% end %>
<% else %>
<%= link_to 'Log in to comment', login_path %>
<% end %>
Login
<%= render :partial => "users/user_login" -%>
<%= pluralize(@loop.comments.count, 'Comment') %>