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
1a086745
Commit
1a086745
authored
Apr 15, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests
parent
fdc94907
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
15 deletions
+5
-15
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+2
-2
app/views/shared/_sort_dropdown.html.haml
app/views/shared/_sort_dropdown.html.haml
+1
-10
spec/features/issues/filter_issues_spec.rb
spec/features/issues/filter_issues_spec.rb
+2
-3
No files found.
app/helpers/application_helper.rb
View file @
1a086745
...
@@ -274,12 +274,12 @@ module ApplicationHelper
...
@@ -274,12 +274,12 @@ module ApplicationHelper
end
end
end
end
params
=
options
.
compact
.
to_param
params
=
options
.
compact
path
=
request
.
path
path
=
request
.
path
if
params
!=
nil
if
params
!=
nil
path
<<
"?
#{
params
}
"
path
<<
"?
#{
params
.
to_param
}
"
if
add_label
if
add_label
if
params
[
:label_name
].
present?
and
params
[
:label_name
].
respond_to?
(
'any?'
)
if
params
[
:label_name
].
present?
and
params
[
:label_name
].
respond_to?
(
'any?'
)
params
[
:label_name
].
each
do
|
label
|
params
[
:label_name
].
each
do
|
label
|
...
...
app/views/shared/_sort_dropdown.html.haml
View file @
1a086745
...
@@ -10,31 +10,22 @@
...
@@ -10,31 +10,22 @@
%li
%li
=
link_to
page_filter_path
(
sort:
sort_value_recently_created
)
do
=
link_to
page_filter_path
(
sort:
sort_value_recently_created
)
do
=
sort_title_recently_created
=
sort_title_recently_created
%li
=
link_to
page_filter_path
(
sort:
sort_value_oldest_created
)
do
=
link_to
page_filter_path
(
sort:
sort_value_oldest_created
)
do
=
sort_title_oldest_created
=
sort_title_oldest_created
%li
=
link_to
page_filter_path
(
sort:
sort_value_recently_updated
)
do
=
link_to
page_filter_path
(
sort:
sort_value_recently_updated
)
do
=
sort_title_recently_updated
=
sort_title_recently_updated
%li
=
link_to
page_filter_path
(
sort:
sort_value_oldest_updated
)
do
=
link_to
page_filter_path
(
sort:
sort_value_oldest_updated
)
do
=
sort_title_oldest_updated
=
sort_title_oldest_updated
%li
=
link_to
page_filter_path
(
sort:
sort_value_milestone_soon
)
do
=
link_to
page_filter_path
(
sort:
sort_value_milestone_soon
)
do
=
sort_title_milestone_soon
=
sort_title_milestone_soon
%li
=
link_to
page_filter_path
(
sort:
sort_value_milestone_later
)
do
=
link_to
page_filter_path
(
sort:
sort_value_milestone_later
)
do
=
sort_title_milestone_later
=
sort_title_milestone_later
-
if
controller
.
controller_name
==
'issues'
||
controller
.
action_name
==
'issues'
-
if
controller
.
controller_name
==
'issues'
||
controller
.
action_name
==
'issues'
%li
=
link_to
page_filter_path
(
sort:
sort_value_due_date_soon
)
do
=
link_to
page_filter_path
(
sort:
sort_value_due_date_soon
)
do
=
sort_title_due_date_soon
=
sort_title_due_date_soon
%li
=
link_to
page_filter_path
(
sort:
sort_value_due_date_later
)
do
=
link_to
page_filter_path
(
sort:
sort_value_due_date_later
)
do
=
sort_title_due_date_later
=
sort_title_due_date_later
%li
=
link_to
page_filter_path
(
sort:
sort_value_upvotes
)
do
=
link_to
page_filter_path
(
sort:
sort_value_upvotes
)
do
=
sort_title_upvotes
=
sort_title_upvotes
%li
=
link_to
page_filter_path
(
sort:
sort_value_downvotes
)
do
=
link_to
page_filter_path
(
sort:
sort_value_downvotes
)
do
=
sort_title_downvotes
=
sort_title_downvotes
spec/features/issues/filter_issues_spec.rb
View file @
1a086745
...
@@ -167,8 +167,7 @@ describe 'Filter issues', feature: true do
...
@@ -167,8 +167,7 @@ describe 'Filter issues', feature: true do
project:
project
,
project:
project
,
milestone:
milestone
,
milestone:
milestone
,
author:
user
,
author:
user
,
assignee:
user
assignee:
user
)
)
issue
.
labels
<<
project
.
labels
.
find_by
(
title:
'bug'
)
issue
.
labels
<<
project
.
labels
.
find_by
(
title:
'bug'
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
visit
namespace_project_issues_path
(
project
.
namespace
,
project
)
...
@@ -265,7 +264,7 @@ describe 'Filter issues', feature: true do
...
@@ -265,7 +264,7 @@ describe 'Filter issues', feature: true do
describe
'filter issues and sort'
,
js:
true
do
describe
'filter issues and sort'
,
js:
true
do
before
do
before
do
label
=
create
(
:label
,
project:
project
,
title:
'bug'
)
create
(
:label
,
project:
project
,
title:
'bug'
)
bug_one
=
create
(
:issue
,
title:
"Frontend"
,
project:
project
)
bug_one
=
create
(
:issue
,
title:
"Frontend"
,
project:
project
)
bug_two
=
create
(
:issue
,
title:
"Bug 2"
,
project:
project
)
bug_two
=
create
(
:issue
,
title:
"Bug 2"
,
project:
project
)
...
...
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