Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
b06eb8c8
Commit
b06eb8c8
authored
Aug 06, 2018
by
Imre Farkas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CE port of "List groups with developer maintainer access on project creation"
parent
b211f7c2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
7 deletions
+17
-7
app/helpers/namespaces_helper.rb
app/helpers/namespaces_helper.rb
+4
-5
app/views/projects/_new_project_fields.html.haml
app/views/projects/_new_project_fields.html.haml
+7
-1
changelogs/unreleased/ce-5666-backport.yml
changelogs/unreleased/ce-5666-backport.yml
+5
-0
qa/qa/page/project/new.rb
qa/qa/page/project/new.rb
+1
-1
No files found.
app/helpers/namespaces_helper.rb
View file @
b06eb8c8
...
...
@@ -3,11 +3,10 @@ module NamespacesHelper
params
.
dig
(
:project
,
:namespace_id
)
||
params
[
:namespace_id
]
end
def
namespaces_options
(
selected
=
:current_user
,
display_path:
false
,
extra_group:
nil
,
groups_only:
false
)
groups
=
current_user
.
manageable_groups
.
joins
(
:route
)
.
includes
(
:route
)
.
order
(
'routes.path'
)
def
namespaces_options
(
selected
=
:current_user
,
display_path:
false
,
groups:
nil
,
extra_group:
nil
,
groups_only:
false
)
groups
||=
current_user
.
manageable_groups
.
eager_load
(
:route
)
.
order
(
'routes.path'
)
users
=
[
current_user
.
namespace
]
selected_id
=
selected
...
...
app/views/projects/_new_project_fields.html.haml
View file @
b06eb8c8
...
...
@@ -12,7 +12,13 @@
.input-group-prepend.has-tooltip
{
title:
root_url
}
.input-group-text
=
root_url
=
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
}
-
namespace_id
=
namespace_id_from
(
params
)
=
f
.
select
(
:namespace_id
,
namespaces_options
(
namespace_id
||
:current_user
,
display_path:
true
,
extra_group:
namespace_id
),
{},
{
class:
'select2 js-select-namespace qa-project-namespace-select'
,
tabindex:
1
})
-
else
.input-group-prepend.static-namespace.has-tooltip
{
title:
user_url
(
current_user
.
username
)
+
'/'
}
...
...
changelogs/unreleased/ce-5666-backport.yml
0 → 100644
View file @
b06eb8c8
---
title
:
CE port of "List groups with developer maintainer access on project creation"
merge_request
:
21051
author
:
type
:
other
qa/qa/page/project/new.rb
View file @
b06eb8c8
...
...
@@ -10,7 +10,7 @@ module QA
view
'app/views/projects/_new_project_fields.html.haml'
do
element
:project_namespace_select
element
:project_namespace_field
,
/select :namespace_id.*class: 'select2/
element
:project_namespace_field
,
'namespaces_options'
element
:project_path
,
'text_field :path'
element
:project_description
,
'text_area :description'
element
:project_create_button
,
"submit 'Create project'"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment