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
|
2017-07-03 13:51:32 -04:00
|
|
|
- expanded = Rails.env.test?
|
2017-06-09 07:06:35 -04:00
|
|
|
|
2017-07-25 13:34:44 -04:00
|
|
|
.project-edit-container
|
2018-06-27 08:21:36 -04:00
|
|
|
%section.settings.general-settings.no-animate#js-general-project-settings{ class: ('expanded' if expanded) }
|
2017-07-25 13:34:44 -04:00
|
|
|
.settings-header
|
2019-02-19 23:18:06 -05:00
|
|
|
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Naming, tags, avatar')
|
|
|
|
%button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
|
|
|
|
%p= _('Update your project name, tags, description and avatar.')
|
|
|
|
|
2017-10-14 02:10:37 -04:00
|
|
|
.settings-content
|
2017-07-25 13:34:44 -04:00
|
|
|
.project-edit-errors
|
2017-07-28 10:26:25 -04:00
|
|
|
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit-project" }, authenticity_token: true do |f|
|
2018-08-08 06:57:34 -04:00
|
|
|
%input{ name: 'update_section', type: 'hidden', value: 'js-general-project-settings' }
|
2017-07-28 10:26:25 -04:00
|
|
|
%fieldset
|
|
|
|
.row
|
|
|
|
.form-group.col-md-9
|
2018-07-19 18:11:31 -04:00
|
|
|
= f.label :name, class: 'label-bold', for: 'project_name_edit' do
|
2017-07-28 10:26:25 -04:00
|
|
|
Project name
|
|
|
|
= f.text_field :name, class: "form-control", id: "project_name_edit"
|
2017-01-13 19:28:33 -05:00
|
|
|
|
2017-07-28 10:26:25 -04:00
|
|
|
.form-group.col-md-3
|
2018-07-19 18:11:31 -04:00
|
|
|
= f.label :id, class: 'label-bold' do
|
2017-07-28 10:26:25 -04:00
|
|
|
Project ID
|
|
|
|
= f.text_field :id, class: 'form-control', readonly: true
|
2016-03-15 06:34:49 -04:00
|
|
|
|
2016-05-16 11:42:29 -04:00
|
|
|
.form-group
|
2018-07-19 18:11:31 -04:00
|
|
|
= f.label :description, class: 'label-bold' do
|
2017-07-28 10:26:25 -04:00
|
|
|
Project description
|
|
|
|
%span.light (optional)
|
|
|
|
= f.text_area :description, class: "form-control", rows: 3, maxlength: 250
|
|
|
|
|
2018-05-31 04:44:32 -04:00
|
|
|
= render_if_exists 'projects/classification_policy_settings', f: f
|
|
|
|
|
|
|
|
= render_if_exists 'shared/repository_size_limit_setting', form: f, type: :project
|
|
|
|
|
2017-07-28 10:26:25 -04:00
|
|
|
.form-group
|
2019-01-10 15:08:41 -05:00
|
|
|
= f.label :tag_list, "Topics", class: 'label-bold'
|
2018-09-26 05:41:37 -04:00
|
|
|
= f.text_field :tag_list, value: @project.tag_list.join(', '), maxlength: 2000, class: "form-control"
|
2019-01-10 15:08:41 -05:00
|
|
|
%p.form-text.text-muted Separate topics with commas.
|
2017-07-28 10:26:25 -04:00
|
|
|
%fieldset.features
|
2017-12-22 13:23:14 -05:00
|
|
|
%h5.prepend-top-0= _("Project avatar")
|
2017-07-28 10:26:25 -04:00
|
|
|
.form-group
|
|
|
|
- if @project.avatar?
|
2019-02-25 08:00:05 -05:00
|
|
|
.avatar-container.rect-avatar.s160.append-bottom-15
|
2018-09-28 06:58:30 -04:00
|
|
|
= project_icon(@project, alt: '', class: 'avatar project-avatar s160', width: 160, height: 160)
|
2017-12-22 13:23:14 -05:00
|
|
|
- if @project.avatar_in_git
|
|
|
|
%p.light
|
|
|
|
= _("Project avatar in repository: %{link}").html_safe % { link: @project.avatar_in_git }
|
|
|
|
.prepend-top-5.append-bottom-10
|
|
|
|
%button.btn.js-choose-project-avatar-button{ type: 'button' }= _("Choose file...")
|
2018-11-19 10:03:58 -05:00
|
|
|
%span.file_name.prepend-left-default.js-filename= _("No file chosen")
|
2017-12-22 13:23:14 -05:00
|
|
|
= f.file_field :avatar, class: "js-project-avatar-input hidden"
|
2018-04-11 14:26:37 -04:00
|
|
|
.form-text.text-muted= _("The maximum file size allowed is 200KB.")
|
2017-07-28 10:26:25 -04:00
|
|
|
- if @project.avatar?
|
|
|
|
%hr
|
2017-12-22 13:23:14 -05:00
|
|
|
= link_to _('Remove avatar'), project_avatar_path(@project), data: { confirm: _("Avatar will be removed. Are you sure?") }, method: :delete, class: "btn btn-danger btn-inverted"
|
2018-09-18 05:58:22 -04:00
|
|
|
= f.submit 'Save changes', class: "btn btn-success js-btn-success-general-project-settings"
|
2015-11-03 15:28:07 -05:00
|
|
|
|
2018-06-27 08:21:36 -04:00
|
|
|
%section.settings.sharing-permissions.no-animate#js-shared-permissions{ class: ('expanded' if expanded) }
|
2017-07-14 11:40:15 -04:00
|
|
|
.settings-header
|
2019-02-19 23:18:06 -05:00
|
|
|
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Visibility, project features, permissions')
|
|
|
|
%button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
|
|
|
|
%p= _('Choose visibility level, enable/disable project features (issues, repository, wiki, snippets) and set permissions.')
|
|
|
|
|
2017-10-14 02:10:37 -04:00
|
|
|
.settings-content
|
2017-07-14 11:40:15 -04:00
|
|
|
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "sharing-permissions-form" }, authenticity_token: true do |f|
|
2018-08-08 06:57:34 -04:00
|
|
|
%input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' }
|
2018-02-28 17:59:50 -05:00
|
|
|
-# haml-lint:disable InlineJavaScript
|
2018-08-24 04:37:06 -04:00
|
|
|
%script.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data_json(@project)
|
2017-09-07 14:07:40 -04:00
|
|
|
.js-project-permissions-form
|
2018-09-18 05:58:22 -04:00
|
|
|
= f.submit 'Save changes', class: "btn btn-success"
|
2017-07-03 13:51:32 -04:00
|
|
|
|
2018-05-31 04:44:32 -04:00
|
|
|
= render_if_exists 'projects/issues_settings'
|
|
|
|
|
2018-06-27 08:21:36 -04:00
|
|
|
%section.qa-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)] }
|
2017-07-25 13:34:44 -04:00
|
|
|
.settings-header
|
2019-02-19 23:18:06 -05:00
|
|
|
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests')
|
|
|
|
%button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
|
|
|
|
%p= _('Choose your merge method, set up a default merge request description template.')
|
|
|
|
|
2017-10-14 02:10:37 -04:00
|
|
|
.settings-content
|
2018-05-31 04:44:32 -04:00
|
|
|
= render_if_exists 'shared/promotions/promote_mr_features'
|
|
|
|
|
2017-07-25 15:38:25 -04:00
|
|
|
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "merge-request-settings-form" }, authenticity_token: true do |f|
|
2018-08-08 06:57:34 -04:00
|
|
|
%input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' }
|
2018-05-31 04:44:32 -04:00
|
|
|
= render 'projects/merge_request_settings', form: f
|
2018-09-18 05:58:22 -04:00
|
|
|
= f.submit 'Save changes', class: "btn btn-success qa-save-merge-request-changes"
|
2016-06-14 06:47:07 -04:00
|
|
|
|
2018-11-16 16:34:36 -05:00
|
|
|
= render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded
|
|
|
|
|
2018-05-31 04:44:32 -04:00
|
|
|
|
2018-09-03 09:16:23 -04:00
|
|
|
%section.settings.no-animate{ class: ('expanded' if expanded) }
|
|
|
|
.settings-header
|
2019-02-19 23:18:06 -05:00
|
|
|
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
|
2018-09-03 09:16:23 -04:00
|
|
|
= s_('ProjectSettings|Badges')
|
|
|
|
%button.btn.js-settings-toggle{ type: 'button' }
|
|
|
|
= 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'
|
|
|
|
|
2019-02-19 23:18:06 -05:00
|
|
|
= render_if_exists 'projects/service_desk_settings'
|
2017-07-31 17:34:47 -04:00
|
|
|
= render 'export', project: @project
|
2017-07-03 13:51:32 -04:00
|
|
|
|
2018-06-27 08:21:36 -04:00
|
|
|
%section.qa-advanced-settings.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded) }
|
2017-07-25 13:34:44 -04:00
|
|
|
.settings-header
|
2019-02-19 23:18:06 -05:00
|
|
|
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Advanced')
|
|
|
|
%button.btn.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
|
|
|
|
%p= _('Housekeeping, export, path, transfer, remove, archive.')
|
|
|
|
|
2017-10-14 02:10:37 -04:00
|
|
|
.settings-content
|
2017-07-03 13:51:32 -04:00
|
|
|
.sub-section
|
2017-07-25 13:34:44 -04:00
|
|
|
%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),
|
2018-05-10 15:22:56 -04:00
|
|
|
method: :post, class: "btn btn-default"
|
2017-07-25 13:34:44 -04:00
|
|
|
- if can? current_user, :archive_project, @project
|
|
|
|
.sub-section
|
|
|
|
%h4.warning-title
|
|
|
|
- if @project.archived?
|
|
|
|
Unarchive project
|
|
|
|
- else
|
|
|
|
Archive project
|
|
|
|
- if @project.archived?
|
|
|
|
%p
|
2018-04-02 12:31:15 -04:00
|
|
|
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.
|
2017-07-25 13:34:44 -04:00
|
|
|
%strong Once active this project shows up in the search and on the dashboard.
|
|
|
|
= link_to 'Unarchive project', unarchive_project_path(@project),
|
2018-04-02 12:31:15 -04:00
|
|
|
data: { confirm: "Are you sure that you want to unarchive this project?" },
|
2017-07-25 13:34:44 -04:00
|
|
|
method: :post, class: "btn btn-success"
|
|
|
|
- else
|
|
|
|
%p
|
2018-04-02 12:31:15 -04:00
|
|
|
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.
|
2017-07-25 13:34:44 -04:00
|
|
|
= link_to 'Archive project', archive_project_path(@project),
|
2018-04-02 12:31:15 -04:00
|
|
|
data: { confirm: "Are you sure that you want to archive this project?" },
|
2017-07-25 13:34:44 -04:00
|
|
|
method: :post, class: "btn btn-warning"
|
2018-10-30 06:53:01 -04:00
|
|
|
.sub-section.rename-repository
|
2017-07-25 13:34:44 -04:00
|
|
|
%h4.warning-title
|
|
|
|
Rename repository
|
|
|
|
= render 'projects/errors'
|
|
|
|
= form_for([@project.namespace.becomes(Namespace), @project]) do |f|
|
|
|
|
.form-group.project_name_holder
|
2018-07-19 18:11:31 -04:00
|
|
|
= f.label :name, class: 'label-bold' do
|
2017-07-25 13:34:44 -04:00
|
|
|
Project name
|
|
|
|
.form-group
|
|
|
|
= f.text_field :name, class: "form-control"
|
2016-05-16 11:42:29 -04:00
|
|
|
.form-group
|
2018-07-19 18:11:31 -04:00
|
|
|
= f.label :path, class: 'label-bold' do
|
2017-07-25 13:34:44 -04:00
|
|
|
%span Path
|
2016-05-16 11:42:29 -04:00
|
|
|
.form-group
|
2017-07-25 13:34:44 -04:00
|
|
|
.input-group
|
2018-04-12 16:32:55 -04:00
|
|
|
.input-group-prepend
|
|
|
|
.input-group-text
|
2018-11-09 18:31:26 -05:00
|
|
|
#{Gitlab::Utils.append_path(root_url, @project.namespace.full_path)}/
|
2017-07-25 13:34:44 -04:00
|
|
|
= f.text_field :path, class: 'form-control'
|
2016-05-16 11:42:29 -04:00
|
|
|
%ul
|
2017-07-25 13:34:44 -04:00
|
|
|
%li Be careful. Renaming a project's repository can have unintended side effects.
|
2016-05-16 11:42:29 -04:00
|
|
|
%li You will need to update your local repositories to point to the new location.
|
2017-11-27 09:19:16 -05:00
|
|
|
- if @project.deployment_platform.present?
|
2017-07-25 13:34:44 -04:00
|
|
|
%li Your deployment services will be broken, you will need to manually fix the services after renaming.
|
|
|
|
= f.submit 'Rename project', class: "btn btn-warning"
|
|
|
|
- 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|
|
|
|
|
.form-group
|
2018-07-19 18:11:31 -04:00
|
|
|
= label_tag :new_namespace_id, nil, class: 'label-bold' do
|
2017-07-25 13:34:44 -04:00
|
|
|
%span Select a new namespace
|
|
|
|
.form-group
|
|
|
|
= select_tag :new_namespace_id, namespaces_options(nil), include_blank: true, class: 'select2'
|
|
|
|
%ul
|
|
|
|
%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.
|
2017-08-11 02:07:18 -04:00
|
|
|
%li Project visibility level will be changed to match namespace rules when transferring to a group.
|
2017-07-25 13:34:44 -04:00
|
|
|
= f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => transfer_project_message(@project) }
|
|
|
|
- if @project.forked? && can?(current_user, :remove_fork_project, @project)
|
|
|
|
.sub-section
|
|
|
|
%h4.danger-title
|
|
|
|
Remove fork relationship
|
2016-05-16 11:42:29 -04:00
|
|
|
%p
|
2017-07-25 13:34:44 -04:00
|
|
|
This will remove the fork relationship to source project
|
|
|
|
= succeed "." do
|
2017-11-03 06:08:36 -04:00
|
|
|
- if @project.fork_source
|
|
|
|
= link_to(fork_source_name(@project), project_path(@project.fork_source))
|
|
|
|
- else
|
|
|
|
= fork_source_name(@project)
|
2017-07-25 13:34:44 -04:00
|
|
|
= form_for([@project.namespace.becomes(Namespace), @project], url: remove_fork_project_path(@project), method: :delete, remote: true, html: { class: 'transfer-project' }) do |f|
|
|
|
|
%p
|
|
|
|
%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
|
2016-05-16 11:42:29 -04:00
|
|
|
%p
|
2017-07-25 13:34:44 -04:00
|
|
|
Removing the project will delete its repository and all related resources including issues, merge requests etc.
|
|
|
|
= form_tag(project_path(@project), method: :delete) do
|
|
|
|
%p
|
|
|
|
%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
|
2014-02-05 13:30:57 -05:00
|
|
|
Saving project.
|
2013-08-12 10:21:57 -04:00
|
|
|
%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
|