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
Jérome Perrin
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
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+1
-1
app/views/shared/issuable/_milestone_dropdown.html.haml
app/views/shared/issuable/_milestone_dropdown.html.haml
+1
-1
spec/features/issues/filter_by_milestone_spec.rb
spec/features/issues/filter_by_milestone_spec.rb
+2
-2
spec/features/merge_requests/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