From 01d9bffdd82c098a8c2e368e39a590e5c753dbc7 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Wed, 15 Jun 2016 12:43:32 -0600 Subject: Improve New Project page for mobile. Separate the New Project page's "Project path" grouped fields into separate fields. Fixes #18599. --- app/views/projects/new.html.haml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index f9ac16b32f3..47a2f2889d8 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -11,21 +11,17 @@ .project-edit-content = form_for @project, html: { class: 'new_project form-horizontal js-requires-input' } do |f| - .form-group.project-name-holder + .form-group + = f.label :path, class: 'control-label' do + Project owner + .col-sm-10 + = f.select :namespace_id, namespaces_options(:current_user), {}, {class: 'select2 js-select-namespace', tabindex: 1} + + .form-group = f.label :path, class: 'control-label' do - Project path + Project name .col-sm-10 - .input-group - - if current_user.can_select_namespace? - .input-group-addon - = root_url - = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user, display_path: true), {}, {class: 'select2 js-select-namespace', tabindex: 1} - .input-group-addon - \/ - - else - .input-group-addon - #{root_url}#{current_user.username}/ - = f.text_field :path, placeholder: "my-awesome-project", class: "form-control", tabindex: 2, autofocus: true, required: true + = 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 -- cgit v1.2.1 From 190685741c47aff3ec53fb55308a36b46d1ef8d2 Mon Sep 17 00:00:00 2001 From: Connor Shea Date: Wed, 15 Jun 2016 12:55:05 -0600 Subject: Move group creation text to below the 'Project owner' field. --- app/views/projects/new.html.haml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 47a2f2889d8..7e8b8f83467 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -17,17 +17,17 @@ .col-sm-10 = f.select :namespace_id, namespaces_options(:current_user), {}, {class: 'select2 js-select-namespace', tabindex: 1} + - 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 :path, class: 'control-label' do Project name .col-sm-10 = 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 - - if import_sources_enabled? .project-import.js-toggle-container .form-group -- cgit v1.2.1