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
a720dde6
Commit
a720dde6
authored
Jan 23, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove configuration option from project settings page for external issue trackers.
parent
041bad0f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
22 deletions
+9
-22
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+0
-12
app/models/project.rb
app/models/project.rb
+1
-1
app/models/service.rb
app/models/service.rb
+8
-0
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+0
-9
No files found.
app/helpers/projects_helper.rb
View file @
a720dde6
...
@@ -72,18 +72,6 @@ module ProjectsHelper
...
@@ -72,18 +72,6 @@ module ProjectsHelper
@project
.
milestones
.
active
.
order
(
"due_date, title ASC"
)
@project
.
milestones
.
active
.
order
(
"due_date, title ASC"
)
end
end
def
project_issues_trackers
(
current_tracker
=
nil
)
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
,
current_tracker
)
end
def
link_to_toggle_star
(
title
,
starred
,
signed_in
)
def
link_to_toggle_star
(
title
,
starred
,
signed_in
)
cls
=
'star-btn'
cls
=
'star-btn'
cls
+=
' disabled'
unless
signed_in
cls
+=
' disabled'
unless
signed_in
...
...
app/models/project.rb
View file @
a720dde6
...
@@ -137,7 +137,7 @@ class Project < ActiveRecord::Base
...
@@ -137,7 +137,7 @@ class Project < ActiveRecord::Base
scope
:public_and_internal_only
,
->
{
where
(
visibility_level:
Project
.
public_and_internal_levels
)
}
scope
:public_and_internal_only
,
->
{
where
(
visibility_level:
Project
.
public_and_internal_levels
)
}
scope
:non_archived
,
->
{
where
(
archived:
false
)
}
scope
:non_archived
,
->
{
where
(
archived:
false
)
}
enumerize
:issues_tracker
,
in:
(
Gitlab
.
config
.
issues_tracker
.
keys
).
append
(
:gitlab
),
default: :gitlab
enumerize
:issues_tracker
,
in:
(
Service
.
issue_tracker_service_list
).
append
(
:gitlab
),
default: :gitlab
state_machine
:import_status
,
initial: :none
do
state_machine
:import_status
,
initial: :none
do
event
:import_start
do
event
:import_start
do
...
...
app/models/service.rb
View file @
a720dde6
...
@@ -86,4 +86,12 @@ class Service < ActiveRecord::Base
...
@@ -86,4 +86,12 @@ class Service < ActiveRecord::Base
def
async_execute
(
data
)
def
async_execute
(
data
)
Sidekiq
::
Client
.
enqueue
(
ProjectServiceWorker
,
id
,
data
)
Sidekiq
::
Client
.
enqueue
(
ProjectServiceWorker
,
id
,
data
)
end
end
def
issue_tracker?
self
.
category
==
:issue_tracker
end
def
self
.
issue_tracker_service_list
Service
.
select
(
&
:issue_tracker?
).
map
{
|
s
|
s
.
to_param
}
end
end
end
app/views/projects/edit.html.haml
View file @
a720dde6
...
@@ -50,15 +50,6 @@
...
@@ -50,15 +50,6 @@
=
f
.
check_box
:issues_enabled
=
f
.
check_box
:issues_enabled
%span
.descr
Lightweight issue tracking system for this project
%span
.descr
Lightweight issue tracking system for this project
-
if
Project
.
issues_tracker
.
values
.
count
>
1
.form-group
=
f
.
label
:issues_tracker
,
"Issues tracker"
,
class:
'control-label'
.col-sm-10
=
f
.
select
(
:issues_tracker
,
project_issues_trackers
(
@project
.
issues_tracker
),
{},
{
disabled:
!
@project
.
issues_enabled
})
.form-group
=
f
.
label
:issues_tracker_id
,
"Project name or id in issues tracker"
,
class:
'control-label'
.col-sm-10
=
f
.
text_field
:issues_tracker_id
,
disabled:
!
@project
.
can_have_issues_tracker_id?
,
class:
'form-control'
.form-group
.form-group
=
f
.
label
:merge_requests_enabled
,
"Merge Requests"
,
class:
'control-label'
=
f
.
label
:merge_requests_enabled
,
"Merge Requests"
,
class:
'control-label'
.col-sm-10
.col-sm-10
...
...
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