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
Kazuhiko Shiozaki
gitlab-ce
Commits
2a1d4255
Commit
2a1d4255
authored
Apr 10, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly render invite members without user.
parent
cee98f22
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
33 deletions
+74
-33
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+6
-2
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+6
-2
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+9
-4
app/views/admin/projects/show.html.haml
app/views/admin/projects/show.html.haml
+8
-3
app/views/admin/users/show.html.haml
app/views/admin/users/show.html.haml
+2
-2
app/views/groups/group_members/_group_member.html.haml
app/views/groups/group_members/_group_member.html.haml
+21
-10
app/views/projects/project_members/_project_member.html.haml
app/views/projects/project_members/_project_member.html.haml
+22
-10
No files found.
app/helpers/groups_helper.rb
View file @
2a1d4255
module
GroupsHelper
module
GroupsHelper
def
remove_user_from_group_message
(
group
,
user
)
def
remove_user_from_group_message
(
group
,
member
)
"Are you sure you want to remove
\"
#{
user
.
name
}
\"
from
\"
#{
group
.
name
}
\"
?"
if
member
.
user
"Are you sure you want to remove
\"
#{
member
.
user
.
name
}
\"
from
\"
#{
group
.
name
}
\"
?"
else
"Are you sure you want to cancel invitation for
\"
#{
member
.
invite_email
}
\"
to join
\"
#{
group
.
name
}
\"
?"
end
end
end
def
leave_group_message
(
group
)
def
leave_group_message
(
group
)
...
...
app/helpers/projects_helper.rb
View file @
2a1d4255
module
ProjectsHelper
module
ProjectsHelper
def
remove_from_project_team_message
(
project
,
user
)
def
remove_from_project_team_message
(
project
,
member
)
"You are going to remove
#{
user
.
name
}
from
#{
project
.
name
}
project team. Are you sure?"
if
member
.
user
"You are going to remove
#{
member
.
user
.
name
}
from
#{
project
.
name
}
project team. Are you sure?"
else
"You are going to cancel invitation for
#{
member
.
invite_email
}
to join
#{
project
.
name
}
project team. Are you sure?"
end
end
end
def
link_to_project
(
project
)
def
link_to_project
(
project
)
...
...
app/views/admin/groups/show.html.haml
View file @
2a1d4255
...
@@ -74,13 +74,18 @@
...
@@ -74,13 +74,18 @@
%ul
.well-list.group-users-list
%ul
.well-list.group-users-list
-
@members
.
each
do
|
member
|
-
@members
.
each
do
|
member
|
-
user
=
member
.
user
-
user
=
member
.
user
%li
{
class:
dom_class
(
member
),
id:
dom_id
(
user
)}
%li
{
class:
dom_class
(
member
),
id:
(
dom_id
(
user
)
if
user
)}
.list-item-name
.list-item-name
%strong
-
if
user
=
link_to
user
.
name
,
admin_user_path
(
user
)
%strong
=
link_to
user
.
name
,
admin_user_path
(
user
)
-
else
%strong
=
member
.
invite_email
(invited)
%span
.pull-right.light
%span
.pull-right.light
=
member
.
human_access
=
member
.
human_access
=
link_to
group_group_member_path
(
@group
,
member
),
data:
{
confirm:
remove_user_from_group_message
(
@group
,
us
er
)
},
method: :delete
,
remote:
true
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from group'
do
=
link_to
group_group_member_path
(
@group
,
member
),
data:
{
confirm:
remove_user_from_group_message
(
@group
,
memb
er
)
},
method: :delete
,
remote:
true
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from group'
do
%i
.fa.fa-minus.fa-inverse
%i
.fa.fa-minus.fa-inverse
.panel-footer
.panel-footer
=
paginate
@members
,
param_name:
'members_page'
,
theme:
'gitlab'
=
paginate
@members
,
param_name:
'members_page'
,
theme:
'gitlab'
app/views/admin/projects/show.html.haml
View file @
2a1d4255
...
@@ -124,14 +124,19 @@
...
@@ -124,14 +124,19 @@
-
user
=
project_member
.
user
-
user
=
project_member
.
user
%li
.project_member
%li
.project_member
.list-item-name
.list-item-name
%strong
-
if
user
=
link_to
user
.
name
,
admin_user_path
(
user
)
%strong
=
link_to
user
.
name
,
admin_user_path
(
user
)
-
else
%strong
=
project_member
.
invite_email
(invited)
.pull-right
.pull-right
-
if
project_member
.
owner?
-
if
project_member
.
owner?
%span
.light
Owner
%span
.light
Owner
-
else
-
else
%span
.light
=
project_member
.
human_access
%span
.light
=
project_member
.
human_access
=
link_to
namespace_project_project_member_path
(
@project
.
namespace
,
@project
,
project_member
),
data:
{
confirm:
remove_from_project_team_message
(
@project
,
us
er
)},
method: :delete
,
remote:
true
,
class:
"btn btn-sm btn-remove"
do
=
link_to
namespace_project_project_member_path
(
@project
.
namespace
,
@project
,
project_member
),
data:
{
confirm:
remove_from_project_team_message
(
@project
,
project_memb
er
)},
method: :delete
,
remote:
true
,
class:
"btn btn-sm btn-remove"
do
%i
.fa.fa-times
%i
.fa.fa-times
.panel-footer
.panel-footer
=
paginate
@project_members
,
param_name:
'project_members_page'
,
theme:
'gitlab'
=
paginate
@project_members
,
param_name:
'project_members_page'
,
theme:
'gitlab'
app/views/admin/users/show.html.haml
View file @
2a1d4255
...
@@ -182,7 +182,7 @@
...
@@ -182,7 +182,7 @@
.pull-right
.pull-right
%span
.light
=
group_member
.
human_access
%span
.light
=
group_member
.
human_access
-
unless
group_member
.
owner?
-
unless
group_member
.
owner?
=
link_to
group_group_member_path
(
group
,
group_member
),
data:
{
confirm:
remove_user_from_group_message
(
group
,
@us
er
)
},
method: :delete
,
remote:
true
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from group'
do
=
link_to
group_group_member_path
(
group
,
group_member
),
data:
{
confirm:
remove_user_from_group_message
(
group
,
group_memb
er
)
},
method: :delete
,
remote:
true
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from group'
do
%i
.fa.fa-times.fa-inverse
%i
.fa.fa-times.fa-inverse
-
else
-
else
.nothing-here-block
This user has no groups.
.nothing-here-block
This user has no groups.
...
@@ -221,7 +221,7 @@
...
@@ -221,7 +221,7 @@
%span
.light
=
member
.
human_access
%span
.light
=
member
.
human_access
-
if
member
.
respond_to?
:project
-
if
member
.
respond_to?
:project
=
link_to
namespace_project_project_member_path
(
project
.
namespace
,
project
,
@user
),
data:
{
confirm:
remove_from_project_team_message
(
project
,
@us
er
)
},
remote:
true
,
method: :delete
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from project'
do
=
link_to
namespace_project_project_member_path
(
project
.
namespace
,
project
,
member
),
data:
{
confirm:
remove_from_project_team_message
(
project
,
memb
er
)
},
remote:
true
,
method: :delete
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from project'
do
%i
.fa.fa-times
%i
.fa.fa-times
#ssh-keys
.tab-pane
#ssh-keys
.tab-pane
=
render
'profiles/keys/key_table'
,
admin:
true
=
render
'profiles/keys/key_table'
,
admin:
true
app/views/groups/group_members/_group_member.html.haml
View file @
2a1d4255
-
user
=
member
.
user
-
user
=
member
.
user
-
return
unless
user
-
return
unless
user
||
member
.
invite?
-
show_roles
=
true
if
show_roles
.
nil?
-
show_roles
=
true
if
show_roles
.
nil?
%li
{
class:
"#{dom_class(member)} js-toggle-container"
,
id:
dom_id
(
member
)}
%li
{
class:
"#{dom_class(member)} js-toggle-container"
,
id:
dom_id
(
member
)}
%span
{
class:
(
"list-item-name"
if
show_controls
)}
%span
{
class:
(
"list-item-name"
if
show_controls
)}
=
image_tag
avatar_icon
(
user
.
email
,
16
),
class:
"avatar s16"
,
alt:
''
-
if
member
.
user
%strong
=
user
.
name
=
image_tag
avatar_icon
(
user
.
email
,
16
),
class:
"avatar s16"
,
alt:
''
%span
.cgray
=
user
.
username
%strong
=
user
.
name
-
if
user
==
current_user
%span
.cgray
=
user
.
username
%span
.label.label-success
It's you
-
if
user
==
current_user
-
if
user
.
blocked?
%span
.label.label-success
It's you
%label
.label.label-danger
-
if
user
.
blocked?
%strong
Blocked
%label
.label.label-danger
%strong
Blocked
-
else
=
image_tag
avatar_icon
(
member
.
invite_email
,
16
),
class:
"avatar s16"
,
alt:
''
%strong
=
member
.
invite_email
%span
.cgray
invited
-
if
member
.
created_by
by
=
link_to
member
.
created_by
.
name
,
user_path
(
member
.
created_by
)
=
time_ago_with_tooltip
(
member
.
created_at
)
-
if
show_roles
-
if
show_roles
%span
.pull-right
%span
.pull-right
...
@@ -27,7 +38,7 @@
...
@@ -27,7 +38,7 @@
=
link_to
leave_group_group_members_path
(
@group
),
data:
{
confirm:
leave_group_message
(
@group
.
name
)},
method: :delete
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from group'
do
=
link_to
leave_group_group_members_path
(
@group
),
data:
{
confirm:
leave_group_message
(
@group
.
name
)},
method: :delete
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from group'
do
%i
.fa.fa-minus.fa-inverse
%i
.fa.fa-minus.fa-inverse
-
else
-
else
=
link_to
group_group_member_path
(
@group
,
member
),
data:
{
confirm:
remove_user_from_group_message
(
@group
,
us
er
)
},
method: :delete
,
remote:
true
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from group'
do
=
link_to
group_group_member_path
(
@group
,
member
),
data:
{
confirm:
remove_user_from_group_message
(
@group
,
memb
er
)
},
method: :delete
,
remote:
true
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from group'
do
%i
.fa.fa-minus.fa-inverse
%i
.fa.fa-minus.fa-inverse
.edit-member.hide.js-toggle-content
.edit-member.hide.js-toggle-content
...
...
app/views/projects/project_members/_project_member.html.haml
View file @
2a1d4255
-
user
=
member
.
user
-
user
=
member
.
user
-
return
unless
user
-
return
unless
user
||
member
.
invite?
%li
{
class:
"#{dom_class(member)} js-toggle-container project_member_row access-#{member.human_access.downcase}"
,
id:
dom_id
(
member
)}
%li
{
class:
"#{dom_class(member)} js-toggle-container project_member_row access-#{member.human_access.downcase}"
,
id:
dom_id
(
member
)}
%span
.list-item-name
%span
.list-item-name
=
image_tag
avatar_icon
(
user
.
email
,
16
),
class:
"avatar s16"
,
alt:
''
-
if
member
.
user
%strong
=
user
.
name
=
image_tag
avatar_icon
(
user
.
email
,
16
),
class:
"avatar s16"
,
alt:
''
%span
.cgray
=
user
.
username
%strong
-
if
user
==
current_user
=
link_to
user
.
name
,
user_path
(
user
)
%span
.label.label-success
It's you
%span
.cgray
=
user
.
username
-
if
user
.
blocked?
-
if
user
==
current_user
%label
.label.label-danger
%span
.label.label-success
It's you
%strong
Blocked
-
if
user
.
blocked?
%label
.label.label-danger
%strong
Blocked
-
else
=
image_tag
avatar_icon
(
member
.
invite_email
,
16
),
class:
"avatar s16"
,
alt:
''
%strong
=
member
.
invite_email
%span
.cgray
invited
-
if
member
.
created_by
by
=
link_to
member
.
created_by
.
name
,
user_path
(
member
.
created_by
)
=
time_ago_with_tooltip
(
member
.
created_at
)
-
if
current_user_can_admin_project
-
if
current_user_can_admin_project
-
unless
@project
.
personal?
&&
user
==
current_user
-
unless
@project
.
personal?
&&
user
==
current_user
...
@@ -25,7 +37,7 @@
...
@@ -25,7 +37,7 @@
=
link_to
leave_namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
data:
{
confirm:
"Leave project?"
},
method: :delete
,
class:
"btn-xs btn btn-remove"
,
title:
'Leave project'
do
=
link_to
leave_namespace_project_project_members_path
(
@project
.
namespace
,
@project
),
data:
{
confirm:
"Leave project?"
},
method: :delete
,
class:
"btn-xs btn btn-remove"
,
title:
'Leave project'
do
%i
.fa.fa-minus.fa-inverse
%i
.fa.fa-minus.fa-inverse
-
else
-
else
=
link_to
namespace_project_project_member_path
(
@project
.
namespace
,
@project
,
member
),
data:
{
confirm:
remove_from_project_team_message
(
@project
,
us
er
)
},
method: :delete
,
remote:
true
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from team'
do
=
link_to
namespace_project_project_member_path
(
@project
.
namespace
,
@project
,
member
),
data:
{
confirm:
remove_from_project_team_message
(
@project
,
memb
er
)
},
method: :delete
,
remote:
true
,
class:
"btn-xs btn btn-remove"
,
title:
'Remove user from team'
do
%i
.fa.fa-minus.fa-inverse
%i
.fa.fa-minus.fa-inverse
.edit-member.hide.js-toggle-content
.edit-member.hide.js-toggle-content
...
...
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