Commit 07d68c69 authored by Olena Horal-Koretska's avatar Olena Horal-Koretska

Merge branch 'copy-click-button' into 'master'

Updated Group & Project home panel IDs copy-on-click to icon

See merge request gitlab-org/gitlab!75904
parents 17209b78 55072ccd
...@@ -9,17 +9,18 @@ ...@@ -9,17 +9,18 @@
= group_icon(@group, class: 'avatar avatar-tile s64', width: 64, height: 64, itemprop: 'logo') = group_icon(@group, class: 'avatar avatar-tile s64', width: 64, height: 64, itemprop: 'logo')
.d-flex.flex-column.flex-wrap.align-items-baseline .d-flex.flex-column.flex-wrap.align-items-baseline
.d-inline-flex.align-items-baseline .d-inline-flex.align-items-baseline
%h1.home-panel-title.gl-mt-3.gl-mb-2.gl-ml-3{ itemprop: 'name' } %h1.home-panel-title.gl-mt-3.gl-mb-2{ itemprop: 'name' }
= @group.name = @group.name
%span.visibility-icon.text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@group) } %span.visibility-icon.text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@group) }
= visibility_level_icon(@group.visibility_level, options: {class: 'icon'}) = visibility_level_icon(@group.visibility_level, options: {class: 'icon'})
.home-panel-metadata.text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal .home-panel-metadata.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) - 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 }
- button_class = "btn gl-button btn-sm btn-tertiary btn-default-tertiary home-panel-metadata" - button_class = "btn gl-button btn-sm btn-tertiary btn-default-tertiary home-panel-metadata"
- button_text = s_('GroupPage|Group ID: %{group_id}') % { group_id: @group.id } = clipboard_button(title: s_('GroupPage|Copy group ID'), text: @group.id, class: button_class)
= clipboard_button(title: s_('GroupPage|Copy group ID'), text: @group.id, hide_button_icon: true, button_text: button_text, class: button_class, qa_selector: 'group_id_content', itemprop: 'identifier')
- if current_user - if current_user
%span.gl-ml-3 %span.gl-ml-3.gl-mb-3
= render 'shared/members/access_request_links', source: @group = render 'shared/members/access_request_links', source: @group
.home-panel-buttons.col-md-12.col-lg-6 .home-panel-buttons.col-md-12.col-lg-6
......
...@@ -10,18 +10,19 @@ ...@@ -10,18 +10,19 @@
= project_icon(@project, alt: @project.name, class: 'avatar avatar-tile s64', width: 64, height: 64, itemprop: 'image') = project_icon(@project, alt: @project.name, class: 'avatar avatar-tile s64', width: 64, height: 64, itemprop: 'image')
.d-flex.flex-column.flex-wrap.align-items-baseline .d-flex.flex-column.flex-wrap.align-items-baseline
.d-inline-flex.align-items-baseline .d-inline-flex.align-items-baseline
%h1.home-panel-title.gl-mt-3.gl-mb-2.gl-font-size-h1.gl-line-height-24.gl-font-weight-bold.gl-ml-3{ data: { qa_selector: 'project_name_content' }, itemprop: 'name' } %h1.home-panel-title.gl-mt-3.gl-mb-2.gl-font-size-h1.gl-line-height-24.gl-font-weight-bold{ data: { qa_selector: 'project_name_content' }, itemprop: 'name' }
= @project.name = @project.name
%span.visibility-icon.text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@project) } %span.visibility-icon.text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@project) }
= visibility_level_icon(@project.visibility_level, options: { class: 'icon' }) = visibility_level_icon(@project.visibility_level, options: { class: 'icon' })
= render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: @project = render_if_exists 'compliance_management/compliance_framework/compliance_framework_badge', project: @project
.home-panel-metadata.text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal .home-panel-metadata.text-secondary.gl-font-base.gl-font-weight-normal.gl-line-height-normal{ data: { qa_selector: 'project_id_content' }, itemprop: 'identifier' }
- if can?(current_user, :read_project, @project) - if can?(current_user, :read_project, @project)
%span.gl-display-inline-block.gl-vertical-align-middle
= s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id }
- button_class = "btn gl-button btn-sm btn-tertiary btn-default-tertiary home-panel-metadata" - button_class = "btn gl-button btn-sm btn-tertiary btn-default-tertiary home-panel-metadata"
- button_text = s_('ProjectPage|Project ID: %{project_id}') % { project_id: @project.id } = clipboard_button(title: s_('ProjectPage|Copy project ID'), text: @project.id, class: button_class)
= clipboard_button(title: s_('ProjectPage|Copy project ID'), text: @project.id, hide_button_icon: true, button_text: button_text, class: button_class, qa_selector: 'project_id_content', itemprop: 'identifier')
- if current_user - if current_user
%span.gl-display-inline-block.gl-vertical-align-middle.gl-ml-3 %span.gl-ml-3.gl-mb-3
= render 'shared/members/access_request_links', source: @project = render 'shared/members/access_request_links', source: @project
.gl-mt-3.gl-pl-3.gl-w-full .gl-mt-3.gl-pl-3.gl-w-full
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment