]> source.dussan.org Git - redmine.git/commitdiff
Adds issue count on assigned and reported 'My page' modules (#2986).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 17 Mar 2009 17:27:30 +0000 (17:27 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 17 Mar 2009 17:27:30 +0000 (17:27 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2595 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/my/blocks/_issuesassignedtome.rhtml
app/views/my/blocks/_issuesreportedbyme.rhtml

index f5e2e3e651ce3b895b929708e0bc8af405da9b14..507a45be935d036069c596ae2ad548034b7e3afa 100644 (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") %>
index aa6e0e0eb73f726b614811853b4c476dd3c84da4..affaa1e76fa921620840b6c83ffed7bb3fec7700 100644 (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") %>