debian-mirror-gitlab/app/views/admin/users/projects.html.haml

49 lines
2 KiB
Text
Raw Normal View History

2017-08-17 22:00:37 +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?
.panel.panel-default
.panel-heading Group projects
%ul.well-list
2017-08-17 22:00:37 +05:30
- @user.group_members.includes(:source).each do |group_member|
- 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')}
2017-08-17 22:00:37 +05:30
.pull-right
%span.light.vertical-align-middle= group_member.human_access
- unless group_member.owner?
= link_to group_group_member_path(group, group_member), data: { confirm: remove_member_message(group_member) }, method: :delete, remote: true, class: "btn-xs btn btn-remove prepend-left-10", title: 'Remove user from group' do
%i.fa.fa-times.fa-inverse
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
.nothing-here-block This user has no personal projects.
.col-md-6
.panel.panel-default
.panel-heading Joined projects (#{@joined_projects.count})
%ul.well-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
.pull-right
- if member.owner?
%span.light Owner
- 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
2017-09-10 17:25:29 +05:30
= link_to project_project_member_path(project, member), data: { confirm: remove_member_message(member) }, remote: true, method: :delete, class: "btn-xs btn btn-remove prepend-left-10", title: 'Remove user from project' do
2015-09-11 14:41:01 +05:30
%i.fa.fa-times