Restyle group members page a bit

This commit is contained in:
Dmitriy Zaporozhets 2013-08-06 20:12:20 +03:00
parent 65eddc00ad
commit 21c70354f6
2 changed files with 22 additions and 23 deletions

View file

@ -1,13 +1,16 @@
= form_for @users_group, url: group_users_groups_path(@group) do |f|
%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
= f.label :user_ids, "People"
.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
= 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"

View file

@ -1,21 +1,17 @@
%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
.row
.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
%strong #{@group.name}
Group Members
%small
(#{@members.count})
%ul.well-list
- @members.each do |member|
= render 'users_groups/users_group', member: member, show_controls: can_manage_group
%p.light
Group members get access to all projects in this group
.ui-box
.title
%strong #{@group.name}
group members
%small
(#{@members.count})
%ul.well-list
- @members.each do |member|
= render 'users_groups/users_group', member: member, show_controls: can_manage_group
- if can_manage_group
= render "new_group_member"