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
Tatuya Kamada
gitlab-ce
Commits
808b05e9
Commit
808b05e9
authored
Apr 29, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move service template and project service settings into a shared view
parent
8d3eaf5f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
147 deletions
+77
-147
app/views/admin/services/_form.html.haml
app/views/admin/services/_form.html.haml
+1
-73
app/views/projects/services/_form.html.haml
app/views/projects/services/_form.html.haml
+1
-74
app/views/shared/_service_settings.html.haml
app/views/shared/_service_settings.html.haml
+75
-0
No files found.
app/views/admin/services/_form.html.haml
View file @
808b05e9
...
@@ -4,79 +4,7 @@
...
@@ -4,79 +4,7 @@
%p
#{
@service
.
description
}
template
%p
#{
@service
.
description
}
template
=
form_for
:service
,
url:
admin_application_settings_service_path
,
method: :put
,
html:
{
class:
'form-horizontal fieldset-form'
}
do
|
form
|
=
form_for
:service
,
url:
admin_application_settings_service_path
,
method: :put
,
html:
{
class:
'form-horizontal fieldset-form'
}
do
|
form
|
-
if
@service
.
errors
.
any?
=
render
'shared/service_settings'
,
form:
form
#error_explanation
.alert.alert-danger
-
@service
.
errors
.
full_messages
.
each
do
|
msg
|
%p
=
msg
-
if
@service
.
help
.
present?
.well
=
preserve
do
=
markdown
@service
.
help
.form-group
=
form
.
label
:active
,
"Active"
,
class:
"control-label"
.col-sm-10
=
form
.
check_box
:active
-
if
@service
.
supported_events
.
length
>
1
.form-group
=
form
.
label
:url
,
"Trigger"
,
class:
'control-label'
.col-sm-10
-
if
@service
.
supported_events
.
include?
(
"push"
)
%div
=
form
.
check_box
:push_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:push_events
,
class:
'list-label'
do
%strong
Push events
%p
.light
This url will be triggered by a push to the repository
-
if
@service
.
supported_events
.
include?
(
"tag_push"
)
%div
=
form
.
check_box
:tag_push_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:tag_push_events
,
class:
'list-label'
do
%strong
Tag push events
%p
.light
This url will be triggered when a new tag is pushed to the repository
-
if
@service
.
supported_events
.
include?
(
"note"
)
%div
=
form
.
check_box
:note_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:note_events
,
class:
'list-label'
do
%strong
Comments
%p
.light
This url will be triggered when someone adds a comment
-
if
@service
.
supported_events
.
include?
(
"issue"
)
%div
=
form
.
check_box
:issues_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:issues_events
,
class:
'list-label'
do
%strong
Issues events
%p
.light
This url will be triggered when an issue is created
-
if
@service
.
supported_events
.
include?
(
"merge_request"
)
%div
=
form
.
check_box
:merge_requests_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:merge_requests_events
,
class:
'list-label'
do
%strong
Merge Request events
%p
.light
This url will be triggered when a merge request is created
-
@service
.
fields
.
each
do
|
field
|
-
type
=
field
[
:type
]
-
if
type
==
'fieldset'
-
fields
=
field
[
:fields
]
-
legend
=
field
[
:legend
]
%fieldset
%legend
=
legend
-
fields
.
each
do
|
subfield
|
=
render
'shared/field'
,
form:
form
,
field:
subfield
-
else
=
render
'shared/field'
,
form:
form
,
field:
field
.form-actions
.form-actions
=
form
.
submit
'Save'
,
class:
'btn btn-save'
=
form
.
submit
'Save'
,
class:
'btn btn-save'
app/views/projects/services/_form.html.haml
View file @
808b05e9
...
@@ -11,80 +11,7 @@
...
@@ -11,80 +11,7 @@
%hr
%hr
=
form_for
(
@service
,
as: :service
,
url:
namespace_project_service_path
(
@project
.
namespace
,
@project
,
@service
.
to_param
),
method: :put
,
html:
{
class:
'form-horizontal'
})
do
|
form
|
=
form_for
(
@service
,
as: :service
,
url:
namespace_project_service_path
(
@project
.
namespace
,
@project
,
@service
.
to_param
),
method: :put
,
html:
{
class:
'form-horizontal'
})
do
|
form
|
-
if
@service
.
errors
.
any?
=
render
'shared/service_settings'
,
form:
form
.alert.alert-danger
%ul
-
@service
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
-
if
@service
.
help
.
present?
.well
=
preserve
do
=
markdown
@service
.
help
.form-group
=
form
.
label
:active
,
"Active"
,
class:
"control-label"
.col-sm-10
=
form
.
check_box
:active
-
if
@service
.
supported_events
.
length
>
1
.form-group
=
form
.
label
:url
,
"Trigger"
,
class:
'control-label'
.col-sm-10
-
if
@service
.
supported_events
.
include?
(
"push"
)
%div
=
form
.
check_box
:push_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:push_events
,
class:
'list-label'
do
%strong
Push events
%p
.light
This url will be triggered by a push to the repository
-
if
@service
.
supported_events
.
include?
(
"tag_push"
)
%div
=
form
.
check_box
:tag_push_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:tag_push_events
,
class:
'list-label'
do
%strong
Tag push events
%p
.light
This url will be triggered when a new tag is pushed to the repository
-
if
@service
.
supported_events
.
include?
(
"note"
)
%div
=
form
.
check_box
:note_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:note_events
,
class:
'list-label'
do
%strong
Comments
%p
.light
This url will be triggered when someone adds a comment
-
if
@service
.
supported_events
.
include?
(
"issue"
)
%div
=
form
.
check_box
:issues_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:issues_events
,
class:
'list-label'
do
%strong
Issues events
%p
.light
This url will be triggered when an issue is created
-
if
@service
.
supported_events
.
include?
(
"merge_request"
)
%div
=
form
.
check_box
:merge_requests_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:merge_requests_events
,
class:
'list-label'
do
%strong
Merge Request events
%p
.light
This url will be triggered when a merge request is created
-
@service
.
fields
.
each
do
|
field
|
-
type
=
field
[
:type
]
-
if
type
==
'fieldset'
-
fields
=
field
[
:fields
]
-
legend
=
field
[
:legend
]
%fieldset
%legend
=
legend
-
fields
.
each
do
|
subfield
|
=
render
'shared/field'
,
form:
form
,
field:
subfield
-
else
=
render
'shared/field'
,
form:
form
,
field:
field
.form-actions
.form-actions
=
form
.
submit
'Save'
,
class:
'btn btn-save'
=
form
.
submit
'Save'
,
class:
'btn btn-save'
...
...
app/views/shared/_service_settings.html.haml
0 → 100644
View file @
808b05e9
-
if
@service
.
errors
.
any?
#error_explanation
.alert.alert-danger
%ul
-
@service
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
-
if
@service
.
help
.
present?
.well
=
preserve
do
=
markdown
@service
.
help
.form-group
=
form
.
label
:active
,
"Active"
,
class:
"control-label"
.col-sm-10
=
form
.
check_box
:active
-
if
@service
.
supported_events
.
length
>
1
.form-group
=
form
.
label
:url
,
"Trigger"
,
class:
'control-label'
.col-sm-10
-
if
@service
.
supported_events
.
include?
(
"push"
)
%div
=
form
.
check_box
:push_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:push_events
,
class:
'list-label'
do
%strong
Push events
%p
.light
This url will be triggered by a push to the repository
-
if
@service
.
supported_events
.
include?
(
"tag_push"
)
%div
=
form
.
check_box
:tag_push_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:tag_push_events
,
class:
'list-label'
do
%strong
Tag push events
%p
.light
This url will be triggered when a new tag is pushed to the repository
-
if
@service
.
supported_events
.
include?
(
"note"
)
%div
=
form
.
check_box
:note_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:note_events
,
class:
'list-label'
do
%strong
Comments
%p
.light
This url will be triggered when someone adds a comment
-
if
@service
.
supported_events
.
include?
(
"issue"
)
%div
=
form
.
check_box
:issues_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:issues_events
,
class:
'list-label'
do
%strong
Issues events
%p
.light
This url will be triggered when an issue is created
-
if
@service
.
supported_events
.
include?
(
"merge_request"
)
%div
=
form
.
check_box
:merge_requests_events
,
class:
'pull-left'
.prepend-left-20
=
form
.
label
:merge_requests_events
,
class:
'list-label'
do
%strong
Merge Request events
%p
.light
This url will be triggered when a merge request is created
-
@service
.
fields
.
each
do
|
field
|
-
type
=
field
[
:type
]
-
if
type
==
'fieldset'
-
fields
=
field
[
:fields
]
-
legend
=
field
[
:legend
]
%fieldset
%legend
=
legend
-
fields
.
each
do
|
subfield
|
=
render
'shared/field'
,
form:
form
,
field:
subfield
-
else
=
render
'shared/field'
,
form:
form
,
field:
field
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