<% unless @activity.empty? %>
<% @activity.each do |e| %> <% act = e.act %> <% unless act.nil? %>
<%= link_to image_tag(url_to_avatar(e.user), :class => "avatar"), user_path(e.user_id), :class => "avatar" %> <% case e.act_type %> <% when 'Bid' %> <% if e.user == User.current%> <% else %> <% end %> <% if e.user == User.current%> <% else %> <% end %> <% if e.user == User.current%> <% else %> <% end %> <% if e.user == User.current%> <% else %> <% end %> <% if e.user == User.current%> <% else %> <% end %> <% if e.user == User.current%> <% else %> <% end %>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> <%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_call)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>

<%= textilizable act.description %>

<%= link_to l(:label_find_all_comments), respond_path(e.act_id) %><%= l(:label_comments_count, :count => e.act.commit)%>
<% when 'Journal' %>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %> <%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.id}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"} %>

<%= textilizable act.notes %>

<% when 'Changeset' %>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %> <%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title(act.title), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %>

<%= textilizable act.long_comments %>

<%= link_to l(:label_find_all_comments), {:controller => 'repositories', :action => 'revision', :id => act.repository.project, :repository_id => act.repository.identifier_param, :rev => act.identifier} %><%= l(:label_comments_count, :count => e.act.count)%>
<% when 'Message' %>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %> <%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.board.name}: #{act.subject}"), {:controller => 'messages', :action => 'show', :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}) %>

<%= textilizable act.content %>

<% when 'News' %>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %> <%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id} %>

<%= textilizable act.description %>

<%= link_to l(:label_find_all_comments), {:controller => 'news', :action => 'show', :id => act.id} %><%= l(:label_comments_count, :count => e.act.comments_count)%>
<% when 'Issue' %>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.tracker.name} ##{act.id} (#{act.status}): #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %> <%= link_to(h(e.user), user_path(e.user_id)) %><%= l(:label_new_activity) %> <%= link_to format_activity_title("#{act.tracker.name} ##{act.id} (#{act.status}): #{act.subject}"), {:controller => 'issues', :action => 'show', :id => act.id} %>

<%= textilizable act.description %>

<%= link_to l(:label_find_all_comments), {:controller => 'issues', :action => 'show', :id => act.id} %><%= l(:label_comments_count, :count => e.act.journals.count)%>
<% end %>
<% if e.act_type == 'Changeset' %> <%= format_time(e.act.committed_on) %> <% else %> <%= format_time(e.act.created_on) %> <% end %>
<% end %> <% end %>
<% else %>

<%= l(:label_user_activities) %>

<% end %>