diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-11-28 23:34:24 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2011-11-28 23:34:24 +0200 |
commit | 958497fecbc630297f2d0d5f7b64b484966ae907 (patch) | |
tree | 2aefeccea82a4edd64ff1ead08bd72f31918ae36 | |
parent | 017dfaee6500b10e30e46db0040672f792f360c5 (diff) | |
download | gitlab-ce-958497fecbc630297f2d0d5f7b64b484966ae907.tar.gz |
fix issue count
-rw-r--r-- | app/models/issue.rb | 4 | ||||
-rw-r--r-- | app/views/layouts/project.html.haml | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index c06f173888b..b8b432673a4 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -33,6 +33,10 @@ class Issue < ActiveRecord::Base acts_as_list + def self.open_for(user) + opened.assigned(user) + end + def today? Date.today == created_at.to_date end diff --git a/app/views/layouts/project.html.haml b/app/views/layouts/project.html.haml index 24a72a45ac0..90d8a54a4d5 100644 --- a/app/views/layouts/project.html.haml +++ b/app/views/layouts/project.html.haml @@ -33,8 +33,8 @@ %span{ :class => "number" }= @project.users_projects.count = link_to project_issues_filter_path(@project), :class => (controller.controller_name == "issues") ? "current" : nil do Issues - - if @project.issues.assigned(current_user).count > 0 - %span{ :class => "number" }= @project.issues.assigned(current_user).count + - if @project.issues.open_for(current_user).count > 0 + %span{ :class => "number" }= @project.issues.open_for(current_user).count = link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do Wall - if @project.common_notes.today.count > 0 |