2019-02-19 23:18:06 -05:00
- breadcrumb_title _("General Settings")
- page_title _("General")
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?
2017-06-09 07:06:35 -04:00
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')
2021-02-15 01:09:22 -05:00
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }= _('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')
2021-02-15 01:09:22 -05:00
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }= 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
2021-03-03 16:11:13 -05:00
= form_for @project, html: { multipart: true, class: "sharing-permissions-form" }, 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
2019-03-14 16:52:01 -04:00
.js-project-permissions-form
2020-09-23 17:09:28 -04:00
- if show_visibility_confirm_modal?(@project)
= render "visibility_modal"
2021-10-21 11:12:54 -04:00
= f.submit _('Save changes'), class: "btn gl-button btn-confirm #{('js-legacy-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level }
2019-03-14 16:52:01 -04:00
2021-02-17 22:09:22 -05:00
%section.rspec-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)], data: { qa_selector: 'merge_request_settings_content' } }
2019-03-14 16:52:01 -04:00
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests')
2021-02-15 01:09:22 -05:00
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
2019-06-25 11:27:05 -04:00
= render_if_exists 'projects/merge_request_settings_description_text'
2019-03-14 16:52:01 -04:00
.settings-content
= render_if_exists 'shared/promotions/promote_mr_features'
2021-03-03 16:11:13 -05:00
= form_for @project, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f|
2019-03-14 16:52:01 -04:00
%input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' }
= render 'projects/merge_request_settings', form: f
2021-03-23 05:09:17 -04:00
= f.submit _('Save changes'), class: "btn gl-button btn-confirm rspec-save-merge-request-changes", data: { qa_selector: 'save_merge_request_changes_button' }
2019-03-14 16:52:01 -04:00
= render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded
%section.settings.no-animate{ class: ('expanded' if expanded) }
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
= s_('ProjectSettings|Badges')
2021-02-15 01:09:22 -05:00
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }
= 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')
2021-02-15 01:09:22 -05:00
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
2019-03-14 16:52:01 -04:00
%p= _('Housekeeping, export, path, transfer, remove, archive.')
.settings-content
.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
2021-01-29 10:09:40 -05:00
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'renaming-a-repository') }
%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' }
= f.submit _('Change path'), class: "gl-button btn btn-warning", 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
2021-04-29 17:10:03 -04:00
.gl-spinner.gl-spinner-md.align-text-bottom
2019-03-14 16:52:01 -04:00
= _('Saving project.')
%p= _('Please wait a moment, this page will automatically refresh when ready.')
2014-10-08 06:57:54 -04:00
2017-07-25 15:38:25 -04:00
= render 'shared/confirm_modal', phrase: @project.path