Commit fed6ab24 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Change representation of team members. Group by role

parent 61c74493
......@@ -108,7 +108,7 @@ GEM
bcrypt-ruby (3.0.1)
blankslate (2.1.2.4)
bootstrap-sass (2.0.4.0)
builder (3.0.0)
builder (3.0.2)
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
......@@ -125,7 +125,7 @@ GEM
charlock_holmes (0.6.8)
childprocess (0.3.2)
ffi (~> 1.0.6)
chosen-rails (0.9.8)
chosen-rails (0.9.8.3)
railties (~> 3.0)
thor (~> 0.14)
coderay (1.0.6)
......
......@@ -3,7 +3,7 @@
= link_to "Add new", new_key_path, class: "btn right"
%hr
%p.slead
%p.slead
SSH key allows you to establish a secure connection between your computer and GitLab
......@@ -15,7 +15,7 @@
%th
- @keys.each do |key|
= render(partial: 'show', locals: {key: key})
- if @keys.blank?
- if @keys.blank?
%tr
%td{colspan: 3}
%h3.nothing_here_message There are no SSH keys with access to your account.
......
%table
%thead
%tr
%th User
%th Permissions
%tbody
- @project.users_projects.each do |up|
= render(partial: 'team_members/show', locals: {member: up})
- @project.users_projects.group_by(&:project_access).each do |access, members|
%table
%thead
%tr
%th.span7= Project.access_options.key(access).pluralize
%th
%tbody
- members.each do |up|
= render(partial: 'team_members/show', locals: {member: up})
:javascript
......
......@@ -2,12 +2,6 @@
- allow_admin = can? current_user, :admin_project, @project
%tr{id: dom_id(member), class: "team_member_row user_#{user.id}"}
%td
.right
- if @project.owner == user
%span.label Project Owner
- if user.blocked
%span.label Blocked
= link_to project_team_member_path(@project, member), title: user.name, class: "dark" do
= image_tag gravatar_icon(user.email, 40), class: "avatar s32"
= link_to project_team_member_path(@project, member), title: user.name, class: "dark" do
......@@ -16,5 +10,11 @@
%div.cgray= user.email
%td
= form_for(member, as: :team_member, url: project_team_member_path(@project, member)) do |f|
= f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select", disabled: !allow_admin
.right
- if @project.owner == user
%span.btn.disabled.success Project Owner
- if user.blocked
%span.btn.disabled.blocked Blocked
- if allow_admin
= form_for(member, as: :team_member, url: project_team_member_path(@project, member)) do |f|
= f.select :project_access, options_for_select(UsersProject.access_roles, member.project_access), {}, class: "medium project-access-select"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment