Commit 5eb00277 authored by Phil Hughes's avatar Phil Hughes

Merge branch '37561-add-id-settings-ee' into 'master'

EE port of Resolve "Add `id` attributes to settings section to allow to open if an hash is provided in the URL"

See merge request gitlab-org/gitlab-ee!6308
parents cfbc968b 35aa39cb
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- project = local_assigns.fetch(:project) - project = local_assigns.fetch(:project)
- expanded = Rails.env.test? - expanded = Rails.env.test?
%section.settings.no-animate{ class: ('expanded' if expanded) } %section.settings.no-animate#js-export-project{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4
Export project Export project
......
- expanded = expand_deploy_tokens_section?(@new_deploy_token) - expanded = expand_deploy_tokens_section?(@new_deploy_token)
%section.settings.no-animate{ class: ('expanded' if expanded) } %section.settings.no-animate#js-deploy-tokens{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4= s_('DeployTokens|Deploy Tokens') %h4= s_('DeployTokens|Deploy Tokens')
%button.btn.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' } %button.btn.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- expanded = Rails.env.test? - expanded = Rails.env.test?
.project-edit-container .project-edit-container
%section.settings.general-settings.no-animate{ class: ('expanded' if expanded) } %section.settings.general-settings.no-animate#js-general-project-settings{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4
General project General project
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
= link_to _('Remove avatar'), project_avatar_path(@project), data: { confirm: _("Avatar will be removed. Are you sure?") }, method: :delete, class: "btn btn-danger btn-inverted" = link_to _('Remove avatar'), project_avatar_path(@project), data: { confirm: _("Avatar will be removed. Are you sure?") }, method: :delete, class: "btn btn-danger btn-inverted"
= f.submit 'Save changes', class: "btn btn-success js-btn-save-general-project-settings" = f.submit 'Save changes', class: "btn btn-success js-btn-save-general-project-settings"
%section.settings.sharing-permissions.no-animate{ class: ('expanded' if expanded) } %section.settings.sharing-permissions.no-animate#js-shared-permissions{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4
Permissions Permissions
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
= render_if_exists 'projects/issues_settings' = render_if_exists 'projects/issues_settings'
%section.qa-merge-request-settings.settings.merge-requests-feature.no-animate{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] } %section.qa-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] }
.settings-header .settings-header
%h4 %h4
Merge request Merge request
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
= render 'export', project: @project = render 'export', project: @project
%section.qa-advanced-settings.settings.advanced-settings.no-animate{ class: ('expanded' if expanded) } %section.qa-advanced-settings.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4
Advanced Advanced
......
- expanded = Rails.env.test? - expanded = Rails.env.test?
%section.settings.no-animate{ class: ('expanded' if expanded) } %section.settings.no-animate#js-push-remote-settings{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4
Push to a remote repository Push to a remote repository
......
- expanded = Rails.env.test? - expanded = Rails.env.test?
%section.settings.no-animate{ class: ('expanded' if expanded) } %section.settings.no-animate#js-protected-tags-settings{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4
Protected Tags Protected Tags
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
.settings-content .settings-content
= render 'ci/variables/index', save_endpoint: project_variables_path(@project) = render 'ci/variables/index', save_endpoint: project_variables_path(@project)
%section.settings.no-animate{ class: ('expanded' if expanded) } %section.settings.no-animate#js-pipeline-triggers{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4
Pipeline triggers Pipeline triggers
......
---
title: Allows settings sections to expand by default when linking to them
merge_request: 20211
author:
type: other
- if @project.feature_available?(:issuable_default_templates) - if @project.feature_available?(:issuable_default_templates)
- expanded = Rails.env.test? - expanded = Rails.env.test?
%section.settings.issues-feature.no-animate{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:issues_access_level) == 0)] } %section.settings.issues-feature.no-animate#js-issue-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:issues_access_level) == 0)] }
.settings-header .settings-header
%h4 %h4
Issue settings Issue settings
......
- if EE::Gitlab::ServiceDesk.enabled?(project: @project) || (show_promotions? && show_callout?('promote_service_desk_dismissed')) - if EE::Gitlab::ServiceDesk.enabled?(project: @project) || (show_promotions? && show_callout?('promote_service_desk_dismissed'))
- expanded = Rails.env.test? - expanded = Rails.env.test?
%section.settings.js-service-desk-setting-wrapper.no-animate{ class: ('expanded' if expanded) } %section.settings.js-service-desk-setting-wrapper.no-animate#js-service-desk{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4
Service Desk Service Desk
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- import_data = @project.import_data || @project.build_import_data - import_data = @project.import_data || @project.build_import_data
- protocols = Gitlab::UrlSanitizer::ALLOWED_SCHEMES.join('|') - protocols = Gitlab::UrlSanitizer::ALLOWED_SCHEMES.join('|')
%section.settings.project-mirror-settings.no-animate{ class: ('expanded' if expanded) } %section.settings.project-mirror-settings.no-animate#js-pull-remote-repository{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4
Pull from a remote repository Pull from a remote repository
......
- return unless @project.feature_available?(:push_rules) - return unless @project.feature_available?(:push_rules)
- expanded = Rails.env.test? - expanded = Rails.env.test?
%section.settings.no-animate{ class: ('expanded' if expanded) } %section.settings.no-animate#js-push-rules{ class: ('expanded' if expanded) }
.settings-header .settings-header
%h4 %h4
Push Rules Push Rules
......
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