Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_home_panel.html.haml « groups « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1494990e4276f4c5e9856f7e6c986e0e3c86255d (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
- can_create_subgroups = can?(current_user, :create_subgroup, @group)
- can_create_projects = can?(current_user, :create_projects, @group)
- emails_disabled = @group.emails_disabled?

.group-home-panel
  .gl-display-flex.gl-justify-content-space-between.gl-flex-wrap.gl-sm-flex-direction-column.gl-gap-3.gl-my-5
    .home-panel-title-row.gl-display-flex.gl-align-items-center
      .avatar-container.rect-avatar.s64.home-panel-avatar.gl-flex-shrink-0.float-none{ class: 'gl-mr-3!' }
        = group_icon(@group, class: 'avatar avatar-tile s64', width: 64, height: 64, itemprop: 'logo')
      %div
        %h1.home-panel-title.gl-font-size-h1.gl-mt-3.gl-mb-2.gl-display-flex{ itemprop: 'name' }
          = @group.name
          %span.visibility-icon.gl-text-secondary.has-tooltip.gl-ml-2{ data: { container: 'body' }, title: visibility_icon_description(@group) }
            = visibility_level_icon(@group.visibility_level, options: {class: 'icon'})
        .home-panel-metadata.gl-text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal{ data: { qa_selector: 'group_id_content' }, itemprop: 'identifier' }
          - if can?(current_user, :read_group, @group)
            %span.gl-display-inline-block.gl-vertical-align-middle
              = s_("GroupPage|Group ID: %{group_id}") % { group_id: @group.id }
              = clipboard_button(title: s_('GroupPage|Copy group ID'), text: @group.id)
          - if current_user
            %span.gl-ml-3.gl-mb-3
              = render 'shared/members/access_request_links', source: @group

    - if current_user
      .home-panel-buttons.gl-display-flex.gl-justify-content-md-end.gl-align-items-center.gl-flex-wrap.gl-gap-3{ data: { testid: 'group-buttons' } }
        - if current_user.admin?
          = link_to [:admin, @group], class: 'btn btn-default gl-button btn-icon', title: _('View group in admin area'),
            data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
            = sprite_icon('admin')
        - if @notification_setting
          .js-vue-notification-dropdown{ data: { disabled: emails_disabled.to_s, dropdown_items: notification_dropdown_items(@notification_setting).to_json, notification_level: @notification_setting.level, help_page_path: help_page_path('user/profile/notifications'), group_id: @group.id, container_class: 'gl-vertical-align-top', no_flip: 'true' } }
        - if can_create_subgroups
          .gl-sm-w-auto.gl-w-full
            = link_to _("New subgroup"),
              new_group_path(parent_id: @group.id, anchor: 'create-group-pane'),
              class: "btn btn-default gl-button gl-sm-w-auto gl-w-full",
              data: { qa_selector: 'new_subgroup_button' }
        - if can_create_projects
          .gl-sm-w-auto.gl-w-full
            = link_to _("New project"), new_project_path(namespace_id: @group.id), class: "btn btn-confirm gl-button gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_project_button' }

  - if @group.description.present?
    .group-home-desc.mt-1
      .home-panel-description
        .home-panel-description-markdown.read-more-container{ itemprop: 'description' }
          = markdown_field(@group, :description)
        %button.gl-button.btn.btn-link.js-read-more-trigger.d-lg-none{ type: "button" }
          = _("Read more")