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