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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
ff2c22fe
Commit
ff2c22fe
authored
Nov 27, 2018
by
Fatih Acet
Committed by
Jose Vargas
Dec 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Button tooltip, delete unused sort attr and use qa link
parent
44598ec5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
7 deletions
+17
-7
app/assets/stylesheets/pages/issues.scss
app/assets/stylesheets/pages/issues.scss
+10
-0
app/helpers/sorting_helper.rb
app/helpers/sorting_helper.rb
+2
-2
app/models/concerns/issuable.rb
app/models/concerns/issuable.rb
+1
-1
app/views/shared/issuable/_sort_dropdown.html.haml
app/views/shared/issuable/_sort_dropdown.html.haml
+1
-1
spec/features/issuables/sorting_list_spec.rb
spec/features/issuables/sorting_list_spec.rb
+2
-2
spec/helpers/sorting_helper_spec.rb
spec/helpers/sorting_helper_spec.rb
+1
-1
No files found.
app/assets/stylesheets/pages/issues.scss
View file @
ff2c22fe
...
...
@@ -308,6 +308,16 @@ ul.related-merge-requests > li {
display
:
block
;
}
.issue-sort-dropdown
{
.btn-group
{
width
:
100%
;
}
.reverse-sort-btn
{
color
:
$gl-text-color-secondary
;
}
}
@include
media-breakpoint-up
(
sm
)
{
.emoji-block
.row
{
display
:
flex
;
...
...
app/helpers/sorting_helper.rb
View file @
ff2c22fe
...
...
@@ -162,7 +162,7 @@ module SortingHelper
end
def
issuable_sort_direction_button
(
sort_value
)
link_class
=
'btn btn-default'
link_class
=
'btn btn-default
has-tooltip reverse-sort-btn qa-reverse-sort
'
reverse_sort
=
issuable_reverse_sort_order_hash
[
sort_value
]
if
reverse_sort
...
...
@@ -172,7 +172,7 @@ module SortingHelper
link_class
+=
' disabled'
end
link_to
(
reverse_url
,
type:
'button'
,
class:
link_class
)
do
link_to
(
reverse_url
,
type:
'button'
,
class:
link_class
,
title:
'Sort direction'
)
do
icon_suffix
=
case
sort_value
when
sort_value_milestone
,
sort_value_due_date
,
/_asc\z/
...
...
app/models/concerns/issuable.rb
View file @
ff2c22fe
...
...
@@ -146,7 +146,7 @@ module Issuable
sorted
=
case
method
.
to_s
when
'downvotes_desc'
then
order_downvotes_desc
when
'label_priority'
,
'label_priority_asc'
then
order_labels_priority
(
excluded_labels:
excluded_labels
)
when
'label_priority'
then
order_labels_priority
(
excluded_labels:
excluded_labels
)
when
'label_priority_desc'
then
order_labels_priority
(
'DESC'
,
excluded_labels:
excluded_labels
)
when
'milestone'
,
'milestone_due_asc'
then
order_milestone_due_asc
when
'milestone_due_desc'
then
order_milestone_due_desc
...
...
app/views/shared/issuable/_sort_dropdown.html.haml
View file @
ff2c22fe
...
...
@@ -2,7 +2,7 @@
-
sort_title
=
issuable_sort_option_title
(
sort_value
)
-
viewing_issues
=
controller
.
controller_name
==
'issues'
||
controller
.
action_name
==
'issues'
.dropdown.inline.prepend-left-10
.dropdown.inline.prepend-left-10
.issue-sort-dropdown
.btn-group
{
role:
'group'
}
.btn-group
{
role:
'group'
}
%button
.dropdown-toggle
{
type:
'button'
,
data:
{
toggle:
'dropdown'
,
display:
'static'
},
class:
'btn btn-default'
}
...
...
spec/features/issuables/sorting_list_spec.rb
View file @
ff2c22fe
...
...
@@ -101,7 +101,7 @@ describe 'Sort Issuable List' do
expect
(
first_merge_request
).
to
include
(
last_updated_issuable
.
title
)
expect
(
last_merge_request
).
to
include
(
first_updated_issuable
.
title
)
find
(
'.issues-other-filters .filter-dropdown-container
a[type=button]
'
).
click
find
(
'.issues-other-filters .filter-dropdown-container
.qa-reverse-sort
'
).
click
expect
(
first_merge_request
).
to
include
(
first_updated_issuable
.
title
)
expect
(
last_merge_request
).
to
include
(
last_updated_issuable
.
title
)
...
...
@@ -204,7 +204,7 @@ describe 'Sort Issuable List' do
expect
(
first_issue
).
to
include
(
last_updated_issuable
.
title
)
expect
(
last_issue
).
to
include
(
first_updated_issuable
.
title
)
find
(
'.issues-other-filters .filter-dropdown-container
a[type=button]
'
).
click
find
(
'.issues-other-filters .filter-dropdown-container
.qa-reverse-sort
'
).
click
expect
(
first_issue
).
to
include
(
first_updated_issuable
.
title
)
expect
(
last_issue
).
to
include
(
last_updated_issuable
.
title
)
...
...
spec/helpers/sorting_helper_spec.rb
View file @
ff2c22fe
...
...
@@ -21,7 +21,7 @@ describe SortingHelper do
describe
'#issuable_sort_direction_button'
do
before
do
allow
(
self
).
to
receive
(
:request
).
and_return
(
double
(
path:
'http://test.com'
))
allow
(
self
).
to
receive
(
:request
).
and_return
(
double
(
path:
'http://test.com'
,
query_parameters:
{}
))
end
it
'returns icon with sort-highest when sort is created_date'
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