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
77cd95ae
Commit
77cd95ae
authored
Dec 12, 2018
by
Mario de la Ossa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport of 8810-fix-weight-sort
parent
9ead13b8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
app/helpers/sorting_helper.rb
app/helpers/sorting_helper.rb
+10
-9
app/views/shared/issuable/_sort_dropdown.html.haml
app/views/shared/issuable/_sort_dropdown.html.haml
+1
-0
No files found.
app/helpers/sorting_helper.rb
View file @
77cd95ae
...
...
@@ -159,6 +159,15 @@ module SortingHelper
sort_options_hash
[
sort_value
]
end
def
issuable_sort_icon_suffix
(
sort_value
)
case
sort_value
when
sort_value_milestone
,
sort_value_due_date
,
/_asc\z/
'lowest'
else
'highest'
end
end
def
issuable_sort_direction_button
(
sort_value
)
link_class
=
'btn btn-default has-tooltip reverse-sort-btn qa-reverse-sort'
reverse_sort
=
issuable_reverse_sort_order_hash
[
sort_value
]
...
...
@@ -171,15 +180,7 @@ module SortingHelper
end
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/
'lowest'
else
'highest'
end
sprite_icon
(
"sort-
#{
icon_suffix
}
"
,
size:
16
)
sprite_icon
(
"sort-
#{
issuable_sort_icon_suffix
(
sort_value
)
}
"
,
size:
16
)
end
end
...
...
app/views/shared/issuable/_sort_dropdown.html.haml
View file @
77cd95ae
...
...
@@ -17,4 +17,5 @@
=
sortable_item
(
sort_title_due_date
,
page_filter_path
(
sort:
sort_value_due_date
),
sort_title
)
if
viewing_issues
=
sortable_item
(
sort_title_popularity
,
page_filter_path
(
sort:
sort_value_popularity
),
sort_title
)
=
sortable_item
(
sort_title_label_priority
,
page_filter_path
(
sort:
sort_value_label_priority
),
sort_title
)
=
render_if_exists
(
'shared/ee/issuable/sort_dropdown'
,
viewing_issues:
viewing_issues
,
sort_title:
sort_title
)
=
issuable_sort_direction_button
(
sort_value
)
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