<%= render "layouts/jquiheader" %>
<%= render :partial => "layouts/navigation_1" -%>

<%= flash[:notice] -%>

<% if mobile_device? %> <%= link_to "Full Site", :mobile => 0 %> <% else %> <%= link_to "Mobile Site", :mobile => 1 %> <% end %>

<%=h @loop.title %>

<%= @loop.body.html_safe %>

<%= link_to 'Back to news', loops_path %>
<% unless @loop.comments.empty? %>

<%= pluralize(@loop.comments.count, 'Comment') %>

<%= render @loop.comments.reverse %>
<% end %> <% unless current_user.nil? %>

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 %>

    <% @footermod ||= Mod.find_by_modname("Footer") %><%= @footermod.modtext%> <%= Date.today.year -%>