diff options
Diffstat (limited to 'app/views')
13 files changed, 25 insertions, 14 deletions
diff --git a/app/views/admin/application_settings/appearances/show.html.haml b/app/views/admin/application_settings/appearances/show.html.haml index 1e55190d53b..cd255d961f4 100644 --- a/app/views/admin/application_settings/appearances/show.html.haml +++ b/app/views/admin/application_settings/appearances/show.html.haml @@ -1,5 +1,4 @@ - page_title _("Appearance") -- @content_class = "limit-container-width" unless fluid_layout - add_page_specific_style 'page_bundles/settings' = render 'form' diff --git a/app/views/admin/application_settings/ci_cd.html.haml b/app/views/admin/application_settings/ci_cd.html.haml index bd0ce766f81..a7119af7ece 100644 --- a/app/views/admin/application_settings/ci_cd.html.haml +++ b/app/views/admin/application_settings/ci_cd.html.haml @@ -1,7 +1,6 @@ - breadcrumb_title _("CI/CD") - page_title _("CI/CD") - add_page_specific_style 'page_bundles/settings' -- @content_class = "limit-container-width" unless fluid_layout %section.settings.no-animate#js-ci-cd-variables{ class: ('expanded' if expanded_by_default?) } .settings-header diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index a4af1913d22..a7c80abdbc9 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -1,7 +1,6 @@ - breadcrumb_title _("General") - page_title _("General") - add_page_specific_style 'page_bundles/settings' -- @content_class = "limit-container-width" unless fluid_layout %section.settings.as-visibility-access.no-animate#js-visibility-settings{ class: ('expanded' if expanded_by_default?), data: { testid: 'admin-visibility-access-settings' } } .settings-header diff --git a/app/views/admin/application_settings/integrations.html.haml b/app/views/admin/application_settings/integrations.html.haml index fd1ad5cd304..396e6f3e7d6 100644 --- a/app/views/admin/application_settings/integrations.html.haml +++ b/app/views/admin/application_settings/integrations.html.haml @@ -1,7 +1,6 @@ - breadcrumb_title s_('Integrations|Instance-level integration management') - page_title s_('Integrations|Instance-level integration management') - add_page_specific_style 'page_bundles/settings' -- @content_class = 'limit-container-width' unless fluid_layout %h3= s_('Integrations|Instance-level integration management') diff --git a/app/views/admin/application_settings/metrics_and_profiling.html.haml b/app/views/admin/application_settings/metrics_and_profiling.html.haml index b5981578866..711b2c97d65 100644 --- a/app/views/admin/application_settings/metrics_and_profiling.html.haml +++ b/app/views/admin/application_settings/metrics_and_profiling.html.haml @@ -3,7 +3,6 @@ - breadcrumb_title _("Metrics and profiling") - page_title _("Metrics and profiling") - add_page_specific_style 'page_bundles/settings' -- @content_class = "limit-container-width" unless fluid_layout %section.settings.as-prometheus.no-animate#js-prometheus-settings{ class: ('expanded' if expanded_by_default?) } .settings-header diff --git a/app/views/admin/application_settings/network.html.haml b/app/views/admin/application_settings/network.html.haml index b20fc703f18..32b10fd36e8 100644 --- a/app/views/admin/application_settings/network.html.haml +++ b/app/views/admin/application_settings/network.html.haml @@ -1,7 +1,6 @@ - breadcrumb_title _("Network") - page_title _("Network") - add_page_specific_style 'page_bundles/settings' -- @content_class = "limit-container-width" unless fluid_layout %section.settings.as-performance.no-animate#js-performance-settings{ class: ('expanded' if expanded_by_default?) } .settings-header diff --git a/app/views/admin/application_settings/preferences.html.haml b/app/views/admin/application_settings/preferences.html.haml index dd6666542ca..3843fc8e863 100644 --- a/app/views/admin/application_settings/preferences.html.haml +++ b/app/views/admin/application_settings/preferences.html.haml @@ -1,7 +1,6 @@ - breadcrumb_title _("Preferences") - page_title _("Preferences") - add_page_specific_style 'page_bundles/settings' -- @content_class = "limit-container-width" unless fluid_layout %section.settings.as-email.no-animate#js-email-settings{ class: ('expanded' if expanded_by_default?), data: { qa_selector: 'email_content' } } .settings-header diff --git a/app/views/admin/application_settings/reporting.html.haml b/app/views/admin/application_settings/reporting.html.haml index 3d803e95cd0..0046275c7d1 100644 --- a/app/views/admin/application_settings/reporting.html.haml +++ b/app/views/admin/application_settings/reporting.html.haml @@ -1,7 +1,6 @@ - breadcrumb_title _("Reporting") - page_title _("Reporting") - add_page_specific_style 'page_bundles/settings' -- @content_class = "limit-container-width" unless fluid_layout %section.settings.as-spam.no-animate#js-spam-settings{ class: ('expanded' if expanded_by_default?) } .settings-header diff --git a/app/views/admin/application_settings/repository.html.haml b/app/views/admin/application_settings/repository.html.haml index 50798ad476c..518b40a0326 100644 --- a/app/views/admin/application_settings/repository.html.haml +++ b/app/views/admin/application_settings/repository.html.haml @@ -1,7 +1,6 @@ - breadcrumb_title _("Repository") - page_title _("Repository") - add_page_specific_style 'page_bundles/settings' -- @content_class = "limit-container-width" unless fluid_layout %section.settings.as-default-branch-name.no-animate#js-default-branch-name{ class: ('expanded' if expanded_by_default?) } .settings-header diff --git a/app/views/admin/application_settings/service_usage_data.html.haml b/app/views/admin/application_settings/service_usage_data.html.haml index d6860cc08ac..af646d79c29 100644 --- a/app/views/admin/application_settings/service_usage_data.html.haml +++ b/app/views/admin/application_settings/service_usage_data.html.haml @@ -3,7 +3,6 @@ - breadcrumb_title name - page_title name - add_page_specific_style 'page_bundles/settings' -- @content_class = "limit-container-width" unless fluid_layout - payload_class = 'js-service-ping-payload' %section.js-search-settings-section diff --git a/app/views/admin/health_check/show.html.haml b/app/views/admin/health_check/show.html.haml index 98427cb6419..e7aa4f38634 100644 --- a/app/views/admin/health_check/show.html.haml +++ b/app/views/admin/health_check/show.html.haml @@ -8,9 +8,8 @@ #{ s_('HealthCheck|Access token is') } %code#health-check-token= Gitlab::CurrentSettings.health_check_access_token .gl-mt-3 - = button_to _("Reset health check access token"), reset_health_check_token_admin_application_settings_path, - method: :put, class: 'gl-button btn btn-default', - data: { confirm: _('Are you sure you want to reset the health check token?') } + = render Pajamas::ButtonComponent.new(href: reset_health_check_token_admin_application_settings_path, method: :put, button_options: { data: { confirm: _('Are you sure you want to reset the health check token?') } }) do + = _("Reset health check access token") %p.light #{ _('Health information can be retrieved from the following endpoints. More information is available') } = link_to s_('More information is available|here'), help_page_path('user/admin_area/monitoring/health_check') diff --git a/app/views/projects/branches/_branch_rules_info.haml b/app/views/projects/branches/_branch_rules_info.haml new file mode 100644 index 00000000000..15bee31c596 --- /dev/null +++ b/app/views/projects/branches/_branch_rules_info.haml @@ -0,0 +1,12 @@ +- return unless show_branch_rules_info? += render Pajamas::AlertComponent.new(variant: :info, + title: s_("Branches|See all branch-related settings together with branch rules"), + alert_options: { class: 'js-branch-rules-info-callout gl-mb-6 gl-mt-4', data: { feature_id: Users::CalloutsHelper::BRANCH_RULES_INFO_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' } }) do |c| + = c.body do + = s_("Branches|You can now find an overview of settings for protected branches, merge request approvals, status checks, and security approvals conveniently in one spot.") + + = c.actions do + = render Pajamas::ButtonComponent.new(variant: :confirm, href: project_settings_repository_path(@project, anchor: 'js-branch-rules'), button_options: { class: 'deferred-link gl-alert-action' }) do + = s_("Branches|View branch rules") + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-close'}) do + = _('Dismiss') diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml index f43d19e2542..518292effd8 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -1,6 +1,8 @@ - add_page_specific_style 'page_bundles/branches' - page_title _('Branches') - add_to_breadcrumbs(_('Repository'), project_tree_path(@project)) +- is_branch_rules_available = (can? current_user, :maintainer_access, @project) && Feature.enabled?(:branch_rules, @project) +- can_push_code = (can? current_user, :push_code, @project) -# Possible values for variables passed down from the projects/branches_controller.rb -# @@ -22,16 +24,24 @@ sorted_by: @sort } } - - if can? current_user, :push_code, @project + - if can_push_code .js-delete-merged-branches{ data: { default_branch: @project.repository.root_ref, form_path: project_merged_branches_path(@project) } } + - if is_branch_rules_available + = link_to project_settings_repository_path(@project, anchor: 'js-branch-rules'), class: 'gl-button btn btn-default' do + = s_('Branches|View branch rules') + + - if can_push_code = link_to new_project_branch_path(@project), class: 'gl-button btn btn-confirm' do = s_('Branches|New branch') = render_if_exists 'projects/commits/mirror_status' +- if is_branch_rules_available + = render 'branch_rules_info' + .js-branch-list{ data: { diverging_counts_endpoint: diverging_commit_counts_namespace_project_branches_path(@project.namespace, @project, format: :json), default_branch: @project.default_branch } } - if @gitaly_unavailable |