BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
bb5a7ef0
Commit
bb5a7ef0
authored
Jul 22, 2016
by
Dan Rowden
Committed by
Alfredo Sumaran
Sep 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show badges in Milestone tabs and padding in Milestone list (both to match Issues page)
parent
13a91b56
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
6 deletions
+26
-6
milestone.scss
app/assets/stylesheets/pages/milestone.scss
+10
-6
milestones_helper.rb
app/helpers/milestones_helper.rb
+13
-0
_milestones_filter.html.haml
app/views/shared/_milestones_filter.html.haml
+3
-0
No files found.
app/assets/stylesheets/pages/milestone.scss
View file @
bb5a7ef0
...
...
@@ -2,13 +2,17 @@
max-width
:
90%
;
}
li
.milestone
{
h4
{
font-weight
:
bold
;
}
.milestones
{
.milestone
{
padding
:
10px
16px
;
h4
{
font-weight
:
bold
;
}
.progress
{
height
:
6px
;
.progress
{
height
:
6px
;
}
}
}
...
...
app/helpers/milestones_helper.rb
View file @
bb5a7ef0
...
...
@@ -35,6 +35,19 @@ module MilestonesHelper
milestone
.
issues
.
with_label
(
label
.
title
).
send
(
state
).
size
end
def
milestone_count_by_state
(
project
,
state
)
if
project
.
nil?
nil
else
case
state
when
'all'
then
@project
.
milestones
.
size
when
'closed'
then
@project
.
milestones
.
closed
.
size
when
'opened'
then
@project
.
milestones
.
active
.
size
else
nil
end
end
end
def
milestone_progress_bar
(
milestone
)
options
=
{
class:
'progress-bar progress-bar-success'
,
...
...
app/views/shared/_milestones_filter.html.haml
View file @
bb5a7ef0
...
...
@@ -2,9 +2,12 @@
%li
{
class:
(
"active"
if
params
[
:state
].
blank?
||
params
[
:state
]
==
'opened'
)}
=
link_to
milestones_filter_path
(
state:
'opened'
)
do
Open
%span
.badge
#{
milestone_count_by_state
(
@project
,
'opened'
)
}
%li
{
class:
(
"active"
if
params
[
:state
]
==
'closed'
)}
=
link_to
milestones_filter_path
(
state:
'closed'
)
do
Closed
%span
.badge
#{
milestone_count_by_state
(
@project
,
'closed'
)
}
%li
{
class:
(
"active"
if
params
[
:state
]
==
'all'
)}
=
link_to
milestones_filter_path
(
state:
'all'
)
do
All
%span
.badge
#{
milestone_count_by_state
(
@project
,
'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