From 1bc5d3535fd4fb72198e2cb0d2d3eb1c1191fa16 Mon Sep 17 00:00:00 2001 From: Leandro Radusky Date: Wed, 26 Jul 2023 12:02:06 +0200 Subject: [PATCH 1/2] Button allowing to copy uuid for each sample in box detail --- app/views/boxes/show.haml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/boxes/show.haml b/app/views/boxes/show.haml index 096fbdba6..40d7e5b4c 100644 --- a/app/views/boxes/show.haml +++ b/app/views/boxes/show.haml @@ -57,7 +57,11 @@ - @samples.each do |sample| .col.pe-7.list-items.box-sample-row .items-row - .items-item= sample.uuid + .items-item + .copy-content + = sample.uuid + %button.btn-copy.ttip.left + = icon_tag "copy", class: "btn-icon" - unless sample.blinded_attribute?(:batch_number) .sample-row-action= sample.batch_number From 3a8b88cf2bc086ff5a79fb0e224a685997be4fdd Mon Sep 17 00:00:00 2001 From: Leandro Radusky Date: Tue, 1 Aug 2023 16:00:26 +0200 Subject: [PATCH 2/2] Vertical alignment copy buttons --- app/assets/stylesheets/_buttons.scss | 5 +++++ app/views/boxes/show.haml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/_buttons.scss b/app/assets/stylesheets/_buttons.scss index 6b2148dce..7fd9a03fe 100644 --- a/app/assets/stylesheets/_buttons.scss +++ b/app/assets/stylesheets/_buttons.scss @@ -229,4 +229,9 @@ &:hover { border: 1px solid #999; } + + &.v-aligned-box-detail{ + position: absolute; + left: 300px; + } } diff --git a/app/views/boxes/show.haml b/app/views/boxes/show.haml index 40d7e5b4c..5006b90e3 100644 --- a/app/views/boxes/show.haml +++ b/app/views/boxes/show.haml @@ -60,7 +60,7 @@ .items-item .copy-content = sample.uuid - %button.btn-copy.ttip.left + %button.btn-copy.ttip.v-aligned-box-detail = icon_tag "copy", class: "btn-icon" - unless sample.blinded_attribute?(:batch_number) .sample-row-action= sample.batch_number