<%= link_to "Back to Forum", forum_path(@topic.forum) %>
<%= @topic.title %> <%= link_to "Edit", edit_topic_path(@topic) if can? :manage, @topic %> <%= link_to "Delete", @topic, :confirm => "Are you sure?", :method => :delete if can? :manage, @topic %> <%= link_to @topic.sticky ? "Unstick" : "Sticky", {:controller => 'topics', :action => 'update', :topic => {:sticky => @topic.sticky ? "false" : "true" }}, :method => :put if can? :moderate, @topic %> <%= link_to @topic.locked ? "Unlock" : "Lock", {:controller => 'topics', :action => 'update', :topic => {:locked => @topic.locked ? "false" : "true" }}, :method => :put if can? :moderate, @topic %>
<% i = 0 %> <% @posts.each do |post| %> <% i += 1 %> <% if !post.user.blank? %> <%end%> <% end %>
<%= link_to "Reply", new_topic_post_path(@topic) if can? :create, @topic.posts.new %> <%= link_to "Quote", new_topic_post_path(@topic, :quote => post) if can? :create, @topic.posts.new %> <%= link_to "Edit", edit_post_path(post) if can? :update, post %> <%= link_to "Delete", post, :confirm => "Are you sure?", :method => :delete if can? :destroy, post %>
<%= post.body.bbcode_to_html(@my_blockquote).html_safe %>
<%= paginate(@posts)%>

<%= link_to "Back to Forum", forum_path(@topic.forum) %>