Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
a37b8ab2
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,发现更多精彩内容 >>
提交
a37b8ab2
编写于
10月 09, 2013
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5291 from astratto/title_issue_trackers
Use proper titles for issues trackers
上级
87ffd676
65f5d062
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
1 deletion
+27
-1
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+12
-0
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+1
-1
config/gitlab.yml.example
config/gitlab.yml.example
+3
-0
spec/helpers/projects_helper_spec.rb
spec/helpers/projects_helper_spec.rb
+11
-0
未找到文件。
app/helpers/projects_helper.rb
浏览文件 @
a37b8ab2
...
...
@@ -80,6 +80,18 @@ module ProjectsHelper
@project
.
milestones
.
active
.
order
(
"id desc"
).
all
end
def
project_issues_trackers
values
=
Project
.
issues_tracker
.
values
.
map
do
|
tracker_key
|
if
tracker_key
.
to_sym
==
:gitlab
[
'GitLab'
,
tracker_key
]
else
[
Gitlab
.
config
.
issues_tracker
[
tracker_key
][
'title'
]
||
tracker_key
,
tracker_key
]
end
end
options_for_select
(
values
)
end
private
def
get_project_nav_tabs
(
project
,
current_user
)
...
...
app/views/projects/edit.html.haml
浏览文件 @
a37b8ab2
...
...
@@ -67,7 +67,7 @@
-
if
Project
.
issues_tracker
.
values
.
count
>
1
.control-group
=
f
.
label
:issues_tracker
,
"Issues tracker"
,
class:
'control-label'
.controls
=
f
.
select
(
:issues_tracker
,
Project
.
issues_tracker
.
value
s
,
{},
{
disabled:
!
@project
.
issues_enabled
})
.controls
=
f
.
select
(
:issues_tracker
,
project_issues_tracker
s
,
{},
{
disabled:
!
@project
.
issues_enabled
})
.control-group
=
f
.
label
:issues_tracker_id
,
"Project name or id in issues tracker"
,
class:
'control-label'
...
...
config/gitlab.yml.example
浏览文件 @
a37b8ab2
...
...
@@ -73,6 +73,7 @@ production: &base
## External issues trackers
issues_tracker:
# redmine:
# title: "Redmine"
# ## If not nil, link 'Issues' on project page will be replaced with this
# ## Use placeholders:
# ## :project_id - GitLab project identifier
...
...
@@ -93,6 +94,7 @@ production: &base
# new_issue_url: "http://redmine.sample/projects/:issues_tracker_id/issues/new"
#
# jira:
# title: "Atlassian Jira"
# project_url: "http://jira.sample/issues/?jql=project=:issues_tracker_id"
# issues_url: "http://jira.sample/browse/:id"
# new_issue_url: "http://jira.sample/secure/CreateIssue.jspa"
...
...
@@ -206,6 +208,7 @@ test:
<<: *base
issues_tracker:
redmine:
title: "Redmine"
project_url: "http://redmine/projects/:issues_tracker_id"
issues_url: "http://redmine/:project_id/:issues_tracker_id/:id"
new_issue_url: "http://redmine/projects/:issues_tracker_id/issues/new"
...
...
spec/helpers/projects_helper_spec.rb
0 → 100644
浏览文件 @
a37b8ab2
require
'spec_helper'
describe
ProjectsHelper
do
describe
'#project_issues_trackers'
do
it
"returns the correct issues trackers available"
do
project_issues_trackers
.
should
==
"<option value=
\"
redmine
\"
>Redmine</option>
\n
"
\
"<option value=
\"
gitlab
\"
>GitLab</option>"
end
end
end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录