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

49 lines
3.3 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
.row.mb-3
.home-panel-title-row.col-md-12.col-lg-6.d-flex
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')
2019-03-02 22:35:43 +05:30
.d-flex.flex-column.flex-wrap.align-items-baseline
.d-inline-flex.align-items-baseline
2022-03-02 08:16:31 +05:30
%h1.home-panel-title.gl-mt-3.gl-mb-2{ itemprop: 'name' }
2019-03-02 22:35:43 +05:30
= @group.name
2020-06-23 00:09:42 +05:30
%span.visibility-icon.text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@group) }
2020-10-24 23:57:45 +05:30
= visibility_level_icon(@group.visibility_level, options: {class: 'icon'})
2022-03-02 08:16:31 +05:30
.home-panel-metadata.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 }
- button_class = "btn gl-button btn-sm btn-tertiary btn-default-tertiary home-panel-metadata"
= clipboard_button(title: s_('GroupPage|Copy group ID'), text: @group.id, class: button_class)
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
2021-01-29 00:20:46 +05:30
.home-panel-buttons.col-md-12.col-lg-6
2019-03-02 22:35:43 +05:30
- if current_user
2021-01-29 00:20:46 +05:30
.gl-display-flex.gl-flex-wrap.gl-lg-justify-content-end.gl-mx-n2{ data: { testid: 'group-buttons' } }
2021-09-30 23:02:18 +05:30
- if current_user.admin?
2021-11-11 11:23:49 +05:30
= link_to [:admin, @group], class: 'btn btn-default gl-button btn-icon gl-mt-3 gl-mr-2', title: _('View group in admin area'),
2021-09-30 23:02:18 +05:30
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= sprite_icon('admin')
2021-04-17 20:07:23 +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-mx-2 gl-mt-3 gl-vertical-align-top' } }
2021-01-29 00:20:46 +05:30
- if can_create_subgroups
.gl-px-2.gl-sm-w-auto.gl-w-full
2021-04-17 20:07:23 +05:30
= link_to _("New subgroup"), new_group_path(parent_id: @group.id), class: "btn btn-default gl-button gl-mt-3 gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_subgroup_button' }
2021-01-29 00:20:46 +05:30
- if can_create_projects
.gl-px-2.gl-sm-w-auto.gl-w-full
2021-04-17 20:07:23 +05:30
= link_to _("New project"), new_project_path(namespace_id: @group.id), class: "btn btn-confirm gl-button gl-mt-3 gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_project_button' }
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)
2021-04-29 21:17:54 +05:30
%button.gl-button.btn.btn-link.js-read-more-trigger.d-lg-none{ type: "button" }
2019-03-02 22:35:43 +05:30
= _("Read more")