37 lines
1.8 KiB
Text
37 lines
1.8 KiB
Text
- user = member.user
|
|
- return unless user
|
|
|
|
%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"
|
|
%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 current_user_can_admin_project
|
|
- unless @project.personal? && user == current_user
|
|
.pull-right
|
|
%strong= member.human_access
|
|
= button_tag class: "btn-xs btn js-toggle-button",
|
|
title: 'Edit access level', type: 'button' do
|
|
%i.fa.fa-pencil-square-o
|
|
|
|
|
|
- if current_user == user
|
|
= 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, user), 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
|
|
%i.fa.fa-minus.fa-inverse
|
|
|
|
.edit-member.hide.js-toggle-content
|
|
%br
|
|
= form_for member, as: :project_member, url: namespace_project_project_member_path(@project.namespace, @project, member.user), remote: true do |f|
|
|
.prepend-top-10
|
|
= f.select :access_level, options_for_select(ProjectMember.access_roles, member.access_level), {}, class: 'form-control'
|
|
.prepend-top-10
|
|
= f.submit 'Save', class: 'btn btn-save'
|