Adds issue count on assigned and reported 'My page' modules (#2986).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2595 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2009-03-17 17:27:30 +00:00
parent 4181f85962
commit b44317b762
2 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,7 @@
<h3><%=l(:label_assigned_to_me_issues)%></h3>
<% assigned_issues = Issue.visible.find(:all,
:conditions => ["assigned_to_id=? AND #{IssueStatus.table_name}.is_closed=?", user.id, false],
<h3><%=l(:label_assigned_to_me_issues)%> (<%= Issue.visible.open.count(:conditions => {:assigned_to_id => User.current.id})%>)</h3>
<% assigned_issues = Issue.visible.open.find(:all,
:conditions => {:assigned_to_id => User.current.id},
:limit => 10,
:include => [ :status, :project, :tracker, :priority ],
:order => "#{Enumeration.table_name}.position DESC, #{Issue.table_name}.updated_on DESC") %>

View File

@ -1,6 +1,7 @@
<h3><%=l(:label_reported_issues)%></h3>
<h3><%=l(:label_reported_issues)%> (<%= Issue.visible.count(:conditions => { :author_id => User.current.id }) %>)</h3>
<% reported_issues = Issue.visible.find(:all,
:conditions => { :author_id => user.id },
:conditions => { :author_id => User.current.id },
:limit => 10,
:include => [ :status, :project, :tracker ],
:order => "#{Issue.table_name}.updated_on DESC") %>