diff options
author | Stan Hu <stanhu@gmail.com> | 2015-04-29 17:52:27 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-04-29 17:52:27 +0300 |
commit | 808b05e9747d46821ff1cc6a0071e881c2dc0056 (patch) | |
tree | 0b8f7f3ee87ea2990cb18e97a00b984522577f38 /app/views/admin | |
parent | 8d3eaf5fa12b4ce8af5f9c335c31844bd079276b (diff) |
Move service template and project service settings into a shared view
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/services/_form.html.haml | 74 |
1 files changed, 1 insertions, 73 deletions
diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index 34ca7776c9e..cdbfc60f9a4 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -4,79 +4,7 @@ %p #{@service.description} template = form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'form-horizontal fieldset-form' } do |form| - - if @service.errors.any? - #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 + = render 'shared/service_settings', form: form .form-actions = form.submit 'Save', class: 'btn btn-save' |