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)
......
%table
- @project.users_projects.group_by(&:project_access).each do |access, members|
%table
%thead
%tr
%th User
%th Permissions
%th.span7= Project.access_options.key(access).pluralize
%th
%tbody
- @project.users_projects.each do |up|
- members.each do |up|
= render(partial: 'team_members/show', locals: {member: up})
......
......@@ -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
.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", disabled: !allow_admin
= 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