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')
2019-03-22 07:36:39 -04:00
%button.btn.btn-default.js-settings-toggle{ type: 'button' }= _('Collapse')
2019-03-14 16:52:01 -04:00
%p= _('Update your project name, topics, description and avatar.')
.settings-content= render 'projects/settings/general'
%section.settings.sharing-permissions.no-animate#js-shared-permissions{ class: ('expanded' if expanded) }
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Visibility, project features, permissions')
2019-03-22 07:36:39 -04:00
%button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
2019-03-14 16:52:01 -04:00
%p= _('Choose visibility level, enable/disable project features (issues, repository, wiki, snippets) and set permissions.')
.settings-content
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "sharing-permissions-form" }, authenticity_token: true do |f|
%input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' }
%template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data_json(@project)
.js-project-permissions-form
= f.submit _('Save changes'), class: "btn btn-success"
2019-07-26 17:59:27 -04:00
%section.qa-merge-request-settings.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)] }
2019-03-14 16:52:01 -04:00
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests')
2019-03-22 07:36:39 -04:00
%button.btn.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'
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f|
%input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' }
= render 'projects/merge_request_settings', form: f
2019-07-26 17:51:59 -04:00
= f.submit _('Save changes'), class: "btn btn-success qa-save-merge-request-changes rspec-save-merge-request-changes"
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')
2019-03-22 07:36:39 -04:00
%button.btn.btn-default.js-settings-toggle{ type: 'button' }
2019-03-14 16:52:01 -04:00
= expanded ? _('Collapse') : _('Expand')
%p
= s_('ProjectSettings|Customize your project badges.')
= link_to s_('ProjectSettings|Learn more about badges.'), help_page_path('user/project/badges')
.settings-content
= render 'shared/badges/badge_settings'
= render_if_exists 'projects/settings/default_issue_template'
= render_if_exists 'projects/service_desk_settings'
%section.qa-advanced-settings.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded) }
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Advanced')
2019-03-22 07:36:39 -04:00
%button.btn.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')
%p= _('Runs a number of housekeeping tasks within the current repository, such as compressing file revisions and removing unreachable objects.')
= link_to _('Run housekeeping'), housekeeping_project_path(@project),
method: :post, class: "btn btn-default"
= render 'export', project: @project
- if can? current_user, :archive_project, @project
2017-07-03 13:51:32 -04:00
.sub-section
2019-03-14 16:52:01 -04:00
%h4.warning-title
2017-07-25 13:34:44 -04:00
- if @project.archived?
2019-03-14 16:52:01 -04:00
= _('Unarchive project')
2017-07-25 13:34:44 -04:00
- else
2019-03-14 16:52:01 -04:00
= _('Archive project')
- if @project.archived?
%p= _("Unarchiving the project will restore people's ability to make changes to it. The repository can be committed to, and issues, comments and other entities can be created. <strong>Once active this project shows up in the search and on the dashboard.</strong>").html_safe
= link_to _('Unarchive project'), unarchive_project_path(@project),
data: { confirm: _("Are you sure that you want to unarchive this project?") },
method: :post, class: "btn btn-success"
- else
%p= _("Archiving the project will make it entirely read-only. It is hidden from the dashboard and doesn't show up in searches. <strong>The repository cannot be committed to, and no issues, comments or other entities can be created.</strong>").html_safe
= link_to _('Archive project'), archive_project_path(@project),
data: { confirm: _("Are you sure that you want to archive this project?") },
method: :post, class: "btn btn-warning"
.sub-section.rename-repository
%h4.warning-title= _('Change path')
= render 'projects/errors'
= form_for([@project.namespace.becomes(Namespace), @project]) do |f|
.form-group
= 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)}/
= f.text_field :path, class: 'form-control qa-project-path-field h-auto'
%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-22 07:36:39 -04:00
= f.submit _('Change path'), class: "btn btn-warning qa-change-path-button"
2019-03-14 16:52:01 -04:00
- if can?(current_user, :change_namespace, @project)
.sub-section
%h4.danger-title= _('Transfer project')
= form_for([@project.namespace.becomes(Namespace), @project], url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'js-project-transfer-form' } ) do |f|
2016-05-16 11:42:29 -04:00
.form-group
2019-03-14 16:52:01 -04:00
= label_tag :new_namespace_id, nil, class: 'label-bold' do
%span= _('Select a new namespace')
2016-05-16 11:42:29 -04:00
.form-group
2019-03-14 16:52:01 -04:00
= select_tag :new_namespace_id, namespaces_options(nil), include_blank: true, class: 'select2'
2016-05-16 11:42:29 -04:00
%ul
2019-03-14 16:52:01 -04:00
%li= _("Be careful. Changing the project's namespace can have unintended side effects.")
%li= _('You can only transfer the project to namespaces you manage.')
%li= _('You will need to update your local repositories to point to the new location.')
%li= _('Project visibility level will be changed to match namespace rules when transferring to a group.')
2019-07-02 04:05:31 -04:00
= f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) }
2019-03-14 16:52:01 -04:00
- if @project.forked? && can?(current_user, :remove_fork_project, @project)
.sub-section
%h4.danger-title= _('Remove fork relationship')
%p
= _('This will remove the fork relationship to source project')
= succeed "." do
- if @project.fork_source
= link_to(fork_source_name(@project), project_path(@project.fork_source))
- else
= fork_source_name(@project)
= form_for([@project.namespace.becomes(Namespace), @project], url: remove_fork_project_path(@project), method: :delete, remote: true, html: { class: 'transfer-project' }) do |f|
2016-05-16 11:42:29 -04:00
%p
2019-03-14 16:52:01 -04:00
%strong= _('Once removed, the fork relationship cannot be restored and you will no longer be able to send merge requests to the source.')
= button_to _('Remove fork relationship'), '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_message(@project) }
- if can?(current_user, :remove_project, @project)
.sub-section
%h4.danger-title= _('Remove project')
%p= _('Removing the project will delete its repository and all related resources including issues, merge requests etc.')
= form_tag(project_path(@project), method: :delete) do
2016-05-16 11:42:29 -04:00
%p
2019-03-14 16:52:01 -04:00
%strong= _('Removed projects cannot be restored!')
= button_to _('Remove project'), '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_project_message(@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
2014-10-01 18:21:29 -04:00
%i.fa.fa-spinner.fa-spin
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