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

195 lines
8.2 KiB
Plaintext
Raw Normal View History

.project-edit-container
.project-edit-errors
.project-edit-content
2013-08-15 11:33:38 +00:00
%div
%h3.page-title
Project settings:
%p.light Some settings, such as "Transfer Project", are hidden inside the danger area below
2013-08-15 11:33:38 +00:00
%hr
2013-06-19 19:44:57 +00:00
.form-holder
= form_for @project, remote: true, html: { class: "edit_project form-horizontal" } do |f|
2013-06-19 19:44:57 +00:00
%fieldset
.form-group.project_name_holder
= f.label :name, class: 'control-label' do
2013-10-18 04:28:49 +00:00
Project name
.col-sm-10
= f.text_field :name, placeholder: "Example Project", class: "form-control"
2013-06-19 19:44:57 +00:00
.form-group
= f.label :description, class: 'control-label' do
2013-06-19 19:44:57 +00:00
Project description
%span.light (optional)
.col-sm-10
= f.text_area :description, placeholder: "Awesome project", class: "form-control", rows: 3, maxlength: 250
2013-06-19 19:44:57 +00:00
- if @project.repository.exists? && @project.repository.branch_names.any?
.form-group
= f.label :default_branch, "Default Branch", class: 'control-label'
.col-sm-10= f.select(:default_branch, @repository.branch_names, {}, {class: 'select2 select-wide'})
2013-06-19 19:44:57 +00:00
= render "visibility_level", f: f, visibility_level: @project.visibility_level, can_change_visibility_level: can?(current_user, :change_visibility_level, @project)
2013-06-19 19:44:57 +00:00
%fieldset.features
%legend
Labels:
.form-group
2013-06-19 19:44:57 +00:00
= f.label :label_list, "Labels", class: 'control-label'
.col-sm-10
= f.text_field :label_list, maxlength: 2000, class: "form-control"
2013-07-24 15:26:14 +00:00
%p.hint Separate labels with commas.
2013-06-19 19:44:57 +00:00
%fieldset.features
%legend
Features:
.form-group
2013-06-19 19:44:57 +00:00
= f.label :issues_enabled, "Issues", class: 'control-label'
.col-sm-10
.checkbox
= f.check_box :issues_enabled
%span.descr Lightweight issue tracking system for this project
2013-06-19 19:44:57 +00:00
- if Project.issues_tracker.values.count > 1
.form-group
2013-06-19 19:44:57 +00:00
= f.label :issues_tracker, "Issues tracker", class: 'control-label'
.col-sm-10= f.select(:issues_tracker, project_issues_trackers(@project.issues_tracker), {}, { disabled: !@project.issues_enabled })
2013-06-19 19:44:57 +00:00
.form-group
2013-06-19 19:44:57 +00:00
= f.label :issues_tracker_id, "Project name or id in issues tracker", class: 'control-label'
.col-sm-10= f.text_field :issues_tracker_id, disabled: !@project.can_have_issues_tracker_id?, class: 'form-control'
2013-06-19 19:44:57 +00:00
.form-group
2013-06-19 19:44:57 +00:00
= f.label :merge_requests_enabled, "Merge Requests", class: 'control-label'
.col-sm-10
.checkbox
= f.check_box :merge_requests_enabled
%span.descr Submit changes to be merged upstream.
2013-06-19 19:44:57 +00:00
.form-group
2013-06-19 19:44:57 +00:00
= f.label :wiki_enabled, "Wiki", class: 'control-label'
.col-sm-10
.checkbox
= f.check_box :wiki_enabled
%span.descr Pages for project documentation
2013-06-19 19:44:57 +00:00
.form-group
2013-06-19 19:44:57 +00:00
= f.label :wall_enabled, "Wall", class: 'control-label'
.col-sm-10
.checkbox
= f.check_box :wall_enabled
%span.descr Simple chat system for broadcasting inside project
2013-06-19 19:44:57 +00:00
.form-group
2013-06-19 19:44:57 +00:00
= f.label :snippets_enabled, "Snippets", class: 'control-label'
.col-sm-10
.checkbox
= f.check_box :snippets_enabled
%span.descr Share code pastes with others out of git repository
2013-06-19 19:44:57 +00:00
.form-actions
= f.submit 'Save changes', class: "btn btn-save"
2013-06-19 19:44:57 +00:00
2013-08-15 11:33:38 +00:00
%center.light.prepend-top-20.padded
%h3
%i.icon-warning-sign
Dangerous settings
%p Project settings below may result in data loss!
= link_to '#', class: 'btn js-toggle-visibility-link' do
Show it to me
%i.icon-chevron-down
.js-toggle-visibility-container.hide
- if can? current_user, :archive_project, @project
.ui-box.ui-box-danger
.title
- if @project.archived?
Unarchive project
- else
Archive project
.body
- if @project.archived?
%p
Unarchiving the project will mark its repository as active.
%br
The project can be committed to.
%br
%strong Once active this project shows up in the search and on the dashboard.
2013-12-25 14:12:25 +00:00
= link_to 'Unarchive', 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 comitted to again." },
method: :post, class: "btn btn-remove"
- else
%p
Archiving the project will mark its repository as read-only.
%br
It is hidden from the dashboard and doesn't show up in searches.
%br
%strong Archived projects cannot be committed to!
2013-12-25 14:12:25 +00:00
= link_to 'Archive', 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-remove"
- else
%p.nothing_here_message Only the project owner can archive a project
2013-08-15 11:33:38 +00:00
- if can?(current_user, :change_namespace, @project)
.ui-box.ui-box-danger
.title Transfer project
.errors-holder
.form-holder
= form_for(@project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'transfer-project form-horizontal' }) do |f|
.form-group
= f.label :namespace_id, class: 'control-label' do
2013-08-15 11:33:38 +00:00
%span Namespace
.col-sm-10
.form-group
= f.select :namespace_id, namespaces_options(@project.namespace_id), { prompt: 'Choose a project namespace' }, { class: 'select2' }
2013-08-15 11:33:38 +00: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.
2013-08-15 11:33:38 +00:00
%li You will need to update your local repositories to point to the new location.
.form-actions
= f.submit 'Transfer', class: "btn btn-remove"
- else
%p.nothing_here_message Only the project owner can transfer a project
2013-08-15 11:33:38 +00:00
2013-06-19 19:44:57 +00:00
.ui-box.ui-box-danger
2013-08-15 11:33:38 +00:00
.title Rename repository
2013-06-19 19:44:57 +00:00
.errors-holder
.form-holder
= form_for(@project, html: { class: 'form-horizontal' }) do |f|
.form-group
= f.label :path, class: 'control-label' do
2013-08-15 11:33:38 +00:00
%span Path
.col-sm-9
.form-group
.input-group
= f.text_field :path, class: 'form-control'
%span.input-group-addon .git
2013-06-19 19:44:57 +00:00
%ul
%li Be careful. Renaming a project's repository can have unintended side effects.
2013-06-19 19:44:57 +00:00
%li You will need to update your local repositories to point to the new location.
.form-actions
2013-08-15 11:33:38 +00:00
= f.submit 'Rename', class: "btn btn-remove"
- if can?(current_user, :remove_project, @project)
.ui-box.ui-box-danger
.title Remove project
.body
2013-08-15 11:33:38 +00:00
%p
Removing the project will delete its repository and all related resources including issues, merge requests etc.
2013-08-15 11:33:38 +00:00
%br
%strong Removed projects cannot be restored!
2013-08-15 11:33:38 +00:00
= link_to 'Remove project', @project, data: { confirm: remove_project_message(@project) }, method: :delete, class: "btn btn-remove"
2013-08-15 11:33:38 +00:00
- else
%p.nothing_here_message Only project owner can remove a project
.save-project-loader.hide
2011-12-30 06:54:42 +00:00
%center
= image_tag "ajax_loader.gif"
2013-08-12 14:21:57 +00:00
%h3 Saving project.
%p Please wait a moment, this page will automatically refresh when ready.