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
|
2019-07-07 11:18:12 +05:30
|
|
|
.avatar-container.rect-avatar.s64.home-panel-avatar.append-right-default.float-none
|
2019-03-02 22:35:43 +05:30
|
|
|
= 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-23 00:09:42 +05:30
|
|
|
%h1.home-panel-title.gl-mt-3.append-bottom-5
|
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) }
|
2019-03-02 22:35:43 +05:30
|
|
|
= visibility_level_icon(@group.visibility_level, fw: false, options: {class: 'icon'})
|
|
|
|
.home-panel-metadata.d-flex.align-items-center.text-secondary
|
|
|
|
%span
|
2019-07-07 11:18:12 +05:30
|
|
|
= _("Group ID: %{group_id}") % { group_id: @group.id }
|
2019-03-02 22:35:43 +05:30
|
|
|
- if current_user
|
2020-06-23 00:09:42 +05:30
|
|
|
%span.access-request-links.gl-ml-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
|
|
|
|
2019-03-02 22:35:43 +05:30
|
|
|
.home-panel-buttons.col-md-12.col-lg-6.d-inline-flex.flex-wrap.justify-content-lg-end
|
|
|
|
- if current_user
|
|
|
|
.group-buttons
|
2019-10-12 21:52:04 +05:30
|
|
|
= render 'shared/notifications/new_button', notification_setting: @notification_setting, btn_class: 'btn', emails_disabled: emails_disabled
|
2020-05-24 23:13:21 +05:30
|
|
|
- new_project_label = _("New project")
|
|
|
|
- new_subgroup_label = _("New subgroup")
|
|
|
|
- if can_create_projects and can_create_subgroups
|
|
|
|
.btn-group.new-project-subgroup.droplab-dropdown.home-panel-action-button.prepend-top-default.js-new-project-subgroup.qa-new-project-or-subgroup-dropdown{ data: { project_path: new_project_path(namespace_id: @group.id), subgroup_path: new_group_path(parent_id: @group.id) } }
|
|
|
|
%input.btn.btn-success.dropdown-primary.js-new-group-child.qa-new-in-group-button{ type: "button", value: new_project_label, data: { action: "new-project" } }
|
|
|
|
%button.btn.btn-success.dropdown-toggle.js-dropdown-toggle.qa-new-project-or-subgroup-dropdown-toggle{ type: "button", data: { "dropdown-trigger" => "#new-project-or-subgroup-dropdown", 'display' => 'static' } }
|
|
|
|
= sprite_icon("chevron-down", css_class: "icon dropdown-btn-icon")
|
|
|
|
%ul#new-project-or-subgroup-dropdown.dropdown-menu.dropdown-menu-right{ data: { dropdown: true } }
|
|
|
|
%li.droplab-item-selected.qa-new-project-option{ role: "button", data: { value: "new-project", text: new_project_label } }
|
|
|
|
.menu-item
|
|
|
|
.icon-container
|
|
|
|
= icon("check", class: "list-item-checkmark")
|
|
|
|
.description
|
|
|
|
%strong= new_project_label
|
|
|
|
%span= s_("GroupsTree|Create a project in this group.")
|
|
|
|
%li.divider.droplap-item-ignore
|
|
|
|
%li.qa-new-subgroup-option{ role: "button", data: { value: "new-subgroup", text: new_subgroup_label } }
|
2019-03-02 22:35:43 +05:30
|
|
|
.menu-item
|
|
|
|
.icon-container
|
|
|
|
= icon("check", class: "list-item-checkmark")
|
|
|
|
.description
|
2020-05-24 23:13:21 +05:30
|
|
|
%strong= new_subgroup_label
|
|
|
|
%span= s_("GroupsTree|Create a subgroup in this group.")
|
|
|
|
- elsif can_create_projects
|
|
|
|
= link_to new_project_label, new_project_path(namespace_id: @group.id), class: "btn btn-success prepend-top-default"
|
|
|
|
- elsif can_create_subgroups
|
|
|
|
= link_to new_subgroup_label, new_group_path(parent_id: @group.id), class: "btn btn-success prepend-top-default"
|
2019-03-02 22:35:43 +05:30
|
|
|
|
|
|
|
- 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")
|