debian-mirror-gitlab/app/views/groups/_home_panel.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
3.4 KiB
Text
Raw Normal View History

2019-03-02 22:35:43 +05:30
- can_create_subgroups = can?(current_user, :create_subgroup, @group)
2020-05-24 23:13:21 +05:30
- can_create_projects = can?(current_user, :create_projects, @group)
2019-10-12 21:52:04 +05:30
- emails_disabled = @group.emails_disabled?
2017-08-17 22:00:37 +05:30
2019-03-02 22:35:43 +05:30
.group-home-panel
2023-03-04 22:38:38 +05:30
.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
2021-11-18 22:05:49 +05:30
.avatar-container.rect-avatar.s64.home-panel-avatar.gl-flex-shrink-0.float-none{ class: 'gl-mr-3!' }
2021-02-22 17:27:13 +05:30
= group_icon(@group, class: 'avatar avatar-tile s64', width: 64, height: 64, itemprop: 'logo')
2023-03-04 22:38:38 +05:30
%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'})
2023-03-17 16:20:25 +05:30
= render_if_exists 'shared/tier_badge', source: @group, source_type: 'Group'
2022-10-11 01:57:18 +05:30
.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' }
2021-11-18 22:05:49 +05:30
- if can?(current_user, :read_group, @group)
2022-03-02 08:16:31 +05:30
%span.gl-display-inline-block.gl-vertical-align-middle
= s_("GroupPage|Group ID: %{group_id}") % { group_id: @group.id }
2022-07-16 23:28:13 +05:30
= clipboard_button(title: s_('GroupPage|Copy group ID'), text: @group.id)
2019-03-02 22:35:43 +05:30
- if current_user
2022-03-02 08:16:31 +05:30
%span.gl-ml-3.gl-mb-3
2019-03-02 22:35:43 +05:30
= render 'shared/members/access_request_links', source: @group
2017-08-17 22:00:37 +05:30
2023-03-04 22:38:38 +05:30
- 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?
2023-03-17 16:20:25 +05:30
= render Pajamas::ButtonComponent.new(href: [:admin, @group], icon: 'admin', button_options: { title: _('View group in admin area'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } })
2023-03-04 22:38:38 +05:30
- 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
2023-03-17 16:20:25 +05:30
= render Pajamas::ButtonComponent.new(href: new_group_path(parent_id: @group.id, anchor: 'create-group-pane'), button_options: { data: { qa_selector: 'new_subgroup_button' }, class: 'gl-sm-w-auto gl-w-full'}) do
= _("New subgroup")
2023-03-04 22:38:38 +05:30
- if can_create_projects
.gl-sm-w-auto.gl-w-full
2023-03-17 16:20:25 +05:30
= render Pajamas::ButtonComponent.new(href: new_project_path(namespace_id: @group.id), variant: :confirm, button_options: { data: { qa_selector: 'new_project_button' }, class: 'gl-sm-w-auto gl-w-full' }) do
= _('New project')
2019-03-02 22:35:43 +05:30
- if @group.description.present?
.group-home-desc.mt-1
.home-panel-description
2021-02-22 17:27:13 +05:30
.home-panel-description-markdown.read-more-container{ itemprop: 'description' }
2019-03-02 22:35:43 +05:30
= markdown_field(@group, :description)
2023-03-17 16:20:25 +05:30
= render Pajamas::ButtonComponent.new(variant: :link, button_options: { class: 'js-read-more-trigger gl-lg-display-none' }) do
2019-03-02 22:35:43 +05:30
= _("Read more")