2020-07-28 23:09:34 +05:30
|
|
|
- add_to_breadcrumbs _("Users"), admin_users_path
|
2018-11-18 11:00:15 +05:30
|
|
|
- breadcrumb_title @user.name
|
2020-07-28 23:09:34 +05:30
|
|
|
- page_title _("Groups and projects"), @user.name, _("Users")
|
2015-09-11 14:41:01 +05:30
|
|
|
= render 'admin/users/head'
|
|
|
|
|
|
|
|
- if @user.groups.any?
|
2018-11-08 19:23:39 +05:30
|
|
|
.card
|
2021-06-08 01:23:25 +05:30
|
|
|
.card-header= _('Group projects')
|
2018-11-08 19:23:39 +05:30
|
|
|
%ul.hover-list
|
2018-12-05 23:21:45 +05:30
|
|
|
- @user.group_members.includes(:source).each do |group_member| # rubocop: disable CodeReuse/ActiveRecord
|
2017-08-17 22:00:37 +05:30
|
|
|
- group = group_member.group
|
|
|
|
%li.group_member
|
|
|
|
%strong= link_to group.name, admin_group_path(group)
|
2015-09-11 14:41:01 +05:30
|
|
|
– access to
|
|
|
|
#{pluralize(group.projects.count, 'project')}
|
2018-11-08 19:23:39 +05:30
|
|
|
.float-right
|
2017-08-17 22:00:37 +05:30
|
|
|
%span.light.vertical-align-middle= group_member.human_access
|
|
|
|
- unless group_member.owner?
|
2020-11-24 15:15:51 +05:30
|
|
|
= link_to group_group_member_path(group, group_member), data: { confirm: remove_member_message(group_member), testid: 'remove-user' }, method: :delete, remote: true, class: "btn btn-sm btn-danger gl-button btn-icon gl-ml-3", title: _('Remove user from group') do
|
|
|
|
= sprite_icon('close', size: 16, css_class: 'gl-icon')
|
2015-09-11 14:41:01 +05:30
|
|
|
|
|
|
|
.row
|
|
|
|
.col-md-6
|
|
|
|
- if @personal_projects.present?
|
2015-12-23 02:04:40 +05:30
|
|
|
= render 'admin/users/projects', projects: @personal_projects
|
2015-09-11 14:41:01 +05:30
|
|
|
- else
|
2021-06-08 01:23:25 +05:30
|
|
|
.nothing-here-block= _('This user has no personal projects.')
|
2015-09-11 14:41:01 +05:30
|
|
|
|
|
|
|
|
|
|
|
.col-md-6
|
2018-11-08 19:23:39 +05:30
|
|
|
.card
|
2021-06-08 01:23:25 +05:30
|
|
|
.card-header= _('Joined projects (%{projects_count})') % { projects_count: @joined_projects.count }
|
2018-11-08 19:23:39 +05:30
|
|
|
%ul.hover-list
|
2018-03-27 19:54:05 +05:30
|
|
|
- @joined_projects.sort_by(&:full_name).each do |project|
|
2015-09-11 14:41:01 +05:30
|
|
|
- member = project.team.find_member(@user.id)
|
|
|
|
%li.project_member
|
|
|
|
.list-item-name
|
2017-09-10 17:25:29 +05:30
|
|
|
= link_to admin_project_path(project), class: dom_class(project) do
|
2018-03-27 19:54:05 +05:30
|
|
|
= project.full_name
|
2015-09-11 14:41:01 +05:30
|
|
|
|
|
|
|
- if member
|
2018-11-08 19:23:39 +05:30
|
|
|
.float-right
|
2015-09-11 14:41:01 +05:30
|
|
|
- if member.owner?
|
2021-06-08 01:23:25 +05:30
|
|
|
%span.light= _('Owner')
|
2015-09-11 14:41:01 +05:30
|
|
|
- else
|
2017-08-17 22:00:37 +05:30
|
|
|
%span.light.vertical-align-middle= member.human_access
|
2015-09-11 14:41:01 +05:30
|
|
|
|
|
|
|
- if member.respond_to? :project
|
2021-06-08 01:23:25 +05:30
|
|
|
= link_to project_project_member_path(project, member), data: { confirm: remove_member_message(member) }, remote: true, method: :delete, class: "btn btn-sm btn-danger gl-button btn-icon gl-ml-3", title: _('Remove user from project') do
|
2020-11-24 15:15:51 +05:30
|
|
|
= sprite_icon('close', size: 16, css_class: 'gl-icon')
|
2021-09-30 23:02:18 +05:30
|
|
|
|
|
|
|
= render partial: 'admin/users/modals'
|