Resolve CE/EE diffs in new group member view
Part of single codebase changes.
This commit is contained in:
parent
2d8ba2db67
commit
d95043b63b
3 changed files with 25 additions and 1 deletions
7
app/helpers/groups/group_members_helper.rb
Normal file
7
app/helpers/groups/group_members_helper.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module Groups::GroupMembersHelper
|
||||
def group_member_select_options
|
||||
{ multiple: true, class: 'input-clamp', scope: :all, email_user: true }
|
||||
end
|
||||
end
|
|
@ -1,7 +1,7 @@
|
|||
= 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-clamp', scope: :all, email_user: true)
|
||||
= users_select_tag(:user_ids, group_member_select_options)
|
||||
.form-text.text-muted.append-bottom-10
|
||||
Search for members by name, username, or email, or invite new ones using their email address.
|
||||
|
||||
|
|
17
spec/helpers/groups/group_members_helper_spec.rb
Normal file
17
spec/helpers/groups/group_members_helper_spec.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "spec_helper"
|
||||
|
||||
describe Groups::GroupMembersHelper do
|
||||
describe '.group_member_select_options' do
|
||||
let(:group) { create(:group) }
|
||||
|
||||
before do
|
||||
helper.instance_variable_set(:@group, group)
|
||||
end
|
||||
|
||||
it 'returns an options hash' do
|
||||
expect(helper.group_member_select_options).to include(multiple: true, scope: :all, email_user: true)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue