From 15a2d004be2f79160752d77f701c0f08e7f96973 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 4 Nov 2019 06:06:46 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../admin/application_settings/_plantuml.html.haml | 41 +++++++++++++--------- .../admin/application_settings/_snowplow.html.haml | 4 +-- .../_third_party_offers.html.haml | 28 +++++++++------ .../application_settings/integrations.html.haml | 33 ++++------------- 4 files changed, 51 insertions(+), 55 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/application_settings/_plantuml.html.haml b/app/views/admin/application_settings/_plantuml.html.haml index 86dc289dd7c..d35774d330d 100644 --- a/app/views/admin/application_settings/_plantuml.html.haml +++ b/app/views/admin/application_settings/_plantuml.html.haml @@ -1,18 +1,27 @@ -= form_for @application_setting, url: integrations_admin_application_settings_path(anchor: 'js-plantuml-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) +- expanded = integration_expanded?('plantuml_') +%section.settings.as-plantuml.no-animate#js-plantuml-settings{ class: ('expanded' if expanded) } + .settings-header + %h4 + = _('PlantUML') + %button.btn.btn-default.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') + %p + = _('Allow rendering of PlantUML diagrams in Asciidoc documents.') + .settings-content + = form_for @application_setting, url: integrations_admin_application_settings_path(anchor: 'js-plantuml-settings'), html: { class: 'fieldset-form' } do |f| + = form_errors(@application_setting) if expanded - %fieldset - .form-group - .form-check - = f.check_box :plantuml_enabled, class: 'form-check-input' - = f.label :plantuml_enabled, class: 'form-check-label' do - Enable PlantUML - .form-group - = f.label :plantuml_url, 'PlantUML URL', class: 'label-bold' - = f.text_field :plantuml_url, class: 'form-control', placeholder: 'http://gitlab.your-plantuml-instance.com:8080' - .form-text.text-muted - Allow rendering of - = link_to "PlantUML", "http://plantuml.com" - diagrams in Asciidoc documents using an external PlantUML service. + %fieldset + .form-group + .form-check + = f.check_box :plantuml_enabled, class: 'form-check-input' + = f.label :plantuml_enabled, _('Enable PlantUML'), class: 'form-check-label' + .form-group + = f.label :plantuml_url, 'PlantUML URL', class: 'label-bold' + = f.text_field :plantuml_url, class: 'form-control', placeholder: 'http://gitlab.your-plantuml-instance.com:8080' + .form-text.text-muted + Allow rendering of + = link_to "PlantUML", "http://plantuml.com" + diagrams in Asciidoc documents using an external PlantUML service. - = f.submit 'Save changes', class: "btn btn-success" + = f.submit _('Save changes'), class: "btn btn-success" diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml index dd454ce5dd7..ff96c5d64ac 100644 --- a/app/views/admin/application_settings/_snowplow.html.haml +++ b/app/views/admin/application_settings/_snowplow.html.haml @@ -1,4 +1,4 @@ -- expanded = true if !@application_setting.valid? && @application_setting.errors.any? { |k| k.to_s.start_with?('snowplow_') } +- expanded = integration_expanded?('snowplow_') %section.settings.as-snowplow.no-animate#js-snowplow-settings{ class: ('expanded' if expanded) } .settings-header %h4 @@ -10,7 +10,7 @@ .settings-content = form_for @application_setting, url: integrations_admin_application_settings_path(anchor: 'js-snowplow-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting) if expanded %fieldset .form-group diff --git a/app/views/admin/application_settings/_third_party_offers.html.haml b/app/views/admin/application_settings/_third_party_offers.html.haml index adde09f75e4..256b1f74bfa 100644 --- a/app/views/admin/application_settings/_third_party_offers.html.haml +++ b/app/views/admin/application_settings/_third_party_offers.html.haml @@ -1,13 +1,21 @@ -- application_setting = local_assigns.fetch(:application_setting) +- expanded = integration_expanded?('hide_third_party_') +%section.settings.as-third-party-offers.no-animate#js-third-party-offers-settings{ class: ('expanded' if expanded) } + .settings-header + %h4 + = _('Third party offers') + %button.btn.btn-default.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') + %p + = _('Control the display of third party offers.') + .settings-content -= form_for application_setting, url: integrations_admin_application_settings_path(anchor: 'js-third-party-offers-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(application_setting) + = form_for @application_setting, url: integrations_admin_application_settings_path(anchor: 'js-third-party-offers-settings'), html: { class: 'fieldset-form' } do |f| + = form_errors(@application_setting) if expanded - %fieldset - .form-group - .form-check - = f.check_box :hide_third_party_offers, class: 'form-check-input' - = f.label :hide_third_party_offers, class: 'form-check-label' do - Do not display offers from third parties within GitLab + %fieldset + .form-group + .form-check + = f.check_box :hide_third_party_offers, class: 'form-check-input' + = f.label :hide_third_party_offers, _('Do not display offers from third parties within GitLab'), class: 'form-check-label' - = f.submit 'Save changes', class: "btn btn-success" + = f.submit _('Save changes'), class: "btn btn-success" diff --git a/app/views/admin/application_settings/integrations.html.haml b/app/views/admin/application_settings/integrations.html.haml index e1079e5650f..0045a149c97 100644 --- a/app/views/admin/application_settings/integrations.html.haml +++ b/app/views/admin/application_settings/integrations.html.haml @@ -2,31 +2,10 @@ - page_title _("Integrations") - @content_class = "limit-container-width" unless fluid_layout -= render_if_exists 'admin/application_settings/elasticsearch_form', expanded: expanded_by_default? - -%section.settings.as-plantuml.no-animate#js-plantuml-settings{ class: ('expanded' if expanded_by_default?) } - .settings-header - %h4 - = _('PlantUML') - %button.btn.btn-default.js-settings-toggle{ type: 'button' } - = expanded_by_default? ? _('Collapse') : _('Expand') - %p - = _('Allow rendering of PlantUML diagrams in Asciidoc documents.') - .settings-content - = render 'plantuml' - -= render_if_exists 'admin/application_settings/slack', expanded: expanded_by_default? - -%section.settings.as-third-party-offers.no-animate#js-third-party-offers-settings{ class: ('expanded' if expanded_by_default?) } - .settings-header - %h4 - = _('Third party offers') - %button.btn.btn-default.js-settings-toggle{ type: 'button' } - = expanded_by_default? ? _('Collapse') : _('Expand') - %p - = _('Control the display of third party offers.') - .settings-content - = render 'third_party_offers', application_setting: @application_setting - -= render 'admin/application_settings/snowplow', expanded: expanded_by_default? += render_if_exists 'admin/application_settings/elasticsearch_form' += render 'admin/application_settings/plantuml' += render_if_exists 'admin/application_settings/slack' += render 'admin/application_settings/third_party_offers' += render 'admin/application_settings/snowplow' = render_if_exists 'admin/application_settings/pendo' + -- cgit v1.2.1