Fix issues count on labels page
This commit is contained in:
parent
0a8c9f7212
commit
8ca5b33175
2 changed files with 5 additions and 5 deletions
|
@ -97,12 +97,12 @@ class Label < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
def open_issues_count
|
||||
issues.opened.count
|
||||
def open_issues_count(user = nil)
|
||||
issues.visible_to_user(user).opened.count
|
||||
end
|
||||
|
||||
def closed_issues_count
|
||||
issues.closed.count
|
||||
def closed_issues_count(user = nil)
|
||||
issues.visible_to_user(user).closed.count
|
||||
end
|
||||
|
||||
def open_merge_requests_count
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
%strong.append-right-20
|
||||
= link_to_label(label) do
|
||||
= pluralize label.open_issues_count, 'open issue'
|
||||
= pluralize label.open_issues_count(current_user), 'open issue'
|
||||
|
||||
- if current_user
|
||||
.label-subscription{data: {url: toggle_subscription_namespace_project_label_path(@project.namespace, @project, label)}}
|
||||
|
|
Loading…
Reference in a new issue