2013-07-31 10:39:57 -04:00
%h3.page-title
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
%i.icon-plus
New Group
2013-07-31 10:39:57 -04:00
%p.light
2013-08-15 14:31:00 -04:00
Group members have access to all a group's projects
2013-07-31 10:39:57 -04:00
%hr
2013-07-12 11:22:03 -04:00
.ui-box
2013-07-13 13:36:21 -04:00
.title
2013-07-12 11:29:39 -04:00
%strong Groups
2013-08-06 11:03:13 -04:00
(#{@user_groups.count})
2013-07-12 11:22:03 -04:00
%ul.well-list
2013-08-06 11:03:13 -04:00
- @user_groups.each do |user_group|
- group = user_group.group
2013-07-12 11:22:03 -04:00
%li
.pull-right
- if can?(current_user, :manage_group, group)
= link_to edit_group_path(group), class: "btn-small btn grouped" do
%i.icon-cogs
Settings
= link_to leave_profile_group_path(group), confirm: "Are you sure you want to leave #{group.name} group?", method: :delete, class: "btn-small btn grouped", title: 'Remove user from group' do
%i.icon-signout
Leave
= 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
%strong #{user_group.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
= paginate @user_groups