<div class="discussion-view">
<header>
<h1>
<a href="<%= @discussion.url %>">
<%= @discussion.name %>
</a>
</h1>
<div class="meta"><%= @discussion.posts.size %> Posts</div>
</header>
<ul class="post-list">
<% @discussion.posts.all.each do |post| %>
<li>
<header>
<h1><a href="<%= post.url %>"><%= post.name %></a></h1>
<div class="meta">
Started by <a href="<%= post.creator.url %>"><%= post.creator.username %></a>
<% if post.tags.size != 0 %>
in
<% post.tags.each_with_index do |tag, i| %><% if i > 0 then %>, <% end %><a href="<%= tag.url %>"><%= tag.name %></a><% end %><% end %>
</div>
</header>
<div class="post-count"><%= post.comments.size %></div>
<div class="recent-post-info">
<time><a href="#"><%= post.updated_at.to_short %></a></time><br/>
by <a href="<%= post.updater.url %>"><%= post.updater.username %></a>
</div>
</li>
<% end %>
<a href="<%= @discussion.url %>/post/new" class="new-post">New Post</a>
</ul>
</div>