2019-02-19 23:18:06 -05:00
- breadcrumb_title _("General Settings")
- page_title _("General")
2022-02-04 04:14:46 -05:00
- add_page_specific_style 'page_bundles/projects_edit'
2017-06-09 07:06:35 -04:00
- @content_class = "limit-container-width" unless fluid_layout
2019-04-29 11:01:28 -04:00
- expanded = expanded_by_default?
2022-01-17 10:16:12 -05:00
- reduce_visibility_form_id = 'reduce-visibility-form'
2017-06-09 07:06:35 -04:00
2022-09-09 05:14:13 -04:00
= render_if_exists 'shared/ultimate_feature_removal_banner', project: @project
2019-03-14 16:52:01 -04:00
%section.settings.general-settings.no-animate.expanded#js-general-settings
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Naming, topics, avatar')
2022-06-10 17:09:35 -04:00
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
= _('Collapse')
2020-12-09 19:09:50 -05:00
%p= _('Update your project name, topics, description, and avatar.')
2019-03-14 16:52:01 -04:00
.settings-content= render 'projects/settings/general'
2019-09-13 09:26:31 -04:00
%section.settings.sharing-permissions.no-animate#js-shared-permissions{ class: ('expanded' if expanded), data: { qa_selector: 'visibility_features_permissions_content' } }
2019-03-14 16:52:01 -04:00
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Visibility, project features, permissions')
2022-06-10 17:09:35 -04:00
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
= expanded ? _('Collapse') : _('Expand')
2021-02-04 07:09:25 -05:00
%p= _('Choose visibility level, enable/disable project features and their permissions, disable email notifications, and show default award emoji.')
2019-03-14 16:52:01 -04:00
.settings-content
2022-01-17 10:16:12 -05:00
= form_for @project, html: { multipart: true, class: "sharing-permissions-form", id: reduce_visibility_form_id }, authenticity_token: true do |f|
2019-03-14 16:52:01 -04:00
%input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' }
2021-08-02 11:08:56 -04:00
%template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data(@project).to_json.html_safe
2022-01-17 10:16:12 -05:00
.js-project-permissions-form{ data: visibility_confirm_modal_data(@project, reduce_visibility_form_id) }
2019-03-14 16:52:01 -04:00
2022-09-28 08:07:50 -04:00
- if show_merge_request_settings_callout?(@project)
2022-09-06 08:10:02 -04:00
%section.settings.expanded
= render Pajamas::AlertComponent.new(variant: :info,
title: _('Merge requests and approvals settings have moved.'),
alert_options: { class: 'js-merge-request-settings-callout gl-my-5', data: { feature_id: Users::CalloutsHelper::MERGE_REQUEST_SETTINGS_MOVED_CALLOUT, dismiss_endpoint: callouts_path, defer_links: 'true' } }) do |c|
= c.body do
= _('On the left sidebar, select %{merge_requests_link} to view them.').html_safe % { merge_requests_link: link_to('Settings > Merge requests', project_settings_merge_requests_path(@project)).html_safe }
2019-03-14 16:52:01 -04:00
2022-01-27 01:11:50 -05:00
%section.settings.no-animate{ class: ('expanded' if expanded), data: { qa_selector: 'badges_settings_content' } }
2019-03-14 16:52:01 -04:00
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
= s_('ProjectSettings|Badges')
2022-06-10 17:09:35 -04:00
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
2021-02-15 01:09:22 -05:00
= expanded ? _('Collapse') : _('Expand')
2019-03-14 16:52:01 -04:00
%p
2020-12-21 22:10:23 -05:00
= s_('ProjectSettings|Customize this project\'s badges.')
= link_to s_('ProjectSettings|What are badges?'), help_page_path('user/project/badges')
2019-03-14 16:52:01 -04:00
.settings-content
= render 'shared/badges/badge_settings'
2021-07-22 08:10:04 -04:00
= render_if_exists 'compliance_management/compliance_framework/project_settings', expanded: expanded
2019-03-14 16:52:01 -04:00
= render_if_exists 'projects/settings/default_issue_template'
2020-07-15 17:09:26 -04:00
= render 'projects/service_desk_settings'
2019-03-14 16:52:01 -04:00
2021-02-17 22:09:22 -05:00
%section.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded), data: { qa_selector: 'advanced_settings_content' } }
2019-03-14 16:52:01 -04:00
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Advanced')
2022-06-10 17:09:35 -04:00
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
= expanded ? _('Collapse') : _('Expand')
2022-01-24 07:10:54 -05:00
%p= s_('ProjectSettings|Housekeeping, export, archive, change path, transfer, and delete.')
2019-03-14 16:52:01 -04:00
.settings-content
2022-03-15 02:07:56 -04:00
= render_if_exists 'projects/settings/restore', project: @project
2019-03-14 16:52:01 -04:00
.sub-section
%h4= _('Housekeeping')
2021-01-29 10:09:40 -05:00
%p
= _('Runs a number of housekeeping tasks within the current repository, such as compressing file revisions and removing unreachable objects.')
= link_to _('Learn more.'), help_page_path('administration/housekeeping'), target: '_blank', rel: 'noopener noreferrer'
2020-09-23 17:09:28 -04:00
= link_to _('Run housekeeping'), housekeeping_project_path(@project),
2021-02-15 01:09:22 -05:00
method: :post, class: "btn gl-button btn-default"
2019-03-14 16:52:01 -04:00
= render 'export', project: @project
2019-12-17 10:08:15 -05:00
= render_if_exists 'projects/settings/archive'
2019-03-14 16:52:01 -04:00
.sub-section.rename-repository
%h4.warning-title= _('Change path')
= render 'projects/errors'
2020-07-27 08:09:50 -04:00
= form_for @project do |f|
2019-03-14 16:52:01 -04:00
.form-group
2022-06-23 20:08:09 -04:00
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'rename-a-repository') }
2021-01-29 10:09:40 -05:00
%p= _("A project’ s repository name defines its URL (the one you use to access the project via a browser) and its place on the file disk where GitLab is installed. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
%ul
%li= _("Be careful. Renaming a project's repository can have unintended side effects.")
%li= _('You will need to update your local repositories to point to the new location.')
- if @project.deployment_platform.present?
%li= _('Your deployment services will be broken, you will need to manually fix the services after renaming.')
2019-03-14 16:52:01 -04:00
= f.label :path, _('Path'), class: 'label-bold'
.form-group
.input-group
.input-group-prepend
.input-group-text
#{Gitlab::Utils.append_path(root_url, @project.namespace.full_path)}/
2021-02-17 22:09:22 -05:00
= f.text_field :path, class: 'form-control h-auto', data: { qa_selector: 'project_path_field' }
2022-04-14 20:08:23 -04:00
= f.submit _('Change path'), class: "gl-button btn btn-danger", data: { qa_selector: 'change_path_button' }
2019-03-14 16:52:01 -04:00
2020-10-28 17:08:42 -04:00
= render 'transfer', project: @project
= render 'remove_fork', project: @project
2019-03-14 16:52:01 -04:00
2019-12-17 10:08:15 -05:00
= render 'remove', project: @project
2015-10-13 06:24:44 -04:00
2018-04-24 17:40:46 -04:00
.save-project-loader.hide
2014-06-21 03:41:44 -04:00
.center
2014-02-05 13:30:57 -05:00
%h2
2022-03-10 16:08:21 -05:00
= gl_loading_icon(inline: true, size: 'md', css_class: 'gl-vertical-align-middle')
2019-03-14 16:52:01 -04:00
= _('Saving project.')
%p= _('Please wait a moment, this page will automatically refresh when ready.')