Index: app/controllers/users_controller.rb =================================================================== --- app/controllers/users_controller.rb (revision 17794) +++ app/controllers/users_controller.rb (working copy) @@ -78,6 +78,16 @@ # show projects based on current user visibility @memberships = @user.memberships.preload(:roles, :project).where(Project.visible_condition(User.current)).to_a + @issue_counts = {} + @issue_counts[:assigned] = { + :total => Issue.visible.assigned_to(@user).count, + :open => Issue.visible.open.assigned_to(@user).count + } + @issue_counts[:reported] = { + :total => Issue.visible.where(:author_id => @user.id).count, + :open => Issue.visible.open.where(:author_id => @user.id).count + } + respond_to do |format| format.html { events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10) Index: app/views/users/show.html.erb =================================================================== --- app/views/users/show.html.erb (revision 17794) +++ app/views/users/show.html.erb (working copy) @@ -23,15 +23,58 @@

<%=l(:label_issue_plural)%>

- + + + + + + + + + + + <% assigned_to_ids = ([@user.id] + @user.group_ids).join("|") %> + <% sort_cond = 'priority:desc,updated_on:desc' %> + + + + + + + + + + + + + +
<%=l(:label_open_issues_plural)%><%=l(:label_closed_issues_plural)%><%=l(:label_total)%>
+ <%= link_to l(:label_assigned_issues), + issues_path(:set_filter => 1, :assigned_to_id => assigned_to_ids, :sort => sort_cond) %> + + <%= link_to @issue_counts[:assigned][:open], + issues_path(:set_filter => 1, :assigned_to_id => assigned_to_ids, :sort => sort_cond) %> + + <%= link_to @issue_counts[:assigned][:total] - @issue_counts[:assigned][:open], + issues_path(:set_filter => 1, :status_id => 'c', :assigned_to_id => assigned_to_ids, :sort => sort_cond) %> + + <%= link_to @issue_counts[:assigned][:total], + issues_path(:set_filter => 1, :status_id => '*', :assigned_to_id => assigned_to_ids, :sort => sort_cond) %> +
+ <%= link_to l(:label_reported_issues), + issues_path(:set_filter => 1, :author_id => @user.id, :sort => sort_cond) %> + + <%= link_to @issue_counts[:reported][:open], + issues_path(:set_filter => 1, :author_id => @user.id, :sort => sort_cond) %> + + <%= link_to @issue_counts[:reported][:total] - @issue_counts[:reported][:open], + issues_path(:set_filter => 1, :status_id => 'c', :author_id => @user.id, :sort => sort_cond) %> + + <%= link_to @issue_counts[:reported][:total], + issues_path(:set_filter => 1, :status_id => '*', :author_id => @user.id, :sort => sort_cond) %> +
+ <% unless @memberships.empty? %>

<%=l(:label_project_plural)%>