Commit 21c70354 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Restyle group members page a bit

parent 65eddc00
= form_for @users_group, url: group_users_groups_path(@group) do |f| = form_for @users_group, url: group_users_groups_path(@group) do |f|
%fieldset %fieldset
%legend= "New Group member(s) for #{@group.name}" %legend
New member(s) for
%strong #{@group.name}
group
%h6 1. Choose users you want in the group %p 1. Choose users you want in the group
.clearfix .clearfix
= f.label :user_ids, "People" = f.label :user_ids, "People"
.input= users_select_tag(:user_ids, multiple: true, class: 'input-large') .input= users_select_tag(:user_ids, multiple: true, class: 'input-large')
%h6 2. Set access level for them %p 2. Set access level for them
.clearfix .clearfix
= f.label :group_access, "Group Access" = f.label :group_access, "Group Access"
.input= select_tag :group_access, options_for_select(UsersGroup.group_access_roles, @users_group.group_access), class: "project-access-select chosen" .input= select_tag :group_access, options_for_select(UsersGroup.group_access_roles, @users_group.group_access), class: "project-access-select chosen"
......
%h3.page-title
Group members
%p.light
Members of group have access to all group projects.
%hr
- can_manage_group = current_user.can? :manage_group, @group - can_manage_group = current_user.can? :manage_group, @group
.row .ui-box
.span6
- if can_manage_group
= render "new_group_member"
- else
.light-well
%h4.nothing_here_message
Only group owners can manage group members
.span6
.ui-box
.title .title
%strong #{@group.name} %strong #{@group.name}
Group Members group members
%small %small
(#{@members.count}) (#{@members.count})
%ul.well-list %ul.well-list
- @members.each do |member| - @members.each do |member|
= render 'users_groups/users_group', member: member, show_controls: can_manage_group = render 'users_groups/users_group', member: member, show_controls: can_manage_group
%p.light - if can_manage_group
Group members get access to all projects in this group = render "new_group_member"
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