2017-10-11 05:07:19 -04:00
|
|
|
- visibility_level = params.dig(:project, :visibility_level) || default_project_visibility
|
|
|
|
|
|
|
|
.row{ id: project_name_id }
|
|
|
|
.form-group.project-path.col-sm-6
|
|
|
|
= f.label :namespace_id, class: 'label-light' do
|
|
|
|
%span
|
|
|
|
Project path
|
|
|
|
.input-group
|
|
|
|
- if current_user.can_select_namespace?
|
|
|
|
.input-group-addon
|
|
|
|
= root_url
|
2018-01-11 07:54:33 -05:00
|
|
|
= f.select :namespace_id, namespaces_options(namespace_id_from(params) || :current_user, display_path: true, extra_group: namespace_id_from(params)), {}, { class: 'select2 js-select-namespace qa-project-namespace-select', tabindex: 1}
|
2017-10-11 05:07:19 -04:00
|
|
|
|
|
|
|
- else
|
|
|
|
.input-group-addon.static-namespace
|
|
|
|
#{user_url(current_user.username)}/
|
|
|
|
= f.hidden_field :namespace_id, value: current_user.namespace_id
|
|
|
|
.form-group.project-path.col-sm-6
|
|
|
|
= f.label :path, class: 'label-light' do
|
|
|
|
%span
|
|
|
|
Project name
|
|
|
|
= f.text_field :path, placeholder: "my-awesome-project", class: "form-control", tabindex: 2, autofocus: true, required: true
|
|
|
|
- if current_user.can_create_group?
|
|
|
|
.help-block
|
|
|
|
Want to house several dependent projects under the same namespace?
|
|
|
|
= link_to "Create a group", new_group_path
|
|
|
|
|
|
|
|
.form-group
|
|
|
|
= f.label :description, class: 'label-light' do
|
|
|
|
Project description
|
|
|
|
%span (optional)
|
|
|
|
= f.text_area :description, placeholder: 'Description format', class: "form-control", rows: 3, maxlength: 250
|
|
|
|
|
|
|
|
.form-group.visibility-level-setting
|
|
|
|
= f.label :visibility_level, class: 'label-light' do
|
|
|
|
Visibility Level
|
2018-01-17 12:24:41 -05:00
|
|
|
= link_to icon('question-circle'), help_page_path("public_access/public_access"), aria: { label: 'Documentation for Visibility Level' }, target: '_blank', rel: 'noopener noreferrer'
|
2017-10-11 05:07:19 -04:00
|
|
|
= render 'shared/visibility_level', f: f, visibility_level: visibility_level.to_i, can_change_visibility_level: true, form_model: @project, with_label: false
|
|
|
|
|
|
|
|
= f.submit 'Create project', class: "btn btn-create project-submit", tabindex: 4
|
|
|
|
= link_to 'Cancel', dashboard_projects_path, class: 'btn btn-cancel'
|