summaryrefslogtreecommitdiff
path: root/app/views/admin/groups/show.html.haml
blob: b949d08718ac2312f722767153e7a6f972b277f1 (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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
- add_to_breadcrumbs _("Groups"), admin_groups_path
- breadcrumb_title @group.name
- page_title @group.name, _("Groups")
- current_user_is_group_owner = @group && @group.has_owner?(current_user)

.js-remove-member-modal
%h3.page-title
  = _('Group: %{group_name}') % { group_name: @group.full_name }

  = link_to admin_group_edit_path(@group), class: "btn btn-default gl-button float-right", data: { qa_selector: 'edit_group_link' } do
    = sprite_icon('pencil-square', css_class: 'gl-icon')
    = _('Edit')
%hr
.row
  .col-md-6
    .card
      .card-header
        = _('Group info:')
      %ul.content-list
        %li
          .avatar-container.rect-avatar.s60
            = group_icon(@group, class: "avatar s60")
        %li
          %span.light= _('Name:')
          %strong
            = link_to @group.name, group_path(@group)
        %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= _('ID:')
          %strong
            = @group.id

        = render_if_exists 'admin/namespace_plan_info', namespace: @group

        %li
          = render 'shared/storage_counter_statistics', storage_size: @group.storage_size, storage_details: @group

        %li
          %span.light= _('Group Git LFS status:')
          %strong
            = group_lfs_status(@group)
            = link_to sprite_icon('question-o'), help_page_path('topics/git/lfs/index')

        = render_if_exists 'namespaces/shared_runner_status', namespace: @group

    = render 'shared/custom_attributes', custom_attributes: @group.custom_attributes

    = render_if_exists 'ldap_group_links/ldap_group_links_show', group: @group

    .card
      .card-header
        = _('Projects')
        %span.badge.badge-pill
          #{@group.projects.count}
      %ul.content-list
        - @projects.each do |project|
          %li
            %strong
              = link_to project.full_name, [:admin, project]
              %span.badge.badge-pill
                = storage_counter(project.statistics.storage_size)
            %span.float-right.light
              %span.monospace= project.full_path + '.git'
      - unless @projects.size < Kaminari.config.default_per_page
        .card-footer
          = paginate @projects, param_name: 'projects_page', theme: 'gitlab'

    - shared_projects = @group.shared_projects.sort_by(&:name)
    - unless shared_projects.empty?
      .card
        .card-header
          = _('Projects shared with %{group_name}') % { group_name: @group.name }
          %span.badge.badge-pill
            #{shared_projects.size}
        %ul.content-list
          - shared_projects.each do |project|
            %li
              %strong
                = link_to project.full_name, [:admin, 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
            - help_link_open = '<strong><a href="%{help_url}">'.html_safe % { help_url: help_page_url("user/permissions") }
            = html_escape(_('Read more about project permissions %{help_link_open}here%{help_link_close}')) % { help_link_open: help_link_open, help_link_close: '</a></strong>'.html_safe }

          = 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, skip_ldap: @group.ldap_synced?, scope: :all)
            .gl-mt-3
              = select_tag :access_level, options_for_select(@group.access_level_roles), class: "project-access-select select2"
            %hr
            = button_tag _('Add users to group'), class: "gl-button btn btn-success"
      = render 'shared/members/requests', membership_source: @group, group: @group, requesters: @requesters, force_mobile_view: true

    .card
      .card-header
        = html_escape(_("%{group_name} group members")) % { group_name: "<strong>#{html_escape(@group.name)}</strong>".html_safe }
        %span.badge.badge-pill= @group.members.size
        .float-right
          = link_to group_group_members_path(@group), class: 'btn btn-default gl-button btn-sm' do
            = sprite_icon('pencil-square', css_class: 'gl-icon')
            = _('Manage access')
      %ul.content-list.group-users-list.content-list.members-list
        = render partial: 'shared/members/member',
                 collection: @members, as: :member,
                 locals: { membership_source: @group,
                           group: @group,
                           show_controls: false,
                           current_user_is_group_owner: current_user_is_group_owner }
      - unless @members.size < Kaminari.config.default_per_page
        .card-footer
          = paginate @members, param_name: 'members_page', theme: 'gitlab'