2008-08-12 00:55:17 +04:00
|
|
|
<div class="contextual">
|
|
|
|
<%= link_to(l(:button_edit), {:controller => 'users', :action => 'edit', :id => @user}, :class => 'icon icon-edit') if User.current.admin? %>
|
|
|
|
</div>
|
|
|
|
|
2008-11-09 17:52:16 +03:00
|
|
|
<h2><%= avatar @user %> <%=h @user.name %></h2>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2008-11-30 14:18:22 +03:00
|
|
|
<div class="splitcontentleft">
|
2007-03-12 20:59:02 +03:00
|
|
|
<ul>
|
2008-11-30 16:42:15 +03:00
|
|
|
<% unless @user.pref.hide_mail %>
|
2008-11-30 17:23:57 +03:00
|
|
|
<li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></li>
|
2008-11-30 16:42:15 +03:00
|
|
|
<% end %>
|
|
|
|
<% for custom_value in @custom_values %>
|
|
|
|
<% if !custom_value.value.empty? %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li>
|
2008-11-30 16:42:15 +03:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li>
|
|
|
|
<% unless @user.last_login_on.nil? %>
|
|
|
|
<li><%=l(:field_last_login_on)%>: <%= format_date(@user.last_login_on) %></li>
|
|
|
|
<% end %>
|
2007-03-12 20:59:02 +03:00
|
|
|
</ul>
|
|
|
|
|
2007-06-23 18:10:13 +04:00
|
|
|
<% unless @memberships.empty? %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<h3><%=l(:label_project_plural)%></h3>
|
2007-06-23 18:06:21 +04:00
|
|
|
<ul>
|
|
|
|
<% for membership in @memberships %>
|
2008-07-02 21:27:16 +04:00
|
|
|
<li><%= link_to(h(membership.project.name), :controller => 'projects', :action => 'show', :id => membership.project) %>
|
|
|
|
(<%=h membership.role.name %>, <%= format_date(membership.created_on) %>)</li>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% end %>
|
2007-06-23 18:06:21 +04:00
|
|
|
</ul>
|
2007-06-23 18:10:13 +04:00
|
|
|
<% end %>
|
2008-11-30 14:18:22 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="splitcontentright">
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2008-11-30 14:18:22 +03:00
|
|
|
<% unless @events_by_day.empty? %>
|
2008-11-30 16:38:07 +03:00
|
|
|
<h3><%= link_to l(:label_activity), :controller => 'projects', :action => 'activity', :user_id => @user, :from => @events_by_day.keys.first %></h3>
|
2008-11-30 14:18:22 +03:00
|
|
|
|
2007-03-12 20:59:02 +03:00
|
|
|
<p>
|
2007-08-29 21:25:22 +04:00
|
|
|
<%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %>
|
2008-10-31 03:41:28 +03:00
|
|
|
</p>
|
2008-11-30 14:18:22 +03:00
|
|
|
|
|
|
|
<div id="activity">
|
|
|
|
<% @events_by_day.keys.sort.reverse.each do |day| %>
|
|
|
|
<h4><%= format_activity_day(day) %></h4>
|
|
|
|
<dl>
|
|
|
|
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
|
|
|
|
<dt class="<%= e.event_type %>">
|
|
|
|
<span class="time"><%= format_time(e.event_datetime, false) %></span>
|
|
|
|
<%= content_tag('span', h(e.project), :class => 'project') %>
|
|
|
|
<%= link_to format_activity_title(e.event_title), e.event_url %></dt>
|
|
|
|
<dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd>
|
|
|
|
<% end -%>
|
|
|
|
</dl>
|
|
|
|
<% end -%>
|
|
|
|
</div>
|
2008-11-30 15:18:59 +03:00
|
|
|
|
|
|
|
<p class="other-formats">
|
|
|
|
<%= l(:label_export_to) %>
|
|
|
|
<%= link_to 'Atom', {:controller => 'projects', :action => 'activity', :user_id => @user, :format => :atom, :key => User.current.rss_key}, :class => 'feed' %>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= auto_discovery_link_tag(:atom, :controller => 'projects', :action => 'activity', :user_id => @user, :format => :atom, :key => User.current.rss_key) %>
|
|
|
|
<% end %>
|
2008-11-30 14:18:22 +03:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% html_title @user.name %>
|