Commit 61717d49 authored by Fatih Acet's avatar Fatih Acet

Merge branch 'pl-expanded-by-default' into 'master'

Prefer usage of helper `expanded_by_default?`

See merge request gitlab-org/gitlab-ee!11671
parents 45f4a58e 285ba6b0
......@@ -4,7 +4,7 @@
- page_title _('Kubernetes Cluster')
- manage_prometheus_path = edit_project_service_path(@cluster.project, 'prometheus') if @project
- expanded = Rails.env.test?
- expanded = expanded_by_default?
- status_path = clusterable.cluster_status_cluster_path(@cluster.id, format: :json) if can?(current_user, :admin_cluster, @cluster)
.edit-cluster-form.js-edit-cluster-form{ data: { status_path: status_path,
......
- breadcrumb_title "General Settings"
- @content_class = "limit-container-width" unless fluid_layout
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.settings.gs-general.no-animate#js-general-settings{ class: ('expanded') }
......
- breadcrumb_title "CI / CD Settings"
- page_title "CI / CD"
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.settings#ci-variables.no-animate{ class: ('expanded' if expanded) }
.settings-header
......
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.settings.no-animate#cleanup{ class: ('expanded' if expanded) }
.settings-header
......
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.settings.no-animate#default-branch-settings{ class: ('expanded' if expanded) }
.settings-header
......
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.qa-deploy-keys-settings.settings.no-animate#js-deploy-keys-settings{ class: ('expanded' if expanded) }
.settings-header
%h4
......
- breadcrumb_title _("General Settings")
- page_title _("General")
- @content_class = "limit-container-width" unless fluid_layout
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.settings.general-settings.no-animate.expanded#js-general-settings
.settings-header
......
- expanded = Rails.env.test?
- expanded = expanded_by_default?
- protocols = Gitlab::UrlSanitizer::ALLOWED_SCHEMES.join('|')
%section.settings.project-mirror-settings.js-mirror-settings.no-animate.qa-mirroring-repositories-settings#js-push-remote-settings{ class: ('expanded' if expanded) }
......
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.qa-protected-branches-settings.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded) }
.settings-header
......
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.settings.no-animate#js-protected-tags-settings{ class: ('expanded' if expanded) }
.settings-header
......
......@@ -2,7 +2,7 @@
- page_title _("CI / CD Settings")
- page_title _("CI / CD")
- expanded = Rails.env.test?
- expanded = expanded_by_default?
- general_expanded = @project.errors.empty? ? expanded : true
%section.settings#js-general-pipeline-settings.no-animate{ class: ('expanded' if general_expanded) }
......
- return unless ::Gitlab::CurrentSettings.custom_project_templates_enabled?
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.settings.no-animate.qa-custom-project-templates{ class: ('expanded' if expanded) }
.settings-header
......
- if EE::Gitlab::ServiceDesk.enabled?(project: @project) || (show_promotions? && show_callout?('promote_service_desk_dismissed'))
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.settings.js-service-desk-setting-wrapper.no-animate#js-service-desk{ class: ('expanded' if expanded) }
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Service Desk')
......
- return unless @project.feature_available?(:push_rules)
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.settings.no-animate#js-push-rules{ class: ('expanded' if expanded) }
.settings-header
%h4
......
- if @project.feature_available?(:issuable_default_templates)
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%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
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Default issue template')
......
- return unless @project.feature_available?(:license_management)
- expanded = Rails.env.test?
- expanded = expanded_by_default?
%section.settings.no-animate#js-license-management{ class: ('expanded' if expanded) }
.settings-header
......
- expanded = Rails.env.test?
- expanded = expanded_by_default?
- can_admin_project = can?(current_user, :admin_project, @project)
- if protected_environments_enabled?(@project)
......
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