@@ -1,70 +1,72 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <%= link_to(l(:button_edit), edit_user_path(@user), :class => 'icon icon-edit') if User.current.admin? %> |
|
2 | <%= link_to(l(:button_edit), edit_user_path(@user), :class => 'icon icon-edit') if User.current.admin? %> | |
3 | </div> |
|
3 | </div> | |
4 |
|
4 | |||
5 | <h2><%= avatar @user, :size => "50" %> <%=h @user.name %></h2> |
|
5 | <h2><%= avatar @user, :size => "50" %> <%=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 | <% @user.visible_custom_field_values.each do |custom_value| %> |
|
12 | <% @user.visible_custom_field_values.each do |custom_value| %> | |
13 | <% if !custom_value.value.blank? %> |
|
13 | <% if !custom_value.value.blank? %> | |
14 | <li><%=h 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_project(membership.project) %> |
|
27 | <li><%= link_to_project(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 | <%= call_hook :view_account_left_bottom, :user => @user %> |
|
32 | <%= call_hook :view_account_left_bottom, :user => @user %> | |
33 | </div> |
|
33 | </div> | |
34 |
|
34 | |||
35 | <div class="splitcontentright"> |
|
35 | <div class="splitcontentright"> | |
36 |
|
36 | |||
37 | <% unless @events_by_day.empty? %> |
|
37 | <% unless @events_by_day.empty? %> | |
38 | <h3><%= link_to l(:label_activity), :controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :from => @events_by_day.keys.first %></h3> |
|
38 | <h3><%= link_to l(:label_activity), :controller => 'activities', | |
|
39 | :action => 'index', :id => nil, :user_id => @user, | |||
|
40 | :from => @events_by_day.keys.first %></h3> | |||
39 |
|
41 | |||
40 | <p> |
|
42 | <p> | |
41 | <%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %> |
|
43 | <%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %> | |
42 | </p> |
|
44 | </p> | |
43 |
|
45 | |||
44 | <div id="activity"> |
|
46 | <div id="activity"> | |
45 | <% @events_by_day.keys.sort.reverse.each do |day| %> |
|
47 | <% @events_by_day.keys.sort.reverse.each do |day| %> | |
46 | <h4><%= format_activity_day(day) %></h4> |
|
48 | <h4><%= format_activity_day(day) %></h4> | |
47 | <dl> |
|
49 | <dl> | |
48 | <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> |
|
50 | <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> | |
49 | <dt class="<%= e.event_type %>"> |
|
51 | <dt class="<%= e.event_type %>"> | |
50 | <span class="time"><%= format_time(e.event_datetime, false) %></span> |
|
52 | <span class="time"><%= format_time(e.event_datetime, false) %></span> | |
51 | <%= content_tag('span', h(e.project), :class => 'project') %> |
|
53 | <%= content_tag('span', h(e.project), :class => 'project') %> | |
52 | <%= link_to format_activity_title(e.event_title), e.event_url %></dt> |
|
54 | <%= link_to format_activity_title(e.event_title), e.event_url %></dt> | |
53 | <dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd> |
|
55 | <dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd> | |
54 | <% end -%> |
|
56 | <% end -%> | |
55 | </dl> |
|
57 | </dl> | |
56 | <% end -%> |
|
58 | <% end -%> | |
57 | </div> |
|
59 | </div> | |
58 |
|
60 | |||
59 | <% other_formats_links do |f| %> |
|
61 | <% other_formats_links do |f| %> | |
60 | <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :key => User.current.rss_key} %> |
|
62 | <%= f.link_to 'Atom', :url => {:controller => 'activities', :action => 'index', :id => nil, :user_id => @user, :key => User.current.rss_key} %> | |
61 | <% end %> |
|
63 | <% end %> | |
62 |
|
64 | |||
63 | <% content_for :header_tags do %> |
|
65 | <% content_for :header_tags do %> | |
64 | <%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :user_id => @user, :format => :atom, :key => User.current.rss_key) %> |
|
66 | <%= auto_discovery_link_tag(:atom, :controller => 'activities', :action => 'index', :user_id => @user, :format => :atom, :key => User.current.rss_key) %> | |
65 | <% end %> |
|
67 | <% end %> | |
66 | <% end %> |
|
68 | <% end %> | |
67 | <%= call_hook :view_account_right_bottom, :user => @user %> |
|
69 | <%= call_hook :view_account_right_bottom, :user => @user %> | |
68 | </div> |
|
70 | </div> | |
69 |
|
71 | |||
70 | <% html_title @user.name %> |
|
72 | <% html_title @user.name %> |
General Comments 0
You need to be logged in to leave comments.
Login now