@@ -1,68 +1,68 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <%= link_to(l(:button_edit), {:controller => 'users', :action => 'edit', :id => @user}, :class => 'icon icon-edit') if User.current.admin? %> |
|
2 | <%= link_to(l(:button_edit), {:controller => 'users', :action => 'edit', :id => @user}, :class => 'icon icon-edit') if User.current.admin? %> | |
3 | </div> |
|
3 | </div> | |
4 |
|
4 | |||
5 | <h2><%= avatar @user %> <%=h @user.name %></h2> |
|
5 | <h2><%= avatar @user %> <%=h @user.name %></h2> | |
6 |
|
6 | |||
7 | <div class="splitcontentleft"> |
|
7 | <div class="splitcontentleft"> | |
8 | <ul> |
|
8 | <ul> | |
9 | <% unless @user.pref.hide_mail %> |
|
9 | <% unless @user.pref.hide_mail %> | |
10 | <li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></li> |
|
10 | <li><%=l(:field_mail)%>: <%= mail_to(h(@user.mail), nil, :encode => 'javascript') %></li> | |
11 | <% end %> |
|
11 | <% end %> | |
12 | <% for custom_value in @custom_values %> |
|
12 | <% for custom_value in @custom_values %> | |
13 | <% if !custom_value.value.empty? %> |
|
13 | <% if !custom_value.value.empty? %> | |
14 | <li><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li> |
|
14 | <li><%=h custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li> | |
15 | <% end %> |
|
15 | <% end %> | |
16 | <% end %> |
|
16 | <% end %> | |
17 | <li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li> |
|
17 | <li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li> | |
18 | <% unless @user.last_login_on.nil? %> |
|
18 | <% unless @user.last_login_on.nil? %> | |
19 | <li><%=l(:field_last_login_on)%>: <%= format_date(@user.last_login_on) %></li> |
|
19 | <li><%=l(:field_last_login_on)%>: <%= format_date(@user.last_login_on) %></li> | |
20 | <% end %> |
|
20 | <% end %> | |
21 | </ul> |
|
21 | </ul> | |
22 |
|
22 | |||
23 | <% unless @memberships.empty? %> |
|
23 | <% unless @memberships.empty? %> | |
24 | <h3><%=l(:label_project_plural)%></h3> |
|
24 | <h3><%=l(:label_project_plural)%></h3> | |
25 | <ul> |
|
25 | <ul> | |
26 | <% for membership in @memberships %> |
|
26 | <% for membership in @memberships %> | |
27 | <li><%= link_to(h(membership.project.name), :controller => 'projects', :action => 'show', :id => membership.project) %> |
|
27 | <li><%= link_to(h(membership.project.name), :controller => 'projects', :action => 'show', :id => membership.project) %> | |
28 | (<%=h membership.roles.sort.collect(&:to_s).join(', ') %>, <%= format_date(membership.created_on) %>)</li> |
|
28 | (<%=h membership.roles.sort.collect(&:to_s).join(', ') %>, <%= format_date(membership.created_on) %>)</li> | |
29 | <% end %> |
|
29 | <% end %> | |
30 | </ul> |
|
30 | </ul> | |
31 | <% end %> |
|
31 | <% end %> | |
32 | </div> |
|
32 | </div> | |
33 |
|
33 | |||
34 | <div class="splitcontentright"> |
|
34 | <div class="splitcontentright"> | |
35 |
|
35 | |||
36 | <% unless @events_by_day.empty? %> |
|
36 | <% unless @events_by_day.empty? %> | |
37 | <h3><%= link_to l(:label_activity), :controller => 'projects', :action => 'activity', :id => nil, :user_id => @user, :from => @events_by_day.keys.first %></h3> |
|
37 | <h3><%= link_to l(:label_activity), :controller => 'projects', :action => 'activity', :id => nil, :user_id => @user, :from => @events_by_day.keys.first %></h3> | |
38 |
|
38 | |||
39 | <p> |
|
39 | <p> | |
40 | <%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %> |
|
40 | <%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %> | |
41 | </p> |
|
41 | </p> | |
42 |
|
42 | |||
43 | <div id="activity"> |
|
43 | <div id="activity"> | |
44 | <% @events_by_day.keys.sort.reverse.each do |day| %> |
|
44 | <% @events_by_day.keys.sort.reverse.each do |day| %> | |
45 | <h4><%= format_activity_day(day) %></h4> |
|
45 | <h4><%= format_activity_day(day) %></h4> | |
46 | <dl> |
|
46 | <dl> | |
47 | <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> |
|
47 | <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> | |
48 | <dt class="<%= e.event_type %>"> |
|
48 | <dt class="<%= e.event_type %>"> | |
49 | <span class="time"><%= format_time(e.event_datetime, false) %></span> |
|
49 | <span class="time"><%= format_time(e.event_datetime, false) %></span> | |
50 | <%= content_tag('span', h(e.project), :class => 'project') %> |
|
50 | <%= content_tag('span', h(e.project), :class => 'project') %> | |
51 | <%= link_to format_activity_title(e.event_title), e.event_url %></dt> |
|
51 | <%= link_to format_activity_title(e.event_title), e.event_url %></dt> | |
52 | <dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd> |
|
52 | <dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd> | |
53 | <% end -%> |
|
53 | <% end -%> | |
54 | </dl> |
|
54 | </dl> | |
55 | <% end -%> |
|
55 | <% end -%> | |
56 | </div> |
|
56 | </div> | |
57 |
|
57 | |||
58 | <% other_formats_links do |f| %> |
|
58 | <% other_formats_links do |f| %> | |
59 | <%= f.link_to 'Atom', :url => {:controller => 'projects', :action => 'activity', :id => nil, :user_id => @user, :key => User.current.rss_key} %> |
|
59 | <%= f.link_to 'Atom', :url => {:controller => 'projects', :action => 'activity', :id => nil, :user_id => @user, :key => User.current.rss_key} %> | |
60 | <% end %> |
|
60 | <% end %> | |
61 |
|
61 | |||
62 | <% content_for :header_tags do %> |
|
62 | <% content_for :header_tags do %> | |
63 | <%= auto_discovery_link_tag(:atom, :controller => 'projects', :action => 'activity', :user_id => @user, :format => :atom, :key => User.current.rss_key) %> |
|
63 | <%= auto_discovery_link_tag(:atom, :controller => 'projects', :action => 'activity', :user_id => @user, :format => :atom, :key => User.current.rss_key) %> | |
64 | <% end %> |
|
64 | <% end %> | |
65 | <% end %> |
|
65 | <% end %> | |
66 | </div> |
|
66 | </div> | |
67 |
|
67 | |||
68 | <% html_title @user.name %> |
|
68 | <% html_title @user.name %> |
General Comments 0
You need to be logged in to leave comments.
Login now