2013-07-31 10:39:57 -04:00
|
|
|
%h3.page-title
|
2015-02-23 13:40:06 -05:00
|
|
|
Group Membership
|
2013-08-01 15:35:40 -04:00
|
|
|
- if current_user.can_create_group?
|
|
|
|
%span.pull-right
|
|
|
|
= link_to new_group_path, class: "btn btn-new" do
|
2014-10-01 18:21:29 -04:00
|
|
|
%i.fa.fa-plus
|
2013-08-01 15:35:40 -04:00
|
|
|
New Group
|
2013-07-31 10:39:57 -04:00
|
|
|
%p.light
|
2015-02-23 13:40:06 -05:00
|
|
|
Group members have access to all group projects.
|
2013-07-31 10:39:57 -04:00
|
|
|
%hr
|
2014-05-29 11:42:44 -04:00
|
|
|
.panel.panel-default
|
2014-05-29 11:43:21 -04:00
|
|
|
.panel-heading
|
2013-07-12 11:29:39 -04:00
|
|
|
%strong Groups
|
2015-03-13 11:16:51 -04:00
|
|
|
(#{@group_members.count})
|
2013-07-12 11:22:03 -04:00
|
|
|
%ul.well-list
|
2015-03-13 11:16:51 -04:00
|
|
|
- @group_members.each do |group_member|
|
|
|
|
- group = group_member.group
|
2013-07-12 11:22:03 -04:00
|
|
|
%li
|
|
|
|
.pull-right
|
|
|
|
- if can?(current_user, :manage_group, group)
|
2015-03-14 03:29:32 -04:00
|
|
|
= link_to edit_group_path(group), class: "btn-sm btn btn-grouped" do
|
2014-10-01 18:21:29 -04:00
|
|
|
%i.fa.fa-cogs
|
2013-07-12 11:22:03 -04:00
|
|
|
Settings
|
|
|
|
|
2015-03-13 11:16:51 -04:00
|
|
|
- if can?(current_user, :destroy_group_member, group_member)
|
2015-03-13 11:28:33 -04:00
|
|
|
= link_to leave_group_group_members_path(group), data: { confirm: leave_group_message(group.name) }, method: :delete, class: "btn-sm btn btn-grouped", title: 'Remove user from group' do
|
2014-10-01 18:21:29 -04:00
|
|
|
%i.fa.fa-sign-out
|
2014-02-07 11:59:55 -05:00
|
|
|
Leave
|
2013-07-12 11:22:03 -04:00
|
|
|
|
2015-03-12 16:56:53 -04:00
|
|
|
= image_tag group_icon(group), class: "avatar s40 avatar-tile"
|
2013-07-12 11:22:03 -04:00
|
|
|
= link_to group, class: 'group-name' do
|
2013-08-15 06:24:08 -04:00
|
|
|
%strong= group.name
|
2013-07-12 11:29:39 -04:00
|
|
|
|
2013-08-27 05:34:54 -04:00
|
|
|
as
|
2015-03-13 11:16:51 -04:00
|
|
|
%strong #{group_member.human_access}
|
2013-08-06 11:03:13 -04:00
|
|
|
|
2013-08-27 05:34:54 -04:00
|
|
|
%div.light
|
|
|
|
#{pluralize(group.projects.count, "project")}, #{pluralize(group.users.count, "user")}
|
2013-08-06 11:03:13 -04:00
|
|
|
|
2015-03-13 11:16:51 -04:00
|
|
|
= paginate @group_members
|