24 lines
1.5 KiB
Text
24 lines
1.5 KiB
Text
- project = local_assigns.fetch(:project)
|
|
- members = local_assigns.fetch(:members)
|
|
- group = local_assigns.fetch(:group)
|
|
- current_user_is_group_owner = group && group.has_owner?(current_user)
|
|
|
|
.card
|
|
.card-header.flex-project-members-panel
|
|
%span.flex-project-title
|
|
= html_escape(_("Members of %{strong_open}%{project_name}%{strong_close}")) % { project_name: sanitize(project.name, tags: []), strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe }
|
|
%span.badge.badge-pill= members.total_count
|
|
= form_tag project_project_members_path(project), method: :get, class: 'form-inline user-search-form flex-users-form' do
|
|
.form-group
|
|
.position-relative
|
|
= search_field_tag :search, params[:search], { placeholder: _('Find existing members by name'), class: 'form-control', spellcheck: false }
|
|
%button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") }
|
|
= sprite_icon('search', css_class: 'gl-vertical-align-middle!')
|
|
= label_tag :sort_by, _('Sort by'), class: 'col-form-label label-bold px-2'
|
|
= render 'shared/members/sort_dropdown'
|
|
%ul.content-list.members-list{ data: { qa_selector: 'members_list', testid: 'members-table' } }
|
|
= render partial: 'shared/members/member',
|
|
collection: members, as: :member,
|
|
locals: { membership_source: project,
|
|
group: group,
|
|
current_user_is_group_owner: current_user_is_group_owner }
|