debian-mirror-gitlab/app/views/shared/_service_settings.html.haml

38 lines
1.7 KiB
Text
Raw Normal View History

2016-06-02 11:05:42 +05:30
= form_errors(@service)
2020-05-24 23:13:21 +05:30
- trigger_events = Feature.enabled?(:integration_form_refactor) ? ServiceEventSerializer.new(service: @service).represent(@service.configurable_events).to_json : []
2015-09-11 14:41:01 +05:30
2017-08-17 22:00:37 +05:30
- if lookup_context.template_exists?('help', "projects/services/#{@service.to_param}", true)
2020-04-08 14:13:33 +05:30
= render "projects/services/#{@service.to_param}/help", subject: @service
2017-08-17 22:00:37 +05:30
- elsif @service.help.present?
2018-11-08 19:23:39 +05:30
.info-well
.well-segment
= markdown @service.help
2017-08-17 22:00:37 +05:30
.service-settings
2020-05-24 23:13:21 +05:30
.js-vue-integration-settings{ data: { show_active: @service.show_active_box?.to_s, activated: (@service.active || @service.new_record?).to_s, type: @service.to_param, merge_request_events: @service.merge_requests_events.to_s,
commit_events: @service.commit_events.to_s, enable_comments: @service.comment_on_event_enabled.to_s, comment_detail: @service.comment_detail, trigger_events: trigger_events } }
2017-08-17 22:00:37 +05:30
2020-05-24 23:13:21 +05:30
- if @service.configurable_events.present? && !@service.is_a?(JiraService) && Feature.disabled?(:integration_form_refactor)
2018-11-08 19:23:39 +05:30
.form-group.row
2020-01-01 13:55:28 +05:30
%label.col-form-label.col-sm-2= _('Trigger')
2017-08-17 22:00:37 +05:30
.col-sm-10
2018-03-27 19:54:05 +05:30
- @service.configurable_events.each do |event|
2018-11-08 19:23:39 +05:30
.form-group
.form-check
= form.check_box service_event_field_name(event), class: 'form-check-input'
= form.label service_event_field_name(event), class: 'form-check-label' do
2017-08-17 22:00:37 +05:30
%strong
= event.humanize
2018-11-08 19:23:39 +05:30
- field = @service.event_field(event)
2017-08-17 22:00:37 +05:30
2018-11-08 19:23:39 +05:30
- if field
2017-08-17 22:00:37 +05:30
= form.text_field field[:name], class: "form-control", placeholder: field[:placeholder]
2018-11-08 19:23:39 +05:30
%p.text-muted
= @service.class.event_description(event)
2017-08-17 22:00:37 +05:30
- @service.global_fields.each do |field|
2020-05-24 23:13:21 +05:30
= render 'shared/field', form: form, field: field