debian-mirror-gitlab/app/views/projects/edit.html.haml

137 lines
7.8 KiB
Text
Raw Normal View History

2019-07-07 11:18:12 +05:30
- breadcrumb_title _("General Settings")
- page_title _("General")
2017-09-10 17:25:29 +05:30
- @content_class = "limit-container-width" unless fluid_layout
2019-07-31 22:56:46 +05:30
- expanded = expanded_by_default?
%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')
%button.btn.btn-default.js-settings-toggle{ type: 'button' }= _('Collapse')
%p= _('Update your project name, topics, description and avatar.')
.settings-content= render 'projects/settings/general'
2019-12-04 20:38:33 +05:30
%section.settings.sharing-permissions.no-animate#js-shared-permissions{ class: ('expanded' if expanded), data: { qa_selector: 'visibility_features_permissions_content' } }
2019-07-31 22:56:46 +05:30
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Visibility, project features, permissions')
%button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
%p= _('Choose visibility level, enable/disable project features (issues, repository, wiki, snippets) and set permissions.')
.settings-content
2020-10-24 23:57:45 +05:30
= form_for @project, remote: true, html: { multipart: true, class: "sharing-permissions-form" }, authenticity_token: true do |f|
2019-07-31 22:56:46 +05:30
%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
2020-10-24 23:57:45 +05:30
.gl-display-flex.gl-justify-content-end
- if show_visibility_confirm_modal?(@project)
= render "visibility_modal"
= f.submit _('Save changes'), class: "btn btn-success #{('js-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-07-31 22:56:46 +05:30
2019-10-12 21:52:04 +05:30
%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-07-31 22:56:46 +05:30
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests')
%button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
2019-09-30 21:07:59 +05:30
= render_if_exists 'projects/merge_request_settings_description_text'
2019-07-31 22:56:46 +05:30
.settings-content
= render_if_exists 'shared/promotions/promote_mr_features'
2020-10-24 23:57:45 +05:30
= form_for @project, remote: true, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f|
2019-07-31 22:56:46 +05:30
%input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' }
= render 'projects/merge_request_settings', form: f
2020-10-24 23:57:45 +05:30
.gl-display-flex.gl-justify-content-end
2020-11-24 15:15:51 +05:30
= f.submit _('Save changes'), class: "btn btn-success qa-save-merge-request-changes rspec-save-merge-request-changes"
2019-07-31 22:56:46 +05:30
= 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')
%button.btn.btn-default.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'
= render_if_exists 'projects/settings/default_issue_template'
2020-07-28 23:09:34 +05:30
= render 'projects/service_desk_settings'
2019-07-31 22:56:46 +05:30
%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')
%button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand')
%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.')
2020-10-24 23:57:45 +05:30
.gl-display-flex.gl-justify-content-end
= link_to _('Run housekeeping'), housekeeping_project_path(@project),
method: :post, class: "btn btn-default"
2019-07-31 22:56:46 +05:30
= render 'export', project: @project
2020-01-01 13:55:28 +05:30
= render_if_exists 'projects/settings/archive'
2019-07-31 22:56:46 +05:30
.sub-section.rename-repository
%h4.warning-title= _('Change path')
= render 'projects/errors'
2020-10-24 23:57:45 +05:30
= form_for @project do |f|
2019-07-31 22:56:46 +05:30
.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.')
2020-10-24 23:57:45 +05:30
.gl-display-flex.gl-justify-content-end
= f.submit _('Change path'), class: "btn btn-warning qa-change-path-button"
2019-07-31 22:56:46 +05:30
- if can?(current_user, :change_namespace, @project)
.sub-section
%h4.danger-title= _('Transfer project')
2020-10-24 23:57:45 +05:30
= form_for @project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'js-project-transfer-form' } do |f|
.form-group
2019-07-31 22:56:46 +05:30
= label_tag :new_namespace_id, nil, class: 'label-bold' do
%span= _('Select a new namespace')
.form-group
2019-07-31 22:56:46 +05:30
= select_tag :new_namespace_id, namespaces_options(nil), include_blank: true, class: 'select2'
%ul
2019-07-31 22:56:46 +05:30
%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.')
2020-10-24 23:57:45 +05:30
.gl-display-flex.gl-justify-content-end
= f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) }
2019-07-31 22:56:46 +05:30
- if @project.forked? && can?(current_user, :remove_fork_project, @project)
.sub-section
%h4.danger-title= _('Remove fork relationship')
2019-12-04 20:38:33 +05:30
%p= remove_fork_project_description_message(@project)
2020-10-24 23:57:45 +05:30
= form_for @project, url: remove_fork_project_path(@project), method: :delete, remote: true, html: { class: 'transfer-project' } do |f|
%p
2019-07-31 22:56:46 +05:30
%strong= _('Once removed, the fork relationship cannot be restored and you will no longer be able to send merge requests to the source.')
2019-12-04 20:38:33 +05:30
= button_to _('Remove fork relationship'), '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_warning_message(@project) }
2019-07-31 22:56:46 +05:30
2020-01-01 13:55:28 +05:30
= render 'remove', project: @project
2014-09-02 18:07:02 +05:30
.save-project-loader.hide
.center
%h2
2020-04-08 14:13:33 +05:30
.spinner.spinner-md.align-text-bottom
2019-07-31 22:56:46 +05:30
= _('Saving project.')
%p= _('Please wait a moment, this page will automatically refresh when ready.')
2015-04-26 12:48:37 +05:30
= render 'shared/confirm_modal', phrase: @project.path