<%= link_to "Forums", :action => "index" %> » <%= namelink @forum %>

<% if @forum.topics.build.can_create? cuser %> <%= link_to 'New Topic', new_topic_url(:id => @forum.id) %> <% end %> <% if @forum.can_update? cuser %> | <%= link_to 'Edit Forum', edit_forum_path(@forum) %> <% end %> <% if @forum.can_destroy? cuser %> | <%= link_to 'Destroy Forum', @forum, :confirm => 'Are you sure?', :method => :delete %> <% end %>

<% @forum.topics.basic.ordered.each do |topic| %> <% end %>
<%= h @forum.title %>
Topic Author Replies Views Last Post

<% if topic.state == Topic::STATE_STICKY %> Sticky: <% elsif topic.lock %> Locked: <% end %> <%= link_to (h topic), topic, :class => ((cuser and !topic.read_by? cuser) ? "red" : "") %> <% if topic.posts.count > Topic::POSTS_PAGE %> [ <% (1..((topic.posts.count/Topic::POSTS_PAGE).ceil+1)).to_a.each do |page| %> <%= ", " unless page == 1 %> <%= link_to page, topic_url(topic, :page => page) %> <% end %> ] <% end %>

<%= namelink topic.user %> <%= h topic.posts.count-1 %> <%= h topic.view_count %> <%= link_to raw("#{h topic.posts.last.user}
#{shortdate topic.posts.last.created_at}"), lastpost(topic) %>

<% if @forum.topics.build.can_create? cuser %> <%= link_to 'New Topic', new_topic_url(:id => @forum.id) %> <% end %> <% if @forum.can_update? cuser %> | <%= link_to 'Edit Forum', edit_forum_path(@forum) %> <% end %> <% if @forum.can_destroy? cuser %> | <%= link_to 'Destroy Forum', @forum, :confirm => 'Are you sure?', :method => :delete %> <% end %>