diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-10 15:14:14 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-14 12:07:33 +0200 |
commit | 2a1d4255da396d37579e25dd88d5a9ea76116c22 (patch) | |
tree | 13294a9674a141172fc12712f17d63e5bc27836f /app/views/projects/project_members/_project_member.html.haml | |
parent | cee98f22478b5ec27f91da04fe564a9760f79a38 (diff) | |
download | gitlab-ce-2a1d4255da396d37579e25dd88d5a9ea76116c22.tar.gz |
Correctly render invite members without user.
Diffstat (limited to 'app/views/projects/project_members/_project_member.html.haml')
-rw-r--r-- | app/views/projects/project_members/_project_member.html.haml | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/app/views/projects/project_members/_project_member.html.haml b/app/views/projects/project_members/_project_member.html.haml index 67d703a4121..4be531deddd 100644 --- a/app/views/projects/project_members/_project_member.html.haml +++ b/app/views/projects/project_members/_project_member.html.haml @@ -1,16 +1,28 @@ - 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)} %span.list-item-name - = image_tag avatar_icon(user.email, 16), class: "avatar s16", alt: '' - %strong= user.name - %span.cgray= user.username - - if user == current_user - %span.label.label-success It's you - - if user.blocked? - %label.label.label-danger - %strong Blocked + - if member.user + = image_tag avatar_icon(user.email, 16), class: "avatar s16", alt: '' + %strong + = link_to user.name, user_path(user) + %span.cgray= user.username + - if user == current_user + %span.label.label-success It's you + - 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 - unless @project.personal? && user == current_user @@ -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 %i.fa.fa-minus.fa-inverse - else - = link_to namespace_project_project_member_path(@project.namespace, @project, member), data: { confirm: remove_from_project_team_message(@project, user) }, 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, member) }, method: :delete, remote: true, class: "btn-xs btn btn-remove", title: 'Remove user from team' do %i.fa.fa-minus.fa-inverse .edit-member.hide.js-toggle-content |