Commit ccf76831 authored by Phil Hughes's avatar Phil Hughes

Updated groups member UI to match

parent a56216c8
......@@ -127,12 +127,12 @@
break;
case 'groups:group_members:index':
new gl.MemberExpirationDate();
new GroupMembers();
new gl.Members();
new UsersSelect();
break;
case 'projects:project_members:index':
new gl.MemberExpirationDate();
new gl.ProjectMembers();
new gl.Members();
new UsersSelect();
break;
case 'groups:new':
......
(function() {
this.GroupMembers = (function() {
function GroupMembers() {
$('li.group_member').bind('ajax:success', function() {
return $(this).fadeOut();
});
}
return GroupMembers;
})();
}).call(this);
((w) => {
w.gl = w.gl || {};
class ProjectMembers {
class Members {
constructor() {
this.removeListeners();
this.addListeners();
......@@ -41,5 +41,5 @@
}
}
gl.ProjectMembers = ProjectMembers;
gl.Members = Members;
})(window);
= form_for @group_member, url: group_group_members_path(@group), html: { class: 'form-horizontal users-group-form' } do |f|
.form-group
= f.label :user_ids, "People", class: 'control-label'
.col-sm-10
= users_select_tag(:user_ids, multiple: true, class: 'input-large', scope: :all, email_user: true)
.help-block
= form_for @group_member, url: group_group_members_path(@group), html: { class: 'users-project-form users-group-form' } do |f|
.row
.col-md-4.col-lg-6
= users_select_tag(:user_ids, multiple: true, class: 'input-full', scope: :all, email_user: true)
.help-block.append-bottom-10
Search for users by name, username, or email, or invite new ones using their email address.
.form-group
= f.label :access_level, "Group Access", class: 'control-label'
.col-sm-10
= select_tag :access_level, options_for_select(GroupMember.access_level_roles, @group_member.access_level), class: "project-access-select select2"
.help-block
Read more about role permissions
%strong= link_to "here", help_page_path("user/permissions"), class: "vlink"
.col-md-3.col-lg-2
= select_tag :access_level, options_for_select(GroupMember.access_level_roles, @group_member.access_level), class: "form-control project-access-select"
.help-block.append-bottom-10
= link_to "Read more", help_page_path("user/permissions"), class: "vlink"
about role permissions
.form-group
= f.label :expires_at, 'Access expiration date', class: 'control-label'
.col-sm-10
.col-md-3.col-lg-2
.clearable-input
= text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date', placeholder: 'Select access expiration date'
= text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date', placeholder: 'Expiration date'
%i.clear-icon.js-clear-input
.help-block
.help-block.append-bottom-10
On this date, the user(s) will automatically lose access to this group and all of its projects.
.form-actions
= f.submit 'Add users to group', class: "btn btn-create"
.col-md-2
= f.submit 'Add to group', class: "btn btn-create btn-block"
- page_title "Members"
.group-members-page.prepend-top-default
.project-members-page.prepend-top-default
%h4
Members
%hr
- if can?(current_user, :admin_group_member, @group)
.panel.panel-default
.panel-heading
Add new user to group
.panel-body
%p.light
Members of group have access to all group projects.
.new-group-member-holder
= render "new_group_member"
.project-members-new.append-bottom-default
%h5.clearfix
Add new user to
%strong= @group.name
= render "new_group_member"
= render 'shared/members/requests', membership_source: @group, requesters: @requesters
.append-bottom-default.clearfix
%h5.member.existing-title
Existing users
= form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form' do
.form-group
= search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false }
%button.member-search-btn{ type: "submit", "aria-label" => "Submit search" }
= icon("search")
.panel.panel-default
.panel-heading
Users with access to
%strong #{@group.name}
group members
%span.badge= @members.total_count
.controls
= form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form' do
.form-group
= search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control', spellcheck: false }
= button_tag class: 'btn', title: 'Search' do
= icon("search")
%ul.content-list
= render partial: 'shared/members/member', collection: @members, as: :member
= paginate @members, theme: 'gitlab'
:javascript
$('form.member-search-form').on('submit', function(event) {
event.preventDefault();
Turbolinks.visit(this.action + '?' + $(this).serialize());
});
- page_title "Members"
.project-members-page.js-project-members-page.prepend-top-default
.project-members-page.prepend-top-default
%h4.clearfix
Members
= link_to "Import", import_namespace_project_project_members_path(@project.namespace, @project), class: "btn btn-default pull-right hidden-xs", title: "Import members from another project"
......
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