2018-03-17 18:26:18 +05:30
|
|
|
- project = local_assigns.fetch(:project)
|
|
|
|
- members = local_assigns.fetch(:members)
|
2021-01-29 00:20:46 +05:30
|
|
|
- group = local_assigns.fetch(:group)
|
|
|
|
- current_user_is_group_owner = group && group.has_owner?(current_user)
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
.card
|
|
|
|
.card-header.flex-project-members-panel
|
2017-08-17 22:00:37 +05:30
|
|
|
%span.flex-project-title
|
2020-10-24 23:57:45 +05:30
|
|
|
= 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 }
|
2018-11-08 19:23:39 +05:30
|
|
|
%span.badge.badge-pill= members.total_count
|
2019-10-12 21:52:04 +05:30
|
|
|
= form_tag project_project_members_path(project), method: :get, class: 'form-inline user-search-form flex-users-form' do
|
2017-08-17 22:00:37 +05:30
|
|
|
.form-group
|
2018-11-08 19:23:39 +05:30
|
|
|
.position-relative
|
2019-03-02 22:35:43 +05:30
|
|
|
= search_field_tag :search, params[:search], { placeholder: _('Find existing members by name'), class: 'form-control', spellcheck: false }
|
2019-10-12 21:52:04 +05:30
|
|
|
%button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") }
|
2021-01-03 14:25:43 +05:30
|
|
|
= sprite_icon('search', css_class: 'gl-vertical-align-middle!')
|
2020-10-24 23:57:45 +05:30
|
|
|
= label_tag :sort_by, _('Sort by'), class: 'col-form-label label-bold px-2'
|
2017-08-17 22:00:37 +05:30
|
|
|
= render 'shared/members/sort_dropdown'
|
2021-01-29 00:20:46 +05:30
|
|
|
%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 }
|