2015-02-11 20:34:41 -05:00
|
|
|
%h3.page-title
|
|
|
|
= @service.title
|
|
|
|
|
|
|
|
%p #{@service.description} template
|
|
|
|
|
2015-04-02 04:18:42 -04:00
|
|
|
= form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'form-horizontal fieldset-form' } do |form|
|
2015-02-11 20:34:41 -05:00
|
|
|
- if @service.errors.any?
|
|
|
|
#error_explanation
|
|
|
|
.alert.alert-danger
|
|
|
|
- @service.errors.full_messages.each do |msg|
|
|
|
|
%p= msg
|
2015-02-12 20:06:55 -05:00
|
|
|
- if @service.help.present?
|
2015-03-26 02:07:59 -04:00
|
|
|
.well
|
2015-02-12 20:06:55 -05:00
|
|
|
= preserve do
|
|
|
|
= markdown @service.help
|
2015-02-11 20:34:41 -05:00
|
|
|
|
2015-03-23 08:51:38 -04:00
|
|
|
.form-group
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.label :active, "Active", class: "control-label"
|
2015-03-23 08:51:38 -04:00
|
|
|
.col-sm-10
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.check_box :active
|
2015-03-23 08:51:38 -04:00
|
|
|
|
2015-03-16 20:48:36 -04:00
|
|
|
- if @service.supported_events.length > 1
|
|
|
|
.form-group
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.label :url, "Trigger", class: 'control-label'
|
2015-02-28 11:33:18 -05:00
|
|
|
.col-sm-10
|
|
|
|
- if @service.supported_events.include?("push")
|
|
|
|
%div
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.check_box :push_events, class: 'pull-left'
|
2015-02-28 11:33:18 -05:00
|
|
|
.prepend-left-20
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.label :push_events, class: 'list-label' do
|
2015-02-28 11:33:18 -05:00
|
|
|
%strong Push events
|
|
|
|
%p.light
|
|
|
|
This url will be triggered by a push to the repository
|
|
|
|
- if @service.supported_events.include?("tag_push")
|
|
|
|
%div
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.check_box :tag_push_events, class: 'pull-left'
|
2015-02-28 11:33:18 -05:00
|
|
|
.prepend-left-20
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.label :tag_push_events, class: 'list-label' do
|
2015-02-28 11:33:18 -05:00
|
|
|
%strong Tag push events
|
|
|
|
%p.light
|
|
|
|
This url will be triggered when a new tag is pushed to the repository
|
2015-03-23 08:51:38 -04:00
|
|
|
- if @service.supported_events.include?("note")
|
|
|
|
%div
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.check_box :note_events, class: 'pull-left'
|
2015-03-23 08:51:38 -04:00
|
|
|
.prepend-left-20
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.label :note_events, class: 'list-label' do
|
2015-03-23 08:51:38 -04:00
|
|
|
%strong Comments
|
|
|
|
%p.light
|
|
|
|
This url will be triggered when someone adds a comment
|
2015-02-28 11:33:18 -05:00
|
|
|
- if @service.supported_events.include?("issue")
|
|
|
|
%div
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.check_box :issues_events, class: 'pull-left'
|
2015-02-28 11:33:18 -05:00
|
|
|
.prepend-left-20
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.label :issues_events, class: 'list-label' do
|
2015-02-28 11:33:18 -05:00
|
|
|
%strong Issues events
|
|
|
|
%p.light
|
|
|
|
This url will be triggered when an issue is created
|
|
|
|
- if @service.supported_events.include?("merge_request")
|
|
|
|
%div
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.check_box :merge_requests_events, class: 'pull-left'
|
2015-02-28 11:33:18 -05:00
|
|
|
.prepend-left-20
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.label :merge_requests_events, class: 'list-label' do
|
2015-02-28 11:33:18 -05:00
|
|
|
%strong Merge Request events
|
|
|
|
%p.light
|
|
|
|
This url will be triggered when a merge request is created
|
|
|
|
|
2015-02-11 20:34:41 -05:00
|
|
|
- @service.fields.each do |field|
|
|
|
|
- type = field[:type]
|
|
|
|
|
2015-04-02 04:18:42 -04:00
|
|
|
- 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
|
2015-02-11 20:34:41 -05:00
|
|
|
|
|
|
|
.form-actions
|
2015-04-02 04:18:42 -04:00
|
|
|
= form.submit 'Save', class: 'btn btn-save'
|