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
Boxiang Sun
gitlab-ce
Commits
c1f508b0
Commit
c1f508b0
authored
Jul 22, 2016
by
Dan Rowden
Committed by
Alfredo Sumaran
Sep 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use newer hash style
parent
909deaa3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
app/helpers/milestones_helper.rb
app/helpers/milestones_helper.rb
+3
-3
app/views/shared/_milestones_filter.html.haml
app/views/shared/_milestones_filter.html.haml
+3
-3
No files found.
app/helpers/milestones_helper.rb
View file @
c1f508b0
...
...
@@ -41,9 +41,9 @@ module MilestonesHelper
def
milestone_counts
(
project
:)
counts
=
@project
.
milestones
.
reorder
(
nil
).
group
(
:state
).
count
()
{
'opened'
=>
counts
[
'active'
],
'closed'
=>
counts
[
'closed'
],
'all'
=>
counts
[
'active'
]
+
counts
[
'closed'
]
opened:
counts
[
'active'
],
closed:
counts
[
'closed'
],
all:
counts
[
'active'
]
+
counts
[
'closed'
]
}
end
...
...
app/views/shared/_milestones_filter.html.haml
View file @
c1f508b0
...
...
@@ -4,12 +4,12 @@
%li
{
class:
(
"active"
if
params
[
:state
].
blank?
||
params
[
:state
]
==
'opened'
)}
=
link_to
milestones_filter_path
(
state:
'opened'
)
do
Open
%span
.badge
#{
counts
[
'opened'
]
}
%span
.badge
#{
counts
[
:opened
]
}
%li
{
class:
(
"active"
if
params
[
:state
]
==
'closed'
)}
=
link_to
milestones_filter_path
(
state:
'closed'
)
do
Closed
%span
.badge
#{
counts
[
'closed'
]
}
%span
.badge
#{
counts
[
:closed
]
}
%li
{
class:
(
"active"
if
params
[
:state
]
==
'all'
)}
=
link_to
milestones_filter_path
(
state:
'all'
)
do
All
%span
.badge
#{
counts
[
'all'
]
}
%span
.badge
#{
counts
[
:all
]
}
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