Commit 72139167 authored by Marin Jankovski's avatar Marin Jankovski

Mockup of shared group memeber list at project member page.

parent b9dc8e59
...@@ -7,6 +7,7 @@ class Projects::TeamMembersController < Projects::ApplicationController ...@@ -7,6 +7,7 @@ class Projects::TeamMembersController < Projects::ApplicationController
def index def index
@group = @project.group @group = @project.group
@users_projects = @project.users_projects.order('project_access DESC') @users_projects = @project.users_projects.order('project_access DESC')
@project_group_links = @project.project_group_links
end end
def new def new
......
...@@ -14,3 +14,23 @@ ...@@ -14,3 +14,23 @@
= render "team", members: @users_projects = render "team", members: @users_projects
- if @group - if @group
= render "group_members" = render "group_members"
- if @project_group_links.any?
- @project_group_links.each do |group_links|
- shared_group = group_links.group
- shared_group_users_count = group_links.group.users_groups.count
.panel.panel-default
.panel-heading
Shared with
%strong #{shared_group.name}
group, members with
%strong #{group_links.human_access}
role (#{shared_group_users_count})
.pull-right
= link_to members_group_path(shared_group), class: 'btn btn-small' do
%i.icon-edit
%ul.well-list
- shared_group.users_groups.order('group_access DESC').limit(20).each do |member|
= render 'users_groups/users_group', member: member, show_controls: false, show_roles: false
- if shared_group_users_count > 20
%li
and #{shared_group_users_count - 20} more. For full list visit #{link_to 'group members page', members_group_path(shared_group)}
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