Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
77cd95ae
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
77cd95ae
编写于
12月 12, 2018
作者:
M
Mario de la Ossa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Backport of 8810-fix-weight-sort
上级
9ead13b8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
9 deletion
+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
未找到文件。
app/helpers/sorting_helper.rb
浏览文件 @
77cd95ae
...
@@ -159,6 +159,15 @@ module SortingHelper
...
@@ -159,6 +159,15 @@ module SortingHelper
sort_options_hash
[
sort_value
]
sort_options_hash
[
sort_value
]
end
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
)
def
issuable_sort_direction_button
(
sort_value
)
link_class
=
'btn btn-default has-tooltip reverse-sort-btn qa-reverse-sort'
link_class
=
'btn btn-default has-tooltip reverse-sort-btn qa-reverse-sort'
reverse_sort
=
issuable_reverse_sort_order_hash
[
sort_value
]
reverse_sort
=
issuable_reverse_sort_order_hash
[
sort_value
]
...
@@ -171,15 +180,7 @@ module SortingHelper
...
@@ -171,15 +180,7 @@ module SortingHelper
end
end
link_to
(
reverse_url
,
type:
'button'
,
class:
link_class
,
title:
'Sort direction'
)
do
link_to
(
reverse_url
,
type:
'button'
,
class:
link_class
,
title:
'Sort direction'
)
do
icon_suffix
=
sprite_icon
(
"sort-
#{
issuable_sort_icon_suffix
(
sort_value
)
}
"
,
size:
16
)
case
sort_value
when
sort_value_milestone
,
sort_value_due_date
,
/_asc\z/
'lowest'
else
'highest'
end
sprite_icon
(
"sort-
#{
icon_suffix
}
"
,
size:
16
)
end
end
end
end
...
...
app/views/shared/issuable/_sort_dropdown.html.haml
浏览文件 @
77cd95ae
...
@@ -17,4 +17,5 @@
...
@@ -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_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_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
)
=
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
)
=
issuable_sort_direction_button
(
sort_value
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录