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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
0ead313d
Commit
0ead313d
authored
Apr 25, 2021
by
Jackie Fraser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace import project link behind feature flag
parent
031d643b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
6 deletions
+29
-6
app/views/projects/project_members/index.html.haml
app/views/projects/project_members/index.html.haml
+5
-1
locale/gitlab.pot
locale/gitlab.pot
+3
-0
spec/features/projects/settings/user_manages_project_members_spec.rb
...es/projects/settings/user_manages_project_members_spec.rb
+21
-5
No files found.
app/views/projects/project_members/index.html.haml
View file @
0ead313d
...
...
@@ -18,7 +18,11 @@
=
html_escape
(
_
(
"Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}"
))
%
{
i_open:
'<i>'
.
html_safe
,
i_close:
'</i>'
.
html_safe
}
.col-md-12.col-lg-6
.gl-display-flex.gl-flex-wrap.gl-justify-content-end
.js-invite-group-trigger
{
data:
{
classes:
'gl-mt-3 gl-sm-w-auto gl-w-full'
,
display_text:
_
(
'Invite a group'
)
}
}
=
link_to
_
(
"Import a project"
),
import_project_project_members_path
(
@project
),
class:
"btn btn-default btn-md gl-button gl-mt-3 gl-sm-w-auto gl-w-full"
,
title:
_
(
"Import members from another project"
)
.js-invite-group-trigger
{
data:
{
classes:
'gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3'
,
display_text:
_
(
'Invite a group'
)
}
}
.js-invite-members-trigger
{
data:
{
variant:
'success'
,
classes:
'gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3'
,
display_text:
_
(
'Invite members'
)
}
}
=
render
'projects/invite_members_modal'
,
project:
@project
...
...
locale/gitlab.pot
View file @
0ead313d
...
...
@@ -16502,6 +16502,9 @@ msgstr ""
msgid "Import Projects from Gitea"
msgstr ""
msgid "Import a project"
msgstr ""
msgid "Import an exported GitLab project"
msgstr ""
...
...
spec/features/projects/settings/user_manages_project_members_spec.rb
View file @
0ead313d
...
...
@@ -38,16 +38,12 @@ RSpec.describe 'Projects > Settings > User manages project members' do
end
it
'imports a team from another project'
,
:js
do
stub_feature_flags
(
invite_members_group_modal:
false
)
project2
.
add_maintainer
(
user
)
project2
.
add_reporter
(
user_mike
)
visit
(
project_project_members_path
(
project
))
page
.
within
(
'.invite-users-form'
)
do
click_link
(
'Import'
)
end
click_link
(
'Import a project'
)
select2
(
project2
.
id
,
from:
'#source_project_id'
)
click_button
(
'Import project members'
)
...
...
@@ -55,6 +51,26 @@ RSpec.describe 'Projects > Settings > User manages project members' do
expect
(
find_member_row
(
user_mike
)).
to
have_content
(
'Reporter'
)
end
describe
'when the :invite_members_group_modal is disabled'
do
it
'imports a team from another project'
,
:js
do
stub_feature_flags
(
invite_members_group_modal:
false
)
project2
.
add_maintainer
(
user
)
project2
.
add_reporter
(
user_mike
)
visit
(
project_project_members_path
(
project
))
page
.
within
(
'.invite-users-form'
)
do
click_link
(
'Import'
)
end
select2
(
project2
.
id
,
from:
'#source_project_id'
)
click_button
(
'Import project members'
)
expect
(
find_member_row
(
user_mike
)).
to
have_content
(
'Reporter'
)
end
end
it
'shows all members of project shared group'
,
:js
do
group
.
add_owner
(
user
)
group
.
add_developer
(
user_dmitriy
)
...
...
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