Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
5b1634cd
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,发现更多精彩内容 >>
提交
5b1634cd
编写于
11月 08, 2011
作者:
A
Aleksei Kvitinskii
浏览文件
操作
浏览文件
下载
差异文件
implemented cookie remember option for issue page filter
上级
49bced3a
3fe9f3eb
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
21 addition
and
10 deletion
+21
-10
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+10
-5
app/views/issues/index.html.haml
app/views/issues/index.html.haml
+10
-4
app/views/layouts/project.html.haml
app/views/layouts/project.html.haml
+1
-1
未找到文件。
app/helpers/issues_helper.rb
浏览文件 @
5b1634cd
...
...
@@ -4,4 +4,9 @@ module IssuesHelper
"handle"
end
end
def
project_issues_filter_path
project
,
params
=
{}
params
[
:f
]
||=
cookies
[
'issue_filter'
]
project_issues_path
project
,
params
end
end
app/views/issues/index.html.haml
浏览文件 @
5b1634cd
...
...
@@ -13,16 +13,16 @@
.right.issues_filter
=
form_tag
project_issues_path
(
@project
),
:method
=>
:get
do
.left
=
radio_button_tag
:f
,
0
,
(
params
[
:f
]
||
"0"
)
==
"0"
,
:onclick
=>
"
this.form.submit(
)"
,
:id
=>
"open_issues"
,
:class
=>
"status"
=
radio_button_tag
:f
,
0
,
(
params
[
:f
]
||
"0"
)
==
"0"
,
:onclick
=>
"
setIssueFilter(this.form, 0
)"
,
:id
=>
"open_issues"
,
:class
=>
"status"
=
label_tag
"open_issues"
,
"Open"
.left
=
radio_button_tag
:f
,
2
,
params
[
:f
]
==
"2"
,
:onclick
=>
"
this.form.submit(
)"
,
:id
=>
"closed_issues"
,
:class
=>
"status"
=
radio_button_tag
:f
,
2
,
params
[
:f
]
==
"2"
,
:onclick
=>
"
setIssueFilter(this.form, 2
)"
,
:id
=>
"closed_issues"
,
:class
=>
"status"
=
label_tag
"closed_issues"
,
"Closed"
.left
=
radio_button_tag
:f
,
3
,
params
[
:f
]
==
"3"
,
:onclick
=>
"
this.form.submit(
)"
,
:id
=>
"my_issues"
,
:class
=>
"status"
=
radio_button_tag
:f
,
3
,
params
[
:f
]
==
"3"
,
:onclick
=>
"
setIssueFilter(this.form, 3
)"
,
:id
=>
"my_issues"
,
:class
=>
"status"
=
label_tag
"my_issues"
,
"To Me"
.left
=
radio_button_tag
:f
,
1
,
params
[
:f
]
==
"1"
,
:onclick
=>
"
this.form.submit(
)"
,
:id
=>
"all_issues"
,
:class
=>
"status"
=
radio_button_tag
:f
,
1
,
params
[
:f
]
==
"1"
,
:onclick
=>
"
setIssueFilter(this.form, 1
)"
,
:id
=>
"all_issues"
,
:class
=>
"status"
=
label_tag
"all_issues"
,
"All"
=
render
"issues"
...
...
@@ -31,6 +31,12 @@
var
href
=
$
(
'
.issue_search
'
).
parent
().
attr
(
'
action
'
);
var
last_terms
=
''
;
var
setIssueFilter
=
function
(
form
,
value
){
$
.
cookie
(
'
issue_filter
'
,
value
,
{
expires
:
140
});
form
.
submit
();
}
$
(
'
.issue_search
'
).
keyup
(
function
()
{
var
terms
=
$
(
this
).
val
();
var
project_id
=
$
(
'
#project_id
'
).
val
();
...
...
app/views/layouts/project.html.haml
浏览文件 @
5b1634cd
...
...
@@ -25,7 +25,7 @@
Team
-
if
@project
.
users_projects
.
count
>
0
%span
{
:class
=>
"number"
}=
@project
.
users_projects
.
count
=
link_to
project_issues_path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"issues"
)
?
"current"
:
nil
do
=
link_to
project_issues_
filter_
path
(
@project
),
:class
=>
(
controller
.
controller_name
==
"issues"
)
?
"current"
:
nil
do
Issues
-
if
@project
.
issues
.
opened
.
count
>
0
%span
{
:class
=>
"number"
}=
@project
.
issues
.
opened
.
count
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录