Commit db66af4b authored by Sam Beckham's avatar Sam Beckham Committed by Clement Ho

Resolve "Admin area > Styling of service template page"

parent 71ae1bb2
...@@ -7,5 +7,4 @@ ...@@ -7,5 +7,4 @@
= render 'shared/service_settings', form: form, subject: @service = render 'shared/service_settings', form: form, subject: @service
.footer-block.row-content-block .footer-block.row-content-block
.form-actions
= form.submit 'Save', class: 'btn btn-save' = form.submit 'Save', class: 'btn btn-save'
- enabled = Gitlab.config.mattermost.enabled - enabled = Gitlab.config.mattermost.enabled
.card .info-well
.well-segment
%p %p
This service allows users to perform common operations on this This service allows users to perform common operations on this
project by entering slash commands in Mattermost. project by entering slash commands in Mattermost.
......
- pretty_name = defined?(@project) ? @project.full_name : 'namespace / path' - pretty_name = defined?(@project) ? @project.full_name : 'namespace / path'
- run_actions_text = "Perform common operations on GitLab project: #{pretty_name}" - run_actions_text = "Perform common operations on GitLab project: #{pretty_name}"
.card .info-well
.well-segment
%p %p
This service allows users to perform common operations on this This service allows users to perform common operations on this
project by entering slash commands in Slack. project by entering slash commands in Slack.
......
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
- help = field[:help] - help = field[:help]
- disabled = disable_fields_service?(@service) - disabled = disable_fields_service?(@service)
.form-group .form-group.row
- if type == "password" && value.present? - if type == "password" && value.present?
= form.label name, "Enter new #{title.downcase}", class: "col-form-label" = form.label name, "Enter new #{title.downcase}", class: "col-form-label col-sm-2"
- else - else
= form.label name, title, class: "col-form-label" = form.label name, title, class: "col-form-label col-sm-2"
.col-sm-10 .col-sm-10
- if type == 'text' - if type == 'text'
= form.text_field name, class: "form-control", placeholder: placeholder, required: required, disabled: disabled = form.text_field name, class: "form-control", placeholder: placeholder, required: required, disabled: disabled
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
- if lookup_context.template_exists?('help', "projects/services/#{@service.to_param}", true) - if lookup_context.template_exists?('help', "projects/services/#{@service.to_param}", true)
= render "projects/services/#{@service.to_param}/help", subject: subject = render "projects/services/#{@service.to_param}/help", subject: subject
- elsif @service.help.present? - elsif @service.help.present?
.card .info-well
.well-segment
= markdown @service.help = markdown @service.help
.service-settings .service-settings
...@@ -15,24 +16,23 @@ ...@@ -15,24 +16,23 @@
- if @service.configurable_events.present? - if @service.configurable_events.present?
.form-group.row .form-group.row
= form.label :url, "Trigger", class: 'col-form-label col-sm-2' .col-sm-2.text-right Trigger
.col-sm-10 .col-sm-10
- @service.configurable_events.each do |event| - @service.configurable_events.each do |event|
%div .form-group
= form.check_box service_event_field_name(event), class: 'float-left' .form-check
.prepend-left-20 = form.check_box service_event_field_name(event), class: 'form-check-input'
= form.label service_event_field_name(event), class: 'list-label' do = form.label service_event_field_name(event), class: 'form-check-label' do
%strong %strong
= event.humanize = event.humanize
- field = @service.event_field(event) - field = @service.event_field(event)
- if field - if field
%p
= form.text_field field[:name], class: "form-control", placeholder: field[:placeholder] = form.text_field field[:name], class: "form-control", placeholder: field[:placeholder]
%p.light %p.text-muted
= @service.class.event_description(event) = @service.class.event_description(event)
- @service.global_fields.each do |field| - @service.global_fields.each do |field|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment