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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
65f5d062
Commit
65f5d062
authored
Oct 08, 2013
by
Stefano Tortarolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use proper titles for issues trackers
parent
c147b571
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
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
No files found.
app/helpers/projects_helper.rb
View file @
65f5d062
...
@@ -80,6 +80,18 @@ module ProjectsHelper
...
@@ -80,6 +80,18 @@ module ProjectsHelper
@project
.
milestones
.
active
.
order
(
"id desc"
).
all
@project
.
milestones
.
active
.
order
(
"id desc"
).
all
end
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
private
def
get_project_nav_tabs
(
project
,
current_user
)
def
get_project_nav_tabs
(
project
,
current_user
)
...
...
app/views/projects/edit.html.haml
View file @
65f5d062
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
-
if
Project
.
issues_tracker
.
values
.
count
>
1
-
if
Project
.
issues_tracker
.
values
.
count
>
1
.control-group
.control-group
=
f
.
label
:issues_tracker
,
"Issues tracker"
,
class:
'control-label'
=
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
.control-group
=
f
.
label
:issues_tracker_id
,
"Project name or id in issues tracker"
,
class:
'control-label'
=
f
.
label
:issues_tracker_id
,
"Project name or id in issues tracker"
,
class:
'control-label'
...
...
config/gitlab.yml.example
View file @
65f5d062
...
@@ -73,6 +73,7 @@ production: &base
...
@@ -73,6 +73,7 @@ production: &base
## External issues trackers
## External issues trackers
issues_tracker:
issues_tracker:
# redmine:
# redmine:
# title: "Redmine"
# ## If not nil, link 'Issues' on project page will be replaced with this
# ## If not nil, link 'Issues' on project page will be replaced with this
# ## Use placeholders:
# ## Use placeholders:
# ## :project_id - GitLab project identifier
# ## :project_id - GitLab project identifier
...
@@ -93,6 +94,7 @@ production: &base
...
@@ -93,6 +94,7 @@ production: &base
# new_issue_url: "http://redmine.sample/projects/:issues_tracker_id/issues/new"
# new_issue_url: "http://redmine.sample/projects/:issues_tracker_id/issues/new"
#
#
# jira:
# jira:
# title: "Atlassian Jira"
# project_url: "http://jira.sample/issues/?jql=project=:issues_tracker_id"
# project_url: "http://jira.sample/issues/?jql=project=:issues_tracker_id"
# issues_url: "http://jira.sample/browse/:id"
# issues_url: "http://jira.sample/browse/:id"
# new_issue_url: "http://jira.sample/secure/CreateIssue.jspa"
# new_issue_url: "http://jira.sample/secure/CreateIssue.jspa"
...
@@ -206,6 +208,7 @@ test:
...
@@ -206,6 +208,7 @@ test:
<<: *base
<<: *base
issues_tracker:
issues_tracker:
redmine:
redmine:
title: "Redmine"
project_url: "http://redmine/projects/:issues_tracker_id"
project_url: "http://redmine/projects/:issues_tracker_id"
issues_url: "http://redmine/:project_id/:issues_tracker_id/:id"
issues_url: "http://redmine/:project_id/:issues_tracker_id/:id"
new_issue_url: "http://redmine/projects/:issues_tracker_id/issues/new"
new_issue_url: "http://redmine/projects/:issues_tracker_id/issues/new"
...
...
spec/helpers/projects_helper_spec.rb
0 → 100644
View file @
65f5d062
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
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