Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
8ca5b331
Commit
8ca5b331
authored
Mar 21, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issues count on labels page
parent
0a8c9f72
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/models/label.rb
app/models/label.rb
+4
-4
app/views/projects/labels/_label.html.haml
app/views/projects/labels/_label.html.haml
+1
-1
No files found.
app/models/label.rb
View file @
8ca5b331
...
@@ -97,12 +97,12 @@ class Label < ActiveRecord::Base
...
@@ -97,12 +97,12 @@ class Label < ActiveRecord::Base
end
end
end
end
def
open_issues_count
def
open_issues_count
(
user
=
nil
)
issues
.
opened
.
count
issues
.
visible_to_user
(
user
).
opened
.
count
end
end
def
closed_issues_count
def
closed_issues_count
(
user
=
nil
)
issues
.
closed
.
count
issues
.
visible_to_user
(
user
).
closed
.
count
end
end
def
open_merge_requests_count
def
open_merge_requests_count
...
...
app/views/projects/labels/_label.html.haml
View file @
8ca5b331
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
%strong
.append-right-20
%strong
.append-right-20
=
link_to_label
(
label
)
do
=
link_to_label
(
label
)
do
=
pluralize
label
.
open_issues_count
,
'open issue'
=
pluralize
label
.
open_issues_count
(
current_user
)
,
'open issue'
-
if
current_user
-
if
current_user
.label-subscription
{
data:
{
url:
toggle_subscription_namespace_project_label_path
(
@project
.
namespace
,
@project
,
label
)}}
.label-subscription
{
data:
{
url:
toggle_subscription_namespace_project_label_path
(
@project
.
namespace
,
@project
,
label
)}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment