diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/views/shared/integrations | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) | |
download | gitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'app/views/shared/integrations')
-rw-r--r-- | app/views/shared/integrations/_form.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/integrations/_tabs.html.haml | 18 | ||||
-rw-r--r-- | app/views/shared/integrations/edit.html.haml | 6 | ||||
-rw-r--r-- | app/views/shared/integrations/overrides.html.haml | 10 |
4 files changed, 33 insertions, 4 deletions
diff --git a/app/views/shared/integrations/_form.html.haml b/app/views/shared/integrations/_form.html.haml index 62f8d986296..35f302a28a6 100644 --- a/app/views/shared/integrations/_form.html.haml +++ b/app/views/shared/integrations/_form.html.haml @@ -1,7 +1,4 @@ - integration = local_assigns.fetch(:integration) -%h3.page-title - = integration.title - = form_for integration, as: :service, url: scoped_integration_path(integration), method: :put, html: { class: 'gl-show-field-errors integration-settings-form js-integration-settings-form', data: { 'test-url' => scoped_test_integration_path(integration) } } do |form| = render 'shared/service_settings', form: form, integration: integration diff --git a/app/views/shared/integrations/_tabs.html.haml b/app/views/shared/integrations/_tabs.html.haml new file mode 100644 index 00000000000..553401e47bd --- /dev/null +++ b/app/views/shared/integrations/_tabs.html.haml @@ -0,0 +1,18 @@ +- active_tab = local_assigns.fetch(:active_tab, 'edit') +- active_classes = 'gl-tab-nav-item-active gl-tab-nav-item-active-indigo active' +- tabs = integration_tabs(integration: integration) + +- if tabs.length <= 1 + = yield +- else + .tabs.gl-tabs + %div + %ul.nav.gl-tabs-nav{ role: 'tablist' } + - tabs.each do |tab| + %li.nav-item{ role: 'presentation' } + %a.nav-link.gl-tab-nav-item{ role: 'tab', class: (active_classes if tab[:key] == active_tab), href: tab[:href] } + = tab[:text] + + .tab-content.gl-tab-content + .tab-pane.gl-pt-3.active{ role: 'tabpanel' } + = yield diff --git a/app/views/shared/integrations/edit.html.haml b/app/views/shared/integrations/edit.html.haml index a996f72e2f4..02cb94e3555 100644 --- a/app/views/shared/integrations/edit.html.haml +++ b/app/views/shared/integrations/edit.html.haml @@ -3,4 +3,8 @@ - page_title @integration.title, _('Integrations') - @content_class = 'limit-container-width' unless fluid_layout -= render 'shared/integrations/form', integration: @integration +%h3.page-title + = @integration.title + += render 'shared/integrations/tabs', integration: @integration, active_tab: 'edit' do + = render 'shared/integrations/form', integration: @integration diff --git a/app/views/shared/integrations/overrides.html.haml b/app/views/shared/integrations/overrides.html.haml new file mode 100644 index 00000000000..dc87fae704c --- /dev/null +++ b/app/views/shared/integrations/overrides.html.haml @@ -0,0 +1,10 @@ +- add_to_breadcrumbs _('Integrations'), scoped_integrations_path +- breadcrumb_title @integration.title +- page_title @integration.title, _('Integrations') +- @content_class = 'limit-container-width' unless fluid_layout + +%h3.page-title + = @integration.title + += render 'shared/integrations/tabs', integration: @integration, active_tab: 'overrides' do + .js-vue-integration-overrides{ data: integration_overrides_data(@integration) } |