Commit dc038a7108f3e61e708310b5a9ab4b193723366b
1 parent
3232f547
Exists in
master
and in
4 other branches
Rename Group#people to Group#members
Showing
11 changed files
with
33 additions
and
33 deletions
Show diff stats
app/assets/javascripts/dispatcher.js.coffee
app/controllers/groups_controller.rb
... | ... | @@ -61,7 +61,7 @@ class GroupsController < ApplicationController |
61 | 61 | end |
62 | 62 | end |
63 | 63 | |
64 | - def people | |
64 | + def members | |
65 | 65 | @project = group.projects.find(params[:project_id]) if params[:project_id] |
66 | 66 | @members = group.users_groups.order('group_access DESC') |
67 | 67 | @users_group = UsersGroup.new | ... | ... |
app/controllers/users_groups_controller.rb
... | ... | @@ -9,7 +9,7 @@ class UsersGroupsController < ApplicationController |
9 | 9 | def create |
10 | 10 | @group.add_users(params[:user_ids].split(','), params[:group_access]) |
11 | 11 | |
12 | - redirect_to people_group_path(@group), notice: 'Users were successfully added.' | |
12 | + redirect_to members_group_path(@group), notice: 'Users were successfully added.' | |
13 | 13 | end |
14 | 14 | |
15 | 15 | def update |
... | ... | @@ -21,7 +21,7 @@ class UsersGroupsController < ApplicationController |
21 | 21 | @users_group.destroy unless @users_group.user == @group.owner |
22 | 22 | |
23 | 23 | respond_to do |format| |
24 | - format.html { redirect_to people_group_path(@group), notice: 'User was successfully removed from group.' } | |
24 | + format.html { redirect_to members_group_path(@group), notice: 'User was successfully removed from group.' } | |
25 | 25 | format.js { render nothing: true } |
26 | 26 | end |
27 | 27 | end | ... | ... |
app/views/groups/_new_group_member.html.haml
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | %fieldset |
3 | 3 | %legend= "New Group member(s) for #{@group.name}" |
4 | 4 | |
5 | - %h6 1. Choose people you want in the group | |
5 | + %h6 1. Choose users you want in the group | |
6 | 6 | .clearfix |
7 | 7 | = f.label :user_ids, "People" |
8 | 8 | .input= users_select_tag(:user_ids, multiple: true, class: 'input-large') |
... | ... | @@ -13,6 +13,5 @@ |
13 | 13 | .input= select_tag :group_access, options_for_select(UsersGroup.group_access_roles, @users_group.group_access), class: "project-access-select chosen" |
14 | 14 | |
15 | 15 | .form-actions |
16 | - = hidden_field_tag :redirect_to, people_group_path(@group) | |
17 | 16 | = f.submit 'Add users into group', class: "btn btn-create" |
18 | 17 | ... | ... |
... | ... | @@ -0,0 +1,21 @@ |
1 | +- can_manage_group = current_user.can? :manage_group, @group | |
2 | +.row | |
3 | + .span6 | |
4 | + - if can_manage_group | |
5 | + = render "new_group_member" | |
6 | + - else | |
7 | + .light-well | |
8 | + %h4.nothing_here_message | |
9 | + Only group owners can manage group members | |
10 | + .span6 | |
11 | + .ui-box | |
12 | + %h5.title | |
13 | + %strong #{@group.name} | |
14 | + Group Members | |
15 | + %small | |
16 | + (#{@members.count}) | |
17 | + %ul.well-list | |
18 | + - @members.each do |member| | |
19 | + = render 'users_groups/users_group', member: member, show_controls: can_manage_group | |
20 | + %p.light | |
21 | + Group members get access to all projects in this group | ... | ... |
app/views/groups/people.html.haml
... | ... | @@ -1,20 +0,0 @@ |
1 | -- can_manage_group = current_user.can? :manage_group, @group | |
2 | -.row | |
3 | - .span6 | |
4 | - - if can_manage_group | |
5 | - = render "new_group_member" | |
6 | - - else | |
7 | - .light-well | |
8 | - %h4.nothing_here_message | |
9 | - Only group owners can manage group members | |
10 | - .span6 | |
11 | - .ui-box | |
12 | - %h5.title | |
13 | - #{@group.name} Group Members | |
14 | - %small | |
15 | - (#{@members.count}) | |
16 | - %ul.well-list | |
17 | - - @members.each do |member| | |
18 | - = render 'users_groups/users_group', member: member, show_controls: can_manage_group | |
19 | - %p.light | |
20 | - Group members get access to all projects in this group |
app/views/layouts/nav/_group.html.haml
... | ... | @@ -10,8 +10,8 @@ |
10 | 10 | = link_to merge_requests_group_path(@group) do |
11 | 11 | Merge Requests |
12 | 12 | %span.count= current_user.cared_merge_requests.opened.of_group(@group).count |
13 | - = nav_link(path: 'groups#people') do | |
14 | - = link_to "People", people_group_path(@group) | |
13 | + = nav_link(path: 'groups#members') do | |
14 | + = link_to "Members", members_group_path(@group) | |
15 | 15 | |
16 | 16 | - if can?(current_user, :manage_group, @group) |
17 | 17 | = nav_link(path: 'groups#edit') do | ... | ... |
app/views/projects/team_members/_group_members.html.haml
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | %strong #{@group.name} Group |
4 | 4 | members (#{@group.users_groups.count}) |
5 | 5 | .pull-right |
6 | - = link_to people_group_path(@group), class: 'btn btn-small' do | |
6 | + = link_to members_group_path(@group), class: 'btn btn-small' do | |
7 | 7 | %i.icon-edit |
8 | 8 | %ul.well-list |
9 | 9 | - @group.users_groups.order('group_access DESC').each do |member| | ... | ... |
config/routes.rb
features/group/group.feature
... | ... | @@ -22,7 +22,7 @@ Feature: Groups |
22 | 22 | @javascript |
23 | 23 | Scenario: I should add user to projects in Group |
24 | 24 | Given I have new user "John" |
25 | - When I visit group people page | |
25 | + When I visit group members page | |
26 | 26 | And I select user "John" from list with role "Reporter" |
27 | 27 | Then I should see user "John" in team list |
28 | 28 | ... | ... |
features/steps/shared/paths.rb
... | ... | @@ -21,8 +21,8 @@ module SharedPaths |
21 | 21 | visit merge_requests_group_path(current_group) |
22 | 22 | end |
23 | 23 | |
24 | - step 'I visit group people page' do | |
25 | - visit people_group_path(current_group) | |
24 | + step 'I visit group members page' do | |
25 | + visit members_group_path(current_group) | |
26 | 26 | end |
27 | 27 | |
28 | 28 | step 'I visit group settings page' do | ... | ... |