2015-09-09 17:29:19 -04:00
- @blank_container = true
2013-05-14 05:46:41 -04:00
.project-edit-container
.project-edit-errors
.project-edit-content
2015-09-09 17:29:19 -04:00
.panel.panel-default
.panel-heading
2015-01-29 10:13:38 -05:00
Project settings
2014-05-29 11:57:27 -04:00
.panel-body
2015-06-10 11:01:06 -04:00
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "edit_project form-horizontal fieldset-form" }, authenticity_token: true do |f|
2014-01-25 12:15:44 -05:00
2013-06-19 15:44:57 -04:00
%fieldset
2013-12-30 18:27:02 -05:00
.form-group.project_name_holder
2013-12-31 09:16:50 -05:00
= f.label :name, class: 'control-label' do
2013-10-18 00:28:49 -04:00
Project name
2013-12-30 18:27:02 -05:00
.col-sm-10
2014-10-28 04:19:58 -04:00
= f.text_field :name, placeholder: "Example Project", class: "form-control", id: "project_name_edit"
2013-06-19 15:44:57 -04:00
2013-12-30 18:27:02 -05:00
.form-group
2013-12-31 09:16:50 -05:00
= f.label :description, class: 'control-label' do
2013-06-19 15:44:57 -04:00
Project description
%span.light (optional)
2013-12-30 18:27:02 -05:00
.col-sm-10
2013-12-31 09:16:50 -05:00
= f.text_area :description, placeholder: "Awesome project", class: "form-control", rows: 3, maxlength: 250
2013-06-19 15:44:57 -04:00
2013-08-03 04:30:07 -04:00
- if @project.repository.exists? && @project.repository.branch_names.any?
2013-12-30 18:27:02 -05:00
.form-group
2013-12-31 09:16:50 -05:00
= f.label :default_branch, "Default Branch", class: 'control-label'
2014-01-11 05:11:54 -05:00
.col-sm-10= f.select(:default_branch, @repository.branch_names, {}, {class: 'select2 select-wide'})
2013-06-19 15:44:57 -04:00
2015-07-06 08:38:43 -04:00
= render 'shared/visibility_level', f: f, visibility_level: @project.visibility_level, can_change_visibility_level: can_change_visibility_level?(@project, current_user), form_model: @project
2013-06-19 15:44:57 -04:00
2015-03-26 02:07:59 -04:00
.form-group
= f.label :tag_list, "Tags", class: 'control-label'
.col-sm-10
= f.text_field :tag_list, maxlength: 2000, class: "form-control"
%p.help-block Separate tags with commas.
2013-06-19 15:44:57 -04:00
%fieldset.features
%legend
Features:
2013-12-30 18:27:02 -05:00
.form-group
2015-06-10 11:01:06 -04:00
.col-sm-offset-2.col-sm-10
2014-01-08 11:59:23 -05:00
.checkbox
2015-06-10 11:01:06 -04:00
= f.label :issues_enabled do
= f.check_box :issues_enabled
%strong Issues
%br
%span.descr Lightweight issue tracking system for this project
2013-06-19 15:44:57 -04:00
2013-12-30 18:27:02 -05:00
.form-group
2015-06-10 11:01:06 -04:00
.col-sm-offset-2.col-sm-10
2014-01-08 11:59:23 -05:00
.checkbox
2015-06-10 11:01:06 -04:00
= f.label :merge_requests_enabled do
= f.check_box :merge_requests_enabled
%strong Merge Requests
%br
%span.descr Submit changes to be merged upstream.
2013-06-19 15:44:57 -04:00
2013-12-30 18:27:02 -05:00
.form-group
2015-06-10 11:01:06 -04:00
.col-sm-offset-2.col-sm-10
2014-01-08 11:59:23 -05:00
.checkbox
2015-06-10 11:01:06 -04:00
= f.label :wiki_enabled do
= f.check_box :wiki_enabled
%strong Wiki
%br
%span.descr Pages for project documentation
2013-06-19 15:44:57 -04:00
2013-12-30 18:27:02 -05:00
.form-group
2015-06-10 11:01:06 -04:00
.col-sm-offset-2.col-sm-10
2014-01-08 11:59:23 -05:00
.checkbox
2015-06-10 11:01:06 -04:00
= f.label :snippets_enabled do
= f.check_box :snippets_enabled
%strong Snippets
%br
%span.descr Share code pastes with others out of git repository
2013-06-19 15:44:57 -04:00
2014-01-25 12:15:44 -05:00
%fieldset.features
%legend
Project avatar:
.form-group
2015-06-15 18:48:54 -04:00
.col-sm-offset-2.col-sm-10
2015-01-19 15:37:20 -05:00
- if @project.avatar?
2015-01-24 13:02:58 -05:00
= project_icon("#{@project.namespace.to_param}/#{@project.to_param}", alt: '', class: 'avatar project-avatar s160')
2014-01-25 12:15:44 -05:00
%p.light
- if @project.avatar_in_git
Project avatar in repository: #{ @project.avatar_in_git }
%p.light
- if @project.avatar?
You can change your project avatar here
- else
2015-02-23 09:10:56 -05:00
You can upload a project avatar here
2015-03-14 03:29:32 -04:00
%a.choose-btn.btn.btn-sm.js-choose-project-avatar-button
2014-01-25 12:15:44 -05:00
%i.icon-paper-clip
%span Choose File ...
%span.file_name.js-avatar-filename File name...
= f.file_field :avatar, class: "js-project-avatar-input hidden"
2015-01-19 15:37:20 -05:00
.light The maximum file size allowed is 200KB.
2014-01-25 12:15:44 -05:00
- if @project.avatar?
%hr
2015-03-14 03:29:32 -04:00
= link_to 'Remove avatar', namespace_project_avatar_path(@project.namespace, @project), data: { confirm: "Project avatar will be removed. Are you sure?"}, method: :delete, class: "btn btn-remove btn-sm remove-avatar"
2013-06-19 15:44:57 -04:00
.form-actions
2013-08-01 15:35:40 -04:00
= f.submit 'Save changes', class: "btn btn-save"
2013-06-19 15:44:57 -04:00
2013-08-15 07:33:38 -04:00
2014-10-08 04:54:51 -04:00
.danger-settings
- if can? current_user, :archive_project, @project
2014-10-08 08:47:24 -04:00
- if @project.archived?
.panel.panel-success
.panel-heading
2014-10-08 04:54:51 -04:00
Unarchive project
2014-10-08 08:47:24 -04:00
.panel-body
2014-10-08 04:54:51 -04:00
%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.
2015-01-24 13:02:58 -05:00
= link_to 'Unarchive', unarchive_namespace_project_path(@project.namespace, @project),
2014-10-08 04:54:51 -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." },
2014-10-08 06:57:54 -04:00
method: :post, class: "btn btn-success"
2014-10-08 08:47:24 -04:00
- else
.panel.panel-warning
.panel-heading
Archive project
.panel-body
2014-10-08 04:54:51 -04:00
%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!
2015-01-24 13:02:58 -05:00
= link_to 'Archive', archive_namespace_project_path(@project.namespace, @project),
2014-10-08 04:54:51 -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"
- else
.nothing-here-block Only the project owner can archive a project
.panel.panel-default.panel.panel-warning
.panel-heading Rename repository
.errors-holder
.panel-body
2015-01-24 13:02:58 -05:00
= form_for([@project.namespace.becomes(Namespace), @project], html: { class: 'form-horizontal' }) do |f|
2014-10-27 11:08:11 -04:00
.form-group.project_name_holder
= f.label :name, class: 'control-label' do
Project name
.col-sm-9
.form-group
= f.text_field :name, placeholder: "Example Project", class: "form-control"
2014-10-08 04:54:51 -04:00
.form-group
= f.label :path, class: 'control-label' do
%span Path
.col-sm-9
.form-group
.input-group
2014-12-22 06:50:58 -05:00
.input-group-addon
#{URI.join(root_url, @project.namespace.path)}/
2014-10-08 04:54:51 -04:00
= f.text_field :path, class: 'form-control'
%span.input-group-addon .git
%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.
.form-actions
= f.submit 'Rename', class: "btn btn-warning"
- if can?(current_user, :change_namespace, @project)
.panel.panel-default.panel.panel-danger
.panel-heading Transfer project
2014-05-31 07:21:13 -04:00
.errors-holder
.panel-body
2015-01-24 13:02:58 -05:00
= form_for([@project.namespace.becomes(Namespace), @project], url: transfer_namespace_project_path(@project.namespace, @project), method: :put, remote: true, html: { class: 'transfer-project form-horizontal' }) do |f|
2014-05-31 07:21:13 -04:00
.form-group
2015-01-24 13:02:58 -05:00
= label_tag :new_namespace_id, nil, class: 'control-label' do
2014-10-08 04:54:51 -04:00
%span Namespace
2015-07-07 15:07:39 -04:00
.col-sm-9
2014-05-31 07:21:13 -04:00
.form-group
2015-01-24 13:02:58 -05:00
= select_tag :new_namespace_id, namespaces_options(@project.namespace_id), { prompt: 'Choose a project namespace', class: 'select2' }
2014-05-31 07:21:13 -04:00
%ul
2014-10-08 04:54:51 -04:00
%li Be careful. Changing the project's namespace can have unintended side effects.
%li You can only transfer the project to namespaces you manage.
2014-05-31 07:21:13 -04:00
%li You will need to update your local repositories to point to the new location.
.form-actions
2014-10-08 06:57:54 -04:00
= f.submit 'Transfer', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => transfer_project_message(@project) }
2014-10-08 04:54:51 -04:00
- else
.nothing-here-block Only the project owner can transfer a project
2014-03-11 09:15:08 -04:00
2014-10-08 04:54:51 -04:00
- if can?(current_user, :remove_project, @project)
.panel.panel-default.panel.panel-danger
.panel-heading Remove project
.panel-body
2015-01-24 13:02:58 -05:00
= form_tag(namespace_project_path(@project.namespace, @project), method: :delete, html: { class: 'form-horizontal'}) do
2014-10-08 06:57:54 -04:00
%p
Removing the project will delete its repository and all related resources including issues, merge requests etc.
%br
%strong Removed projects cannot be restored!
2014-10-08 04:54:51 -04:00
2014-10-08 06:57:54 -04:00
= link_to 'Remove project', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_project_message(@project) }
2014-10-08 04:54:51 -04:00
- else
.nothing-here-block Only project owner can remove a project
2013-05-14 05:46:41 -04:00
2014-01-01 14:42:42 -05: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
= render 'shared/confirm_modal', phrase: @project.path