BigW Consortium Gitlab

projects.html.haml 1.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
- page_title "Projects", @user.name, "Users"
= render 'admin/users/head'

- if @user.groups.any?
  .panel.panel-default
    .panel-heading Group projects
    %ul.well-list
      - @user.groups.each do |group|
        %li
          %strong= group.name
          – access to
          #{pluralize(group.projects.count, 'project')}

.row
  .col-md-6
    - if @personal_projects.present?
17
      = render 'admin/users/projects', projects: @personal_projects
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
    - 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
        - @joined_projects.sort_by(&:name_with_namespace).each do |project|
          - member = project.team.find_member(@user.id)
          %li.project_member
            .list-item-name
              = link_to admin_namespace_project_path(project.namespace, project), class: dom_class(project) do
                = project.name_with_namespace

            - if member
              .pull-right
                - if member.owner?
                  %span.light Owner
                - else
                  %span.light= member.human_access

                  - if member.respond_to? :project
41
                    = link_to namespace_project_project_member_path(project.namespace, project, member), data: { confirm: remove_member_message(member) }, remote: true, method: :delete, class: "btn-xs btn btn-remove", title: 'Remove user from project' do
42
                      %i.fa.fa-times