2019-01-21 20:52:53 +00:00
|
|
|
- can_create_subgroups = can?(current_user, :create_subgroup, @group)
|
2020-04-28 09:09:34 +00:00
|
|
|
- can_create_projects = can?(current_user, :create_projects, @group)
|
2019-08-17 05:56:48 +00:00
|
|
|
- emails_disabled = @group.emails_disabled?
|
2017-01-24 15:32:34 +00:00
|
|
|
|
2019-01-21 20:52:53 +00:00
|
|
|
.group-home-panel
|
|
|
|
.row.mb-3
|
|
|
|
.home-panel-title-row.col-md-12.col-lg-6.d-flex
|
2020-07-07 15:08:49 +00:00
|
|
|
.avatar-container.rect-avatar.s64.home-panel-avatar.gl-mr-3.float-none
|
2019-01-21 20:52:53 +00:00
|
|
|
= group_icon(@group, class: 'avatar avatar-tile s64', width: 64, height: 64)
|
|
|
|
.d-flex.flex-column.flex-wrap.align-items-baseline
|
|
|
|
.d-inline-flex.align-items-baseline
|
2020-06-30 06:08:49 +00:00
|
|
|
%h1.home-panel-title.gl-mt-3.gl-mb-2
|
2019-01-21 20:52:53 +00:00
|
|
|
= @group.name
|
2020-05-27 00:08:11 +00:00
|
|
|
%span.visibility-icon.text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@group) }
|
2020-07-23 00:09:43 +00:00
|
|
|
= visibility_level_icon(@group.visibility_level, options: {class: 'icon'})
|
2019-01-21 20:52:53 +00:00
|
|
|
.home-panel-metadata.d-flex.align-items-center.text-secondary
|
|
|
|
%span
|
2019-03-07 19:32:21 +00:00
|
|
|
= _("Group ID: %{group_id}") % { group_id: @group.id }
|
2019-01-21 20:52:53 +00:00
|
|
|
- if current_user
|
2020-05-28 12:08:10 +00:00
|
|
|
%span.access-request-links.gl-ml-3
|
2019-01-21 20:52:53 +00:00
|
|
|
= render 'shared/members/access_request_links', source: @group
|
2017-01-24 15:32:34 +00:00
|
|
|
|
2020-11-12 15:09:09 +00:00
|
|
|
.home-panel-buttons.col-md-12.col-lg-6
|
2019-01-21 20:52:53 +00:00
|
|
|
- if current_user
|
2020-11-12 15:09:09 +00:00
|
|
|
.gl-display-flex.gl-flex-wrap.gl-lg-justify-content-end.gl-mx-n2{ data: { testid: 'group-buttons' } }
|
|
|
|
= render 'shared/notifications/new_button', notification_setting: @notification_setting, btn_class: 'btn gl-button gl-sm-w-auto gl-w-full', dropdown_container_class: 'gl-mr-0 gl-px-2 gl-sm-w-auto gl-w-full', emails_disabled: emails_disabled
|
|
|
|
- if can_create_subgroups
|
|
|
|
.gl-px-2.gl-sm-w-auto.gl-w-full
|
|
|
|
= link_to _("New subgroup"), new_group_path(parent_id: @group.id), class: "btn btn-success btn-md gl-button btn-success-secondary gl-mt-3 gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_subgroup_button' }
|
|
|
|
- if can_create_projects
|
|
|
|
.gl-px-2.gl-sm-w-auto.gl-w-full
|
|
|
|
= link_to _("New project"), new_project_path(namespace_id: @group.id), class: "btn btn-success btn-md gl-button gl-mt-3 gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_project_button' }
|
2019-01-21 20:52:53 +00:00
|
|
|
|
|
|
|
- if @group.description.present?
|
|
|
|
.group-home-desc.mt-1
|
|
|
|
.home-panel-description
|
|
|
|
.home-panel-description-markdown.read-more-container
|
|
|
|
= markdown_field(@group, :description)
|
|
|
|
%button.btn.btn-blank.btn-link.js-read-more-trigger.d-lg-none{ type: "button" }
|
|
|
|
= _("Read more")
|