<% @header = l(:available_forums) if @user.admin? @header += "\n" @header += link_to('[add]', {:action => 'new'}, 'class' => 'edit') end %>
<% if @forums.empty? %> <%=l :no_forums_available %> <% else %> <% @forums.each do |forum| %> <% end %>
Forum <%= l(:last_post) %> <%= l(:number_of_topics) %> <%= l(:number_of_posts) %>
<%=h forum.name %> <% if forum.readonly == 1 %> (read only) <% end %> <% if @user.admin? %> <%= link_to '[edit]', {:action => 'edit', :id => forum.id}, 'class' => 'edit' %> <%= link_to '↑', {:action => 'move', :id => forum.id, :params => {'direction' => 'up'}}, 'class' => 'edit' unless forum.first? %> <%= link_to '↓', {:action => 'move', :id => forum.id, :params => {'direction' => 'down'}}, 'class' => 'edit' unless forum.last? %> <% end %>
<%=h forum.description %>
<% if forum.last_post %> <%=h format_relative_time(forum.last_post.created_at) %>
<%=l :by %> <%=h forum.last_post.author.get_display_name %> <% end %>
<%=h forum.get_topics_num %> <%=h forum.get_posts_num %>
<% end %>