gitlab-org--gitlab-foss/app/views/projects/edit.html.haml

305 lines
14 KiB
Text
Raw Normal View History

- @content_class = "limit-container-width" unless fluid_layout
= render "projects/settings/head"
2016-05-16 11:42:29 -04:00
.project-edit-container
.row.prepend-top-default
.col-lg-4.profile-settings-sidebar
2016-05-16 11:42:29 -04:00
%h4.prepend-top-0
2015-01-29 10:13:38 -05:00
Project settings
.col-lg-8
.project-edit-errors
2016-05-16 11:42:29 -04:00
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit-project" }, authenticity_token: true do |f|
%fieldset
.row
.form-group.col-md-9
= f.label :name, class: 'label-light', for: 'project_name_edit' do
Project name
= f.text_field :name, class: "form-control", id: "project_name_edit"
.form-group.col-md-3
= f.label :id, class: 'label-light' do
Project ID
= f.text_field :id, class: 'form-control', readonly: true
2016-05-16 11:42:29 -04:00
.form-group
= f.label :description, class: 'label-light' do
Project description
%span.light (optional)
= f.text_area :description, class: "form-control", rows: 3, maxlength: 250
2016-05-16 11:42:29 -04:00
- unless @project.empty_repo?
.form-group
2016-05-16 11:42:29 -04:00
= f.label :default_branch, "Default Branch", class: 'label-light'
= f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'})
.form-group
= f.label :tag_list, "Tags", class: 'label-light'
= f.text_field :tag_list, value: @project.tag_list.sort.join(', '), maxlength: 2000, class: "form-control"
2016-05-16 11:42:29 -04:00
%p.help-block Separate tags with commas.
%hr
%fieldset
2016-05-16 11:42:29 -04:00
%h5.prepend-top-0
Sharing & Permissions
2016-11-22 09:51:49 -05:00
.form_group.prepend-top-20.sharing-and-permissions
.row.js-visibility-select
.col-md-8
.label-light
= label_tag :project_visibility, 'Project Visibility', class: 'label-light', for: :project_visibility_level
= link_to icon('question-circle'), help_page_path("public_access/public_access")
%span.help-block
.col-md-4.visibility-select-container
= render('projects/visibility_select', model_method: :visibility_level, form: f, selected_level: @project.visibility_level)
= f.fields_for :project_feature do |feature_fields|
%fieldset.features
2016-11-22 09:51:49 -05:00
.row
.col-md-8.project-feature
= feature_fields.label :repository_access_level, "Repository", class: 'label-light'
%span.help-block View and edit files in this project
.col-md-4.js-repo-access-level
= project_feature_access_select(:repository_access_level)
2016-11-22 09:51:49 -05:00
.row
.col-md-8.project-feature.nested
2016-11-22 09:51:49 -05:00
= feature_fields.label :merge_requests_access_level, "Merge requests", class: 'label-light'
%span.help-block Submit changes to be merged upstream
.col-md-4
2016-11-22 09:51:49 -05:00
= project_feature_access_select(:merge_requests_access_level)
2016-08-01 18:31:21 -04:00
2016-11-22 09:51:49 -05:00
.row
.col-md-8.project-feature.nested
= feature_fields.label :builds_access_level, "Pipelines", class: 'label-light'
2017-05-18 16:38:34 -04:00
%span.help-block Build, test, and deploy your changes
.col-md-4
2016-11-22 09:51:49 -05:00
= project_feature_access_select(:builds_access_level)
2016-08-01 18:31:21 -04:00
2016-11-22 09:51:49 -05:00
.row
.col-md-8.project-feature
2016-11-22 09:51:49 -05:00
= feature_fields.label :snippets_access_level, "Snippets", class: 'label-light'
%span.help-block Share code pastes with others out of Git repository
.col-md-4
2016-11-22 09:51:49 -05:00
= project_feature_access_select(:snippets_access_level)
2016-08-01 18:31:21 -04:00
2016-11-22 09:51:49 -05:00
.row
.col-md-8.project-feature
2016-11-22 09:51:49 -05:00
= feature_fields.label :issues_access_level, "Issues", class: 'label-light'
%span.help-block Lightweight issue tracking system for this project
.col-md-4
2016-11-22 09:51:49 -05:00
= project_feature_access_select(:issues_access_level)
2016-08-01 18:31:21 -04:00
2016-11-22 09:51:49 -05:00
.row
.col-md-8.project-feature
2016-11-22 09:51:49 -05:00
= feature_fields.label :wiki_access_level, "Wiki", class: 'label-light'
%span.help-block Pages for project documentation
.col-md-4
2016-11-22 09:51:49 -05:00
= project_feature_access_select(:wiki_access_level)
.form-group
= render 'shared/allow_request_access', form: f
- if Gitlab.config.lfs.enabled && current_user.admin?
.row.js-lfs-enabled
.col-md-8
= f.label :lfs_enabled, 'LFS', class: 'label-light'
%span.help-block
Git Large File Storage
= link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs')
.col-md-4
.select-wrapper
= f.select :lfs_enabled, [%w(Enabled true), %w(Disabled false)], {}, selected: @project.lfs_enabled?, class: 'pull-right form-control project-repo-select select-control', data: { field: 'lfs_enabled' }
= icon('chevron-down')
- if Gitlab.config.registry.enabled
2016-10-21 06:21:14 -04:00
.form-group.js-container-registry{ style: ("display: none;" if @project.project_feature.send(:repository_access_level) == 0) }
.checkbox
= f.label :container_registry_enabled do
= f.check_box :container_registry_enabled
%strong Container Registry
%br
%span.descr Enable Container Registry for this project
= link_to icon('question-circle'), help_page_path('user/project/container_registry'), target: '_blank'
2016-08-01 18:31:21 -04:00
= render 'merge_request_settings', form: f
%hr
2016-05-16 11:42:29 -04:00
%fieldset.features.append-bottom-default
%h5.prepend-top-0
Project avatar
.form-group
- if @project.avatar?
.avatar-container.s160
= project_icon(@project.full_path, alt: '', class: 'avatar project-avatar s160')
2016-05-16 11:42:29 -04:00
%p.light
- if @project.avatar_in_git
Project avatar in repository: #{ @project.avatar_in_git }
%a.choose-btn.btn.js-choose-project-avatar-button
Browse file...
%span.file_name.prepend-left-default.js-avatar-filename No file chosen
= f.file_field :avatar, class: "js-project-avatar-input hidden"
.help-block The maximum file size allowed is 200KB.
- if @project.avatar?
%hr
= link_to 'Remove avatar', project_avatar_path(@project), data: { confirm: "Project avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar"
2016-05-16 11:42:29 -04:00
= f.submit 'Save changes', class: "btn btn-save"
2016-05-16 11:42:29 -04:00
.row.prepend-top-default
%hr
.row.prepend-top-default
.col-lg-4
2016-05-16 11:42:29 -04:00
%h4.prepend-top-0
Housekeeping
%p.append-bottom-0
%p
Runs a number of housekeeping tasks within the current repository,
such as compressing file revisions and removing unreachable objects.
.col-lg-8
= link_to 'Housekeeping', housekeeping_project_path(@project),
method: :post, class: "btn btn-default"
2016-05-16 11:42:29 -04:00
%hr
.row.prepend-top-default
.col-lg-4
%h4.prepend-top-0
Export project
%p.append-bottom-0
%p
Export this project with all its related data in order to move your project to a new GitLab instance. Once the export is finished, you can import the file from the "New Project" page.
%p
Once the exported file is ready, you will receive a notification email with a download link.
.col-lg-8
- if @project.export_project_path
= link_to 'Download export', download_export_project_path(@project),
rel: 'nofollow', download: '', method: :get, class: "btn btn-default"
= link_to 'Generate new export', generate_new_export_project_path(@project),
method: :post, class: "btn btn-default"
- else
= link_to 'Export project', export_project_path(@project),
method: :post, class: "btn btn-default"
2016-06-14 08:28:30 -04:00
.bs-callout.bs-callout-info
%p.append-bottom-0
%p
The following items will be exported:
%ul
%li Project and wiki repositories
2016-06-14 08:28:30 -04:00
%li Project uploads
%li Project configuration including web hooks and services
%li Issues with comments, merge requests with diffs and comments, labels, milestones, snippets, and other project entities
%p
The following items will NOT be exported:
%ul
%li Job traces and artifacts
%li LFS objects
%li Container registry images
%li CI variables
%li Any encrypted tokens
2016-05-16 11:42:29 -04:00
- if can? current_user, :archive_project, @project
%hr
2016-05-16 11:42:29 -04:00
.row.prepend-top-default
.col-lg-4
2016-05-16 11:42:29 -04:00
%h4.warning-title.prepend-top-0
- if @project.archived?
Unarchive project
- else
Archive project
%p.append-bottom-0
- if @project.archived?
Unarchiving the project will mark its repository as active. The project can be committed to.
- else
Archiving the project will mark its repository as read-only. It is hidden from the dashboard and doesn't show up in searches.
.col-lg-8
2016-05-16 11:42:29 -04:00
- if @project.archived?
%p
%strong Once active this project shows up in the search and on the dashboard.
= link_to 'Unarchive project', unarchive_project_path(@project),
2016-05-16 11:42:29 -04:00
data: { confirm: "Are you sure that you want to unarchive this project?\nWhen this project is unarchived it is active and can be committed to again." },
method: :post, class: "btn btn-success"
2015-10-18 06:37:50 -04:00
- else
2016-05-16 11:42:29 -04:00
%p
%strong Archived projects cannot be committed to!
= link_to 'Archive project', archive_project_path(@project),
2016-05-16 11:42:29 -04:00
data: { confirm: "Are you sure that you want to archive this project?\nAn archived project cannot be committed to." },
method: :post, class: "btn btn-warning"
%hr
.row.prepend-top-default
.col-lg-4
2016-05-16 11:42:29 -04:00
%h4.prepend-top-0.warning-title
Rename repository
.col-lg-8
= render 'projects/errors'
2016-05-16 11:42:29 -04:00
= form_for([@project.namespace.becomes(Namespace), @project]) do |f|
.form-group.project_name_holder
= f.label :name, class: 'label-light' do
Project name
.form-group
= f.text_field :name, class: "form-control"
.form-group
= f.label :path, class: 'label-light' do
%span Path
.form-group
.input-group
.input-group-addon
#{URI.join(root_url, @project.namespace.full_path)}/
2016-05-16 11:42:29 -04:00
= f.text_field :path, class: 'form-control'
%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.
2017-04-04 03:40:00 -04:00
- if @project.deployment_services.any?
%li Your deployment services will be broken, you will need to manually fix the services after renaming.
2016-05-16 11:42:29 -04:00
= f.submit 'Rename project', class: "btn btn-warning"
- if can?(current_user, :change_namespace, @project)
%hr
.row.prepend-top-default
.col-lg-4
2016-05-16 11:42:29 -04:00
%h4.prepend-top-0.danger-title
Transfer project to new group
%p.append-bottom-0
Please select the group you want to transfer this project to in the dropdown to the right.
.col-lg-8
= 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
= label_tag :new_namespace_id, nil, class: 'label-light' do
%span Select a new namespace
2016-05-16 11:42:29 -04:00
.form-group
= select_tag :new_namespace_id, namespaces_options(nil), include_blank: true, class: 'select2'
2016-05-16 11:42:29 -04:00
%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.
%li Project visibility level will be changed to match namespace rules when transfering to a group.
= 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)
%hr
.row.prepend-top-default.append-bottom-default
.col-lg-4
2016-05-16 11:42:29 -04:00
%h4.prepend-top-0.danger-title
Remove fork relationship
%p.append-bottom-0
%p
This will remove the fork relationship to source project
= succeed "." do
= link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
.col-lg-8
= 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
%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)
%hr
.row.prepend-top-default.append-bottom-default
.col-lg-4
2016-05-16 11:42:29 -04:00
%h4.prepend-top-0.danger-title
Remove project
%p.append-bottom-0
Removing the project will delete its repository and all related resources including issues, merge requests etc.
.col-lg-8
= form_tag(project_path(@project), method: :delete) do
2016-05-16 11:42:29 -04:00
%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) }
.save-project-loader.hide
.center
%h2
2014-10-01 18:21:29 -04:00
%i.fa.fa-spinner.fa-spin
Saving project.
2013-08-12 10:21:57 -04:00
%p Please wait a moment, this page will automatically refresh when ready.
2016-10-21 06:21:14 -04:00
= render 'shared/confirm_modal', phrase: @project.path