summaryrefslogtreecommitdiff
path: root/app/views/admin/groups/show.html.haml
blob: 5ec612d0c72bcb73b60c92d191e5ee618bc7ec8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
- add_to_breadcrumbs "Groups", admin_groups_path
- breadcrumb_title @group.name
- page_title @group.name, "Groups"
%h3.page-title
  Group: #{@group.full_name}

  = link_to admin_group_edit_path(@group), class: "btn float-right" do
    %i.fa.fa-pencil-square-o
    Edit
%hr
.row
  .col-md-6
    .card
      .card-header
        Group info:
      %ul.well-list
        %li
          .avatar-container.s60
            = group_icon(@group, class: "avatar s60")
        %li
          %span.light Name:
          %strong= @group.name
        %li
          %span.light Path:
          %strong
            = @group.path

        %li
          %span.light Description:
          %strong
            = @group.description

        %li
          %span.light Visibility level:
          %strong
            = visibility_level_label(@group.visibility_level)

        %li
          %span.light Created on:
          %strong
            = @group.created_at.to_s(:medium)

        %li
          %span.light Storage:
          %strong= storage_counter(@group.storage_size)
          (
          = storage_counter(@group.repository_size)
          repositories,
          = storage_counter(@group.build_artifacts_size)
          build artifacts,
          = storage_counter(@group.lfs_objects_size)
          LFS
          )

        %li
          %span.light Group Git LFS status:
          %strong
            = group_lfs_status(@group)
            = link_to icon('question-circle'), help_page_path('workflow/lfs/manage_large_binaries_with_git_lfs')

    .card
      .card-header
        %h3.card-title
          Projects
          %span.badge.badge-pill
            #{@group.projects.count}
      %ul.well-list
        - @projects.each do |project|
          %li
            %strong
              = link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project]
              %span.badge.badge-pill
                = storage_counter(project.statistics.storage_size)
            %span.float-right.light
              %span.monospace= project.full_path + '.git'
      .card-footer
        = paginate @projects, param_name: 'projects_page', theme: 'gitlab'

    - if @group.shared_projects.any?
      .card
        .card-header
          Projects shared with #{@group.name}
          %span.badge.badge-pill
            #{@group.shared_projects.count}
        %ul.well-list
          - @group.shared_projects.sort_by(&:name).each do |project|
            %li
              %strong
                = link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project]
                %span.badge.badge-pill
                  = storage_counter(project.statistics.storage_size)
              %span.float-right.light
                %span.monospace= project.full_path + '.git'

  .col-md-6
    - if can?(current_user, :admin_group_member, @group)
      .card
        .card-header
          Add user(s) to the group:
        .card-body.form-holder
          %p.light
            Read more about project permissions
            %strong= link_to "here", help_page_path("user/permissions"), class: "vlink"

          = form_tag admin_group_members_update_path(@group), id: "new_project_member", class: "bulk_import", method: :put  do
            %div
              = users_select_tag(:user_ids, multiple: true, email_user: true, scope: :all)
            .prepend-top-10
              = select_tag :access_level, options_for_select(GroupMember.access_level_roles), class: "project-access-select select2"
            %hr
            = button_tag 'Add users to group', class: "btn btn-create"
      = render 'shared/members/requests', membership_source: @group, requesters: @requesters, force_mobile_view: true

    .card
      .card-header
        %strong= @group.name
        group members
        %span.badge.badge-pill= @group.members.size
        .float-right
          = link_to icon('pencil-square-o', text: 'Manage access'), polymorphic_url([@group, :members]), class: "btn btn-sm"
      %ul.well-list.group-users-list.content-list.members-list
        = render partial: 'shared/members/member', collection: @members, as: :member, locals: { show_controls: false }
      .card-footer
        = paginate @members, param_name: 'members_page', theme: 'gitlab'