<% if User.current.id == @user.id%> <%= show_activity @state%> <%= form_tag(:controller => 'users', :action => "show") do %> <% end %> <% end %> <% unless @state == 2%> <% unless @activity.empty? %>
<% @activity.each do |e| %> <% act = e.act %> <% unless act.nil? %>
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %> <% case e.act_type %> <% when 'Bid' %> <% if act.reward_type ==3 %> <% if e.user == User.current%> <% else %> <% end %> <% else %> <% if e.user == User.current%> <% else %> <% end %> <% 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 %> <% if e.user == User.current%> <% else %> <% end %>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_new_activity) %> <%= link_to format_activity_title("#{l(:label_active_homework)}##{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_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %> <%= link_to("#{l(:label_i)}", user_path(e.user_id)) %><%= l(:label_i_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_i_new_activity) %> <%= link_to(l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier))%> <%= 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( l(:label_activity_project)+act.issue.project.name, project_path(act.issue.project.identifier))%> <%= 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_i_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_i_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 'Principal' %>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_new_user) %><%= link_to(h(e.user), user_path(e.user_id)) %> <%= l(:label_new_user) %>

<% when 'News' %>
<%= link_to("#{l(:label_i)}", user_path(e.user_id)) %> <%= l(:label_i_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_i_new_activity) %> <%= link_to(l(:label_activity_project)+act.project.name, project_path(act.project.identifier))%> <%= 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(l(:label_activity_project)+act.project.name, project_path(act.project.identifier))%> <%= 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 %> <% if @user == User.current %> <%= l(:label_user_activities) %> <% else %>

<%= l(:label_user_activities_other) %>

<% end %> <% end %> <% else %> <% unless @message.empty? %>
<% @message.each do |e| -%>
<%= image_tag(url_to_avatar(e.user), :class => "avatar") %>
<%= link_to(h(e.user), user_path(e.user)) %> <% if e.instance_of?(JournalsForMessage)%> <% if e.reply_id == User.current.id%> <%if e.jour_type == 'Bid'%> <%= l(:label_in_bids)%><%= link_to(e.jour.name, respond_path(e.jour))%> <%= l(:label_quote_my_words) %> <% else %> <%= l(:label_in_users)%><%= link_to(e.jour.firstname, feedback_path(e.jour))%> <%= l(:label_quote_my_words) %> <% end %> <% else %> <%= l(:label_about_requirement) %><%= link_to(e.jour.name, respond_path(e.jour_id))%> <%= l(:label_have_respond) %> <% end %> <% else %> <% if e.journal_reply.nil? || e.journal_reply.reply_id != User.current.id %> <%= l(:label_about_issue) %><%= link_to(e.issue.subject, issue_path(e.journalized_id))%><%= l(:label_have_respond) %> <% else %> <%= l(:label_in_issues)%><%= link_to(e.issue.subject, issue_path(e.issue))%><%= l(:label_quote_my_words) %> <% end %> <% end %>

<%= textilizable e.notes %>

<%= format_time e.created_on %>
<% end %>
<% else %>

<%= l(:label_no_user_respond_you) %>

<% end %> <% end %>