@@ -1,66 +1,66 | |||||
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 | <p> |
|
8 | <p> | |
9 | <%= mail_to(h(@user.mail)) unless @user.pref.hide_mail %> |
|
9 | <%= mail_to(h(@user.mail)) unless @user.pref.hide_mail %> | |
10 | <ul> |
|
10 | <ul> | |
11 | <li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li> |
|
11 | <li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li> | |
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><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></li> | |
15 | <% end %> |
|
15 | <% end %> | |
16 | <% end %> |
|
16 | <% end %> | |
17 | </ul> |
|
17 | </ul> | |
18 | </p> |
|
18 | </p> | |
19 |
|
19 | |||
20 | <% unless @memberships.empty? %> |
|
20 | <% unless @memberships.empty? %> | |
21 | <h3><%=l(:label_project_plural)%></h3> |
|
21 | <h3><%=l(:label_project_plural)%></h3> | |
22 | <ul> |
|
22 | <ul> | |
23 | <% for membership in @memberships %> |
|
23 | <% for membership in @memberships %> | |
24 | <li><%= link_to(h(membership.project.name), :controller => 'projects', :action => 'show', :id => membership.project) %> |
|
24 | <li><%= link_to(h(membership.project.name), :controller => 'projects', :action => 'show', :id => membership.project) %> | |
25 | (<%=h membership.role.name %>, <%= format_date(membership.created_on) %>)</li> |
|
25 | (<%=h membership.role.name %>, <%= format_date(membership.created_on) %>)</li> | |
26 | <% end %> |
|
26 | <% end %> | |
27 | </ul> |
|
27 | </ul> | |
28 | <% end %> |
|
28 | <% end %> | |
29 | </div> |
|
29 | </div> | |
30 |
|
30 | |||
31 | <div class="splitcontentright"> |
|
31 | <div class="splitcontentright"> | |
32 |
|
32 | |||
33 | <% unless @events_by_day.empty? %> |
|
33 | <% unless @events_by_day.empty? %> | |
34 | <h3><%=l(:label_activity)%></h3> |
|
34 | <h3><%= link_to l(:label_activity), :controller => 'projects', :action => 'activity', :user_id => @user, :from => @events_by_day.keys.first %></h3> | |
35 |
|
35 | |||
36 | <p> |
|
36 | <p> | |
37 | <%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %> |
|
37 | <%=l(:label_reported_issues)%>: <%= Issue.count(:conditions => ["author_id=?", @user.id]) %> | |
38 | </p> |
|
38 | </p> | |
39 |
|
39 | |||
40 | <div id="activity"> |
|
40 | <div id="activity"> | |
41 | <% @events_by_day.keys.sort.reverse.each do |day| %> |
|
41 | <% @events_by_day.keys.sort.reverse.each do |day| %> | |
42 | <h4><%= format_activity_day(day) %></h4> |
|
42 | <h4><%= format_activity_day(day) %></h4> | |
43 | <dl> |
|
43 | <dl> | |
44 | <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> |
|
44 | <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> | |
45 | <dt class="<%= e.event_type %>"> |
|
45 | <dt class="<%= e.event_type %>"> | |
46 | <span class="time"><%= format_time(e.event_datetime, false) %></span> |
|
46 | <span class="time"><%= format_time(e.event_datetime, false) %></span> | |
47 | <%= content_tag('span', h(e.project), :class => 'project') %> |
|
47 | <%= content_tag('span', h(e.project), :class => 'project') %> | |
48 | <%= link_to format_activity_title(e.event_title), e.event_url %></dt> |
|
48 | <%= link_to format_activity_title(e.event_title), e.event_url %></dt> | |
49 | <dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd> |
|
49 | <dd><span class="description"><%= format_activity_description(e.event_description) %></span></dd> | |
50 | <% end -%> |
|
50 | <% end -%> | |
51 | </dl> |
|
51 | </dl> | |
52 | <% end -%> |
|
52 | <% end -%> | |
53 | </div> |
|
53 | </div> | |
54 |
|
54 | |||
55 | <p class="other-formats"> |
|
55 | <p class="other-formats"> | |
56 | <%= l(:label_export_to) %> |
|
56 | <%= l(:label_export_to) %> | |
57 | <%= link_to 'Atom', {:controller => 'projects', :action => 'activity', :user_id => @user, :format => :atom, :key => User.current.rss_key}, :class => 'feed' %> |
|
57 | <%= link_to 'Atom', {:controller => 'projects', :action => 'activity', :user_id => @user, :format => :atom, :key => User.current.rss_key}, :class => 'feed' %> | |
58 | </p> |
|
58 | </p> | |
59 |
|
59 | |||
60 | <% content_for :header_tags do %> |
|
60 | <% content_for :header_tags do %> | |
61 | <%= auto_discovery_link_tag(:atom, :controller => 'projects', :action => 'activity', :user_id => @user, :format => :atom, :key => User.current.rss_key) %> |
|
61 | <%= auto_discovery_link_tag(:atom, :controller => 'projects', :action => 'activity', :user_id => @user, :format => :atom, :key => User.current.rss_key) %> | |
62 | <% end %> |
|
62 | <% end %> | |
63 | <% end %> |
|
63 | <% end %> | |
64 | </div> |
|
64 | </div> | |
65 |
|
65 | |||
66 | <% html_title @user.name %> |
|
66 | <% html_title @user.name %> |
@@ -1,60 +1,60 | |||||
1 |
<h2><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, @author |
|
1 | <h2><%= @author.nil? ? l(:label_activity) : l(:label_user_activity, link_to_user(@author)) %></h2> | |
2 | <p class="subtitle"><%= "#{l(:label_date_from)} #{format_date(@date_to - @days)} #{l(:label_date_to).downcase} #{format_date(@date_to-1)}" %></p> |
|
2 | <p class="subtitle"><%= "#{l(:label_date_from)} #{format_date(@date_to - @days)} #{l(:label_date_to).downcase} #{format_date(@date_to-1)}" %></p> | |
3 |
|
3 | |||
4 | <div id="activity"> |
|
4 | <div id="activity"> | |
5 | <% @events_by_day.keys.sort.reverse.each do |day| %> |
|
5 | <% @events_by_day.keys.sort.reverse.each do |day| %> | |
6 | <h3><%= format_activity_day(day) %></h3> |
|
6 | <h3><%= format_activity_day(day) %></h3> | |
7 | <dl> |
|
7 | <dl> | |
8 | <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> |
|
8 | <% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%> | |
9 | <dt class="<%= e.event_type %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>"> |
|
9 | <dt class="<%= e.event_type %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>"> | |
10 | <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %> |
|
10 | <%= avatar(e.event_author, :size => "24") if e.respond_to?(:event_author) %> | |
11 | <span class="time"><%= format_time(e.event_datetime, false) %></span> |
|
11 | <span class="time"><%= format_time(e.event_datetime, false) %></span> | |
12 | <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %> |
|
12 | <%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %> | |
13 | <%= link_to format_activity_title(e.event_title), e.event_url %></dt> |
|
13 | <%= link_to format_activity_title(e.event_title), e.event_url %></dt> | |
14 | <dd><span class="description"><%= format_activity_description(e.event_description) %></span> |
|
14 | <dd><span class="description"><%= format_activity_description(e.event_description) %></span> | |
15 | <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></dd> |
|
15 | <span class="author"><%= e.event_author if e.respond_to?(:event_author) %></span></dd> | |
16 | <% end -%> |
|
16 | <% end -%> | |
17 | </dl> |
|
17 | </dl> | |
18 | <% end -%> |
|
18 | <% end -%> | |
19 | </div> |
|
19 | </div> | |
20 |
|
20 | |||
21 | <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %> |
|
21 | <%= content_tag('p', l(:label_no_data), :class => 'nodata') if @events_by_day.empty? %> | |
22 |
|
22 | |||
23 | <div style="float:left;"> |
|
23 | <div style="float:left;"> | |
24 | <%= link_to_remote(('« ' + l(:label_previous)), |
|
24 | <%= link_to_remote(('« ' + l(:label_previous)), | |
25 | {:update => "content", :url => params.merge(:from => @date_to - @days - 1), :complete => 'window.scrollTo(0,0)'}, |
|
25 | {:update => "content", :url => params.merge(:from => @date_to - @days - 1), :complete => 'window.scrollTo(0,0)'}, | |
26 | {:href => url_for(params.merge(:from => @date_to - @days - 1)), |
|
26 | {:href => url_for(params.merge(:from => @date_to - @days - 1)), | |
27 | :title => "#{l(:label_date_from)} #{format_date(@date_to - 2*@days)} #{l(:label_date_to).downcase} #{format_date(@date_to - @days - 1)}"}) %> |
|
27 | :title => "#{l(:label_date_from)} #{format_date(@date_to - 2*@days)} #{l(:label_date_to).downcase} #{format_date(@date_to - @days - 1)}"}) %> | |
28 | </div> |
|
28 | </div> | |
29 | <div style="float:right;"> |
|
29 | <div style="float:right;"> | |
30 | <%= link_to_remote((l(:label_next) + ' »'), |
|
30 | <%= link_to_remote((l(:label_next) + ' »'), | |
31 | {:update => "content", :url => params.merge(:from => @date_to + @days - 1), :complete => 'window.scrollTo(0,0)'}, |
|
31 | {:update => "content", :url => params.merge(:from => @date_to + @days - 1), :complete => 'window.scrollTo(0,0)'}, | |
32 | {:href => url_for(params.merge(:from => @date_to + @days - 1)), |
|
32 | {:href => url_for(params.merge(:from => @date_to + @days - 1)), | |
33 | :title => "#{l(:label_date_from)} #{format_date(@date_to)} #{l(:label_date_to).downcase} #{format_date(@date_to + @days - 1)}"}) unless @date_to >= Date.today %> |
|
33 | :title => "#{l(:label_date_from)} #{format_date(@date_to)} #{l(:label_date_to).downcase} #{format_date(@date_to + @days - 1)}"}) unless @date_to >= Date.today %> | |
34 | </div> |
|
34 | </div> | |
35 | |
|
35 | | |
36 | <p class="other-formats"> |
|
36 | <p class="other-formats"> | |
37 | <%= l(:label_export_to) %> |
|
37 | <%= l(:label_export_to) %> | |
38 | <%= link_to 'Atom', params.merge(:format => :atom, :from => nil, :key => User.current.rss_key), :class => 'feed' %> |
|
38 | <%= link_to 'Atom', params.merge(:format => :atom, :from => nil, :key => User.current.rss_key), :class => 'feed' %> | |
39 | </p> |
|
39 | </p> | |
40 |
|
40 | |||
41 | <% content_for :header_tags do %> |
|
41 | <% content_for :header_tags do %> | |
42 | <%= auto_discovery_link_tag(:atom, params.merge(:format => 'atom', :from => nil, :key => User.current.rss_key)) %> |
|
42 | <%= auto_discovery_link_tag(:atom, params.merge(:format => 'atom', :from => nil, :key => User.current.rss_key)) %> | |
43 | <% end %> |
|
43 | <% end %> | |
44 |
|
44 | |||
45 | <% content_for :sidebar do %> |
|
45 | <% content_for :sidebar do %> | |
46 | <% form_tag({}, :method => :get) do %> |
|
46 | <% form_tag({}, :method => :get) do %> | |
47 | <h3><%= l(:label_activity) %></h3> |
|
47 | <h3><%= l(:label_activity) %></h3> | |
48 | <p><% @activity.event_types.each do |t| %> |
|
48 | <p><% @activity.event_types.each do |t| %> | |
49 | <label><%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%></label><br /> |
|
49 | <label><%= check_box_tag "show_#{t}", 1, @activity.scope.include?(t) %> <%= l("label_#{t.singularize}_plural")%></label><br /> | |
50 | <% end %></p> |
|
50 | <% end %></p> | |
51 | <% if @project && @project.active_children.any? %> |
|
51 | <% if @project && @project.active_children.any? %> | |
52 | <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p> |
|
52 | <p><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label></p> | |
53 | <%= hidden_field_tag 'with_subprojects', 0 %> |
|
53 | <%= hidden_field_tag 'with_subprojects', 0 %> | |
54 | <% end %> |
|
54 | <% end %> | |
55 | <%= hidden_field_tag 'user_id', params[:user_id] %> |
|
55 | <%= hidden_field_tag 'user_id', params[:user_id] %> | |
56 | <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p> |
|
56 | <p><%= submit_tag l(:button_apply), :class => 'button-small', :name => nil %></p> | |
57 | <% end %> |
|
57 | <% end %> | |
58 | <% end %> |
|
58 | <% end %> | |
59 |
|
59 | |||
60 | <% html_title(l(:label_activity), @author) -%> |
|
60 | <% html_title(l(:label_activity), @author) -%> |
General Comments 0
You need to be logged in to leave comments.
Login now