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
31fea922
Commit
31fea922
authored
Mar 29, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated based on Ruby feedback
parent
b5ece088
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
issuables_helper.rb
app/helpers/issuables_helper.rb
+1
-1
_milestone_dropdown.html.haml
app/views/shared/issuable/_milestone_dropdown.html.haml
+1
-1
filter_by_milestone_spec.rb
spec/features/issues/filter_by_milestone_spec.rb
+2
-2
filter_by_milestone_spec.rb
spec/features/merge_requests/filter_by_milestone_spec.rb
+2
-2
No files found.
app/helpers/issuables_helper.rb
View file @
31fea922
...
...
@@ -47,7 +47,7 @@ module IssuablesHelper
end
end
def
milestone_dropdown_label
(
milestone_title
,
default_label
)
def
milestone_dropdown_label
(
milestone_title
,
default_label
=
"Milestone"
)
if
milestone_title
==
Milestone
::
Upcoming
.
name
milestone_title
=
Milestone
::
Upcoming
.
title
end
...
...
app/views/shared/issuable/_milestone_dropdown.html.haml
View file @
31fea922
-
if
params
[
:milestone_title
]
=
hidden_field_tag
(
:milestone_title
,
params
[
:milestone_title
])
=
dropdown_tag
(
milestone_dropdown_label
(
params
[
:milestone_title
]
,
"Milestone"
),
options:
{
title:
"Filter by milestone"
,
toggle_class:
'js-milestone-select js-filter-submit'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
=
dropdown_tag
(
milestone_dropdown_label
(
params
[
:milestone_title
]),
options:
{
title:
"Filter by milestone"
,
toggle_class:
'js-milestone-select js-filter-submit'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
placeholder:
"Search milestones"
,
footer_content:
@project
.
present?
,
data:
{
show_no:
true
,
show_any:
true
,
show_upcoming:
true
,
field_name:
"milestone_title"
,
selected:
params
[
:milestone_title
],
project_id:
@project
.
try
(
:id
),
milestones:
milestones_filter_dropdown_path
,
default_label:
"Milestone"
}
})
do
-
if
@project
%ul
.dropdown-footer-list
...
...
spec/features/issues/filter_by_milestone_spec.rb
View file @
31fea922
...
...
@@ -11,7 +11,7 @@ feature 'Issue filtering by Milestone', feature: true do
visit_issues
(
project
)
filter_by_milestone
(
Milestone
::
None
.
title
)
expect
(
page
).
to
have_css
(
'.issue
.title
'
,
count:
1
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
1
)
end
context
'filters by upcoming milestone'
,
js:
true
do
...
...
@@ -22,7 +22,7 @@ feature 'Issue filtering by Milestone', feature: true do
visit_issues
(
project
)
filter_by_milestone
(
Milestone
::
Upcoming
.
title
)
expect
(
page
).
to
have_css
(
'.issue
.title
'
,
count:
0
)
expect
(
page
).
to
have_css
(
'.issue'
,
count:
0
)
end
it
'should show issues in future'
do
...
...
spec/features/merge_requests/filter_by_milestone_spec.rb
View file @
31fea922
...
...
@@ -11,7 +11,7 @@ feature 'Merge Request filtering by Milestone', feature: true do
visit_merge_requests
(
project
)
filter_by_milestone
(
Milestone
::
None
.
title
)
expect
(
page
).
to
have_css
(
'.merge-request
-title
'
,
count:
1
)
expect
(
page
).
to
have_css
(
'.merge-request'
,
count:
1
)
end
context
'filters by upcoming milestone'
,
js:
true
do
...
...
@@ -22,7 +22,7 @@ feature 'Merge Request filtering by Milestone', feature: true do
visit_merge_requests
(
project
)
filter_by_milestone
(
Milestone
::
Upcoming
.
title
)
expect
(
page
).
to
have_css
(
'.merge-request
-title
'
,
count:
0
)
expect
(
page
).
to
have_css
(
'.merge-request'
,
count:
0
)
end
it
'should show issues in future'
do
...
...
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