summaryrefslogtreecommitdiff
path: root/app/views/shared/members
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-12-02 16:48:34 +0000
committerPhil Hughes <me@iamphill.com>2016-12-02 16:50:08 +0000
commitcc66ec2b73d6fa581f5300957597615ed1b58c55 (patch)
tree39dfc83febf58e6d7bb1388925a96145fcaf55ce /app/views/shared/members
parent89c22ed5af490f250800030ee4342c185dbc5358 (diff)
downloadgitlab-ce-cc66ec2b73d6fa581f5300957597615ed1b58c55.tar.gz
Fixed Ruby to be better for performance
Fixed controls not showing in groups which fixes tests
Diffstat (limited to 'app/views/shared/members')
-rw-r--r--app/views/shared/members/_member.html.haml10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml
index bf42c9080a6..aa5b39151e6 100644
--- a/app/views/shared/members/_member.html.haml
+++ b/app/views/shared/members/_member.html.haml
@@ -12,10 +12,6 @@
= link_to user.name, user_path(user)
%span.cgray= user.to_reference
- - if member.real_source_type == 'Group'
- &middot;
- %span.cblue=member.group.name
-
- if user == current_user
%span.label.label-success.prepend-left-5 It's you
@@ -24,8 +20,8 @@
%strong Blocked
- if source.instance_of?(Group) && !@group
- = link_to source, class: "member-group-link prepend-left-5" do
- = "ยท #{source.name}"
+ &middot;
+ = link_to source.name, source, class: "member-group-link"
.hidden-xs.cgray
- if member.request?
@@ -49,7 +45,7 @@
= time_ago_with_tooltip(member.created_at)
- if show_roles
.controls.member-controls
- - if show_controls && member.real_source_type == 'Project'
+ - if show_controls && (member.respond_to?(:group) && @members) || (member.respond_to?(:project) && @project_members)
- if user != current_user
= form_for member, remote: true, html: { class: 'form-horizontal js-edit-member-form' } do |f|
= f.select :access_level, options_for_select(member.class.access_level_roles, member.access_level), {}, class: 'form-control member-form-control append-right-5 js-member-update-control', id: "member_access_level_#{member.id}", disabled: !can_admin_member