<div class="app">
<% @forums.each do |f| %>
<div class="forum">
<table>
<tr><td>
<%= link_to f.name, :action => 'topiclist', :id => f.id %>
<% if admin? %>
[<%= link_to 'edit', :action => 'edit', :id => f.id %>]
[<%= link_to 'delete', :action => 'delete', :id => f.id %>]
[<%= link_to 'new forum', :action => 'new' %>]
<% end %>
</td><td align="right">
<%= "last post: #{ftime f.topics.last.posts.last.updated_at}" %>
</td></tr>
<tr><td colspan="2" align="right">
<% cnt = 0 %>
<% f.topics.each {|t| cnt += t.posts.count } %>
<%= "topics: #{f.topics.count} " %>
<%= "posts: #{cnt} " %>
</td></tr>
<tr><td>
<%= f.description %>
</td></tr>
</table>
</div>
<% end %>
</div>