fix issue count
This commit is contained in:
parent
017dfaee65
commit
958497fecb
2 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue