Commit 7ea89083 authored by tauriedavis's avatar tauriedavis Committed by Phil Hughes

fix merge conflicts

parent c8fbba43
...@@ -4,62 +4,63 @@ ...@@ -4,62 +4,63 @@
= render "projects/settings/head" = render "projects/settings/head"
%section.settings.general-settings .project-edit-container
.settings-header %section.settings.general-settings
%h4 .settings-header
General project settings %h4
%button.btn.js-settings-toggle General project settings
= expanded ? 'Collapse' : 'Expand' %button.btn.js-settings-toggle
%p = expanded ? 'Collapse' : 'Expand'
Update your project name, description, avatar, and other general settings. %p
.settings-content.no-animate{ class: ('expanded' if expanded) } Update your project name, description, avatar, and other general settings.
.project-edit-errors .settings-content.no-animate{ class: ('expanded' if expanded) }
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit-project" }, authenticity_token: true do |f| .project-edit-errors
%fieldset = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit-project" }, authenticity_token: true do |f|
.row %fieldset
.form-group.col-md-9 .row
= f.label :name, class: 'label-light', for: 'project_name_edit' do .form-group.col-md-9
Project name = f.label :name, class: 'label-light', for: 'project_name_edit' do
= f.text_field :name, class: "form-control", id: "project_name_edit" 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
.form-group .form-group.col-md-3
= f.label :description, class: 'label-light' do = f.label :id, class: 'label-light' do
Project description Project ID
%span.light (optional) = f.text_field :id, class: 'form-control', readonly: true
= f.text_area :description, class: "form-control", rows: 3, maxlength: 250
- unless @project.empty_repo?
.form-group .form-group
= f.label :default_branch, "Default Branch", class: 'label-light' = f.label :description, class: 'label-light' do
= f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'}) Project description
.form-group %span.light (optional)
= f.label :tag_list, "Tags", class: 'label-light' = f.text_area :description, class: "form-control", rows: 3, maxlength: 250
= f.text_field :tag_list, value: @project.tag_list.sort.join(', '), maxlength: 2000, class: "form-control"
%p.help-block Separate tags with commas. - unless @project.empty_repo?
%fieldset.features .form-group
%h5.prepend-top-0 = f.label :default_branch, "Default Branch", class: 'label-light'
Project avatar = f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'})
.form-group .form-group
- if @project.avatar? = f.label :tag_list, "Tags", class: 'label-light'
.avatar-container.s160 = f.text_field :tag_list, value: @project.tag_list.sort.join(', '), maxlength: 2000, class: "form-control"
= project_icon(@project.full_path, alt: '', class: 'avatar project-avatar s160') %p.help-block Separate tags with commas.
%p.light %fieldset.features
- if @project.avatar_in_git %h5.prepend-top-0
Project avatar in repository: #{ @project.avatar_in_git } Project avatar
%a.choose-btn.btn.js-choose-project-avatar-button .form-group
Browse file... - if @project.avatar?
%span.file_name.prepend-left-default.js-avatar-filename No file chosen .avatar-container.s160
= f.file_field :avatar, class: "js-project-avatar-input hidden" = project_icon(@project.full_path, alt: '', class: 'avatar project-avatar s160')
.help-block The maximum file size allowed is 200KB. %p.light
- if @project.avatar? - if @project.avatar_in_git
%hr Project avatar in repository: #{ @project.avatar_in_git }
= 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" %a.choose-btn.btn.js-choose-project-avatar-button
= f.submit 'Save changes', class: "btn btn-save" 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"
= f.submit 'Save changes', class: "btn btn-save"
%section.settings.sharing-permissions %section.settings.sharing-permissions
.settings-header .settings-header
...@@ -71,7 +72,7 @@ ...@@ -71,7 +72,7 @@
Enable or disable certain project features and choose access levels. Enable or disable certain project features and choose access levels.
.settings-content.no-animate{ class: ('expaneded' if expanded) } .settings-content.no-animate{ class: ('expaneded' if expanded) }
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "sharing-permissions-form" }, authenticity_token: true do |f| = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "sharing-permissions-form" }, authenticity_token: true do |f|
.form-group.sharing-and-permissions .form_group.sharing-and-permissions
.row.js-visibility-select .row.js-visibility-select
.col-md-8 .col-md-8
.label-light .label-light
...@@ -95,6 +96,7 @@ ...@@ -95,6 +96,7 @@
%span.help-block Submit changes to be merged upstream %span.help-block Submit changes to be merged upstream
.col-md-4 .col-md-4
= project_feature_access_select(:merge_requests_access_level) = project_feature_access_select(:merge_requests_access_level)
.row .row
.col-md-8.project-feature.nested .col-md-8.project-feature.nested
= feature_fields.label :builds_access_level, "Pipelines", class: 'label-light' = feature_fields.label :builds_access_level, "Pipelines", class: 'label-light'
...@@ -122,182 +124,180 @@ ...@@ -122,182 +124,180 @@
%span.help-block Pages for project documentation %span.help-block Pages for project documentation
.col-md-4 .col-md-4
= project_feature_access_select(:wiki_access_level) = 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.form-group.sharing-and-permissions
.col-md-8
= f.label :lfs_enabled, 'Git Large File Storage', class: 'label-light'
= link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs')
%span.help-block Manages large files such as audio, video and graphics files.
.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
.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'
= f.submit 'Save changes', class: "btn btn-save"
.form-group
= render 'shared/allow_request_access', form: f
- if Gitlab.config.lfs.enabled && current_user.admin?
.row.js-lfs-enabled.form-group.sharing-and-permissions
.col-md-8
= f.label :lfs_enabled, 'Git Large File Storage', class: 'label-light'
= link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs')
%span.help-block Manages large files such as audio, video and graphics files.
.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
.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'
= f.submit 'Save changes', class: "btn btn-save"
%section.settings.merge-request-settings{ style: ("display: none;" if @project.project_feature.send(:merge_requests_access_level) == 0) }
.settings-header
%h4
Merge request settings
%button.btn.js-settings-toggle
= expanded ? 'Collapse' : 'Expand'
%p
Customize your merge request restrictions.
.settings-content.no-animate{ class: ('expanded' if expanded) }
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "merge-request-settings" }, authenticity_token: true do |f|
= render 'merge_request_settings', form: f
= f.submit 'Save changes', class: "btn btn-save"
%section.settings %section.settings.merge-request-settings{ style: ("display: none;" if @project.project_feature.send(:merge_requests_access_level) == 0) }
.settings-header .settings-header
%h4 %h4
Export project Merge request settings
%button.btn.js-settings-toggle %button.btn.js-settings-toggle
= expanded ? 'Collapse' : 'Expand' = expanded ? 'Collapse' : 'Expand'
%p %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. Customize your merge request restrictions.
.settings-content.no-animate{ class: ('expanded' if expanded) } .settings-content.no-animate{ class: ('expanded' if expanded) }
.bs-callout.bs-callout-info = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "merge-request-settings" }, authenticity_token: true do |f|
%p.append-bottom-0 = render 'merge_request_settings', form: f
%p = f.submit 'Save changes', class: "btn btn-save"
The following items will be exported:
%ul
%li Project and wiki repositories
%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
%p
Once the exported file is ready, you will receive a notification email with a download link.
- 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"
%section.settings.advanced-settings %section.settings
.settings-header .settings-header
%h4 %h4
Advanced settings Export project
%button.btn.js-settings-toggle %button.btn.js-settings-toggle
= expanded ? 'Collapse' : 'Expand' = expanded ? 'Collapse' : 'Expand'
%p
Perform advanced options such as housekeeping, exporting, archiveing, renameing, transfering, or removeing your project.
.settings-content.no-animate{ class: ('expanded' if expanded) }
.sub-section
%h4 Housekeeping
%p %p
Runs a number of housekeeping tasks within the current repository, such as compressing file revisions and removing unreachable objects. 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.
= link_to 'Housekeeping', housekeeping_project_path(@project), .settings-content.no-animate{ class: ('expanded' if expanded) }
method: :post, class: "btn btn-default" .bs-callout.bs-callout-info
- if can? current_user, :archive_project, @project %p.append-bottom-0
.sub-section
%h4.warning-title
- if @project.archived?
Unarchive project
- else
Archive project
- if @project.archived?
%p %p
Unarchiving the project will mark its repository as active. The project can be committed to. The following items will be exported:
%strong Once active this project shows up in the search and on the dashboard. %ul
= link_to 'Unarchive project', unarchive_project_path(@project), %li Project and wiki repositories
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." }, %li Project uploads
method: :post, class: "btn btn-success" %li Project configuration including web hooks and services
- else %li Issues with comments, merge requests with diffs and comments, labels, milestones, snippets, and other project entities
%p %p
Archiving the project will mark its repository as read-only. It is hidden from the dashboard and doesn't show up in searches. The following items will NOT be exported:
%strong Archived projects cannot be committed to!
= link_to 'Archive project', archive_project_path(@project),
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"
.sub-section.rename-respository
%h4.warning-title
Rename repository
%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.
= render 'projects/errors'
= 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)}/
= f.text_field :path, class: 'form-control'
%ul %ul
%li Be careful. Renaming a project's repository can have unintended side effects. %li Job traces and artifacts
%li You will need to update your local repositories to point to the new location. %li LFS objects
- if @project.deployment_services.any? %li Container registry images
%li Your deployment services will be broken, you will need to manually fix the services after renaming. %li CI variables
= f.submit 'Rename project', class: "btn btn-warning" %li Any encrypted tokens
%p
Once the exported file is ready, you will receive a notification email with a download link.
- 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"
- if can?(current_user, :change_namespace, @project) %section.settings.advanced-settings
.settings-header
%h4
Advanced settings
%button.btn.js-settings-toggle
= expanded ? 'Collapse' : 'Expand'
%p
Perform advanced options such as housekeeping, exporting, archiveing, renameing, transfering, or removeing your project.
.settings-content.no-animate{ class: ('expanded' if expanded) }
.sub-section .sub-section
%h4.danger-title %h4 Housekeeping
Transfer project %p
= form_for([@project.namespace.becomes(Namespace), @project], url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'js-project-transfer-form' } ) do |f| 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"
- if can? current_user, :archive_project, @project
.sub-section
%h4.warning-title
- if @project.archived?
Unarchive project
- else
Archive project
- if @project.archived?
%p
Unarchiving the project will mark its repository as active. The project can be committed to.
%strong Once active this project shows up in the search and on the dashboard.
= link_to 'Unarchive project', unarchive_project_path(@project),
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"
- else
%p
Archiving the project will mark its repository as read-only. It is hidden from the dashboard and doesn't show up in searches.
%strong Archived projects cannot be committed to!
= link_to 'Archive project', archive_project_path(@project),
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"
.sub-section.rename-respository
%h4.warning-title
Rename repository
%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.
= render 'projects/errors'
= 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 .form-group
= label_tag :new_namespace_id, nil, class: 'label-light' do = f.label :path, class: 'label-light' do
%span Select a new namespace %span Path
.form-group .form-group
= select_tag :new_namespace_id, namespaces_options(nil), include_blank: true, class: 'select2' .input-group
.input-group-addon
#{URI.join(root_url, @project.namespace.full_path)}/
= f.text_field :path, class: 'form-control'
%ul %ul
%li Be careful. Changing the project's namespace can have unintended side effects. %li Be careful. Renaming a project's repository 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 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. - if @project.deployment_services.any?
= f.submit 'Transfer project', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => transfer_project_message(@project) } %li Your deployment services will be broken, you will need to manually fix the services after renaming.
- if @project.forked? && can?(current_user, :remove_fork_project, @project) = f.submit 'Rename project', class: "btn btn-warning"
.sub-section - if can?(current_user, :change_namespace, @project)
%h4.danger-title .sub-section
Remove fork relationship %h4.danger-title
%p Transfer project
This will remove the fork relationship to source 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|
= succeed "." do .form-group
= link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project) = label_tag :new_namespace_id, nil, class: 'label-light' do
= form_for([@project.namespace.becomes(Namespace), @project], url: remove_fork_project_path(@project), method: :delete, remote: true, html: { class: 'transfer-project' }) do |f| %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.
%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)
.sub-section
%h4.danger-title
Remove fork relationship
%p %p
%strong Once removed, the fork relationship cannot be restored and you will no longer be able to send merge requests to the source. This will remove the fork relationship to source project
= button_to 'Remove fork relationship', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_message(@project) } = succeed "." do
- if can?(current_user, :remove_project, @project) = link_to @project.forked_from_project.name_with_namespace, project_path(@project.forked_from_project)
.sub-section = form_for([@project.namespace.becomes(Namespace), @project], url: remove_fork_project_path(@project), method: :delete, remote: true, html: { class: 'transfer-project' }) do |f|
%h4.danger-title %p
Remove project %strong Once removed, the fork relationship cannot be restored and you will no longer be able to send merge requests to the source.
%p = button_to 'Remove fork relationship', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_message(@project) }
Removing the project will delete its repository and all related resources including issues, merge requests etc. - if can?(current_user, :remove_project, @project)
= form_tag(project_path(@project), method: :delete) do .sub-section
%h4.danger-title
Remove project
%p %p
%strong Removed projects cannot be restored! Removing the project will delete its repository and all related resources including issues, merge requests etc.
= button_to 'Remove project', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_project_message(@project) } = 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) }
.save-project-loader.hide .save-project-loader.hide
.center .center
...@@ -306,4 +306,4 @@ ...@@ -306,4 +306,4 @@
Saving project. Saving project.
%p Please wait a moment, this page will automatically refresh when ready. %p Please wait a moment, this page will automatically refresh when ready.
= render 'shared/confirm_modal', phrase: @project.path = render 'shared/confirm_modal', phrase: @project.path
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment