<%= link_to(l(:button_edit), {:controller => 'users', :action => 'edit', :id => @user}, :class => 'icon icon-edit') if User.current.admin? %>

<%= avatar @user %> <%=h @user.name %>

<%= mail_to(h(@user.mail)) unless @user.pref.hide_mail %>

<% unless @memberships.empty? %>

<%=l(:label_project_plural)%>

<% end %>
<% unless @events_by_day.empty? %>

<%=l(:label_activity)%>

<%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %>

<% @events_by_day.keys.sort.reverse.each do |day| %>

<%= format_activity_day(day) %>

<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
<%= format_time(e.event_datetime, false) %> <%= content_tag('span', h(e.project), :class => 'project') %> <%= link_to format_activity_title(e.event_title), e.event_url %>
<%= format_activity_description(e.event_description) %>
<% end -%>
<% end -%>
<% end %>
<% html_title @user.name %>