<div class="activity-view">
<header>
<h1>Recent Activity</h1>
</header>
<ul class="activity-list">
<% @member.activity.each do |item| %>
<% if item[:type] == :post %>
<li>
<header>
<h1><a href="<% @member.url %>"><%= @member.username %></a> created a post <a href="<%= item[:url] %>"><%= item[:title] %></a> <time><%= item[:date].to_pretty %></time></h1>
</header>
<div class="content"><%= item[:content] %></div>
</li>
<% elsif item[:type] == :comment %>
<li>
<header>
<h1><a href="<% @member.url %>"><%= @member.username %></a> added a comment to <a href="<%= item[:url] %>"><%= item[:title] %></a> <time><%= item[:date].to_pretty %></time></h1>
</header>
<div class="content"><%= item[:content] %></div>
</li>
<% elsif item[:type] == :discussion %>
<li>
<header>
<h1><a href="<% @member.url %>"><%= @member.username %></a> created a discussion <a href="<%= item[:url] %>"><%= item[:title] %></a> <time><%= item[:date].to_pretty %></time></h1>
</header>
<div class="content"><%= item[:content] %></div>
</li>
<% end %>
<% end %>
</ul>
</div>