From 12fc3b0b3b650b248a3c1366ad77fb01d2dcc712 Mon Sep 17 00:00:00 2001 From: ajugo Date: Wed, 10 Aug 2022 15:39:45 +0200 Subject: [PATCH] Fix protocol repository issues [SCI-7003] (#4343) * Fix protocol repository issues [SCI-7003] * Remove unnecessary inRepository [SCI-7003] --- app/assets/stylesheets/protocols/protocol.scss | 10 ++++++---- app/javascript/vue/protocol/container.vue | 2 +- app/javascript/vue/protocol/step.vue | 2 +- app/views/my_modules/protocols.html.erb | 2 +- .../protocols/_print_protocol_modal.html.erb | 12 +++++++----- app/views/protocols/show.html.erb | 2 +- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/protocols/protocol.scss b/app/assets/stylesheets/protocols/protocol.scss index a05703c9c..df44ef7cb 100644 --- a/app/assets/stylesheets/protocols/protocol.scss +++ b/app/assets/stylesheets/protocols/protocol.scss @@ -87,10 +87,12 @@ .protocol-description { margin-bottom: 2em; - img { - border-radius: 50%; - height: 24px; - width: 24px; + .data-block { + img { + border-radius: 50%; + height: 24px; + width: 24px; + } } .fas.block-icon { diff --git a/app/javascript/vue/protocol/container.vue b/app/javascript/vue/protocol/container.vue index 8140ad8c2..1b8d9ad1b 100644 --- a/app/javascript/vue/protocol/container.vue +++ b/app/javascript/vue/protocol/container.vue @@ -39,7 +39,7 @@ :value="protocol.attributes.name" :characterLimit="255" :placeholder="i18n.t('my_modules.protocols.protocol_status_bar.enter_name')" - :allowBlank="true" + :allowBlank="!inRepository" :attributeName="`${i18n.t('Protocol')} ${i18n.t('name')}`" @update="updateName" /> diff --git a/app/javascript/vue/protocol/step.vue b/app/javascript/vue/protocol/step.vue index 3e8786b2b..38ec84d1d 100644 --- a/app/javascript/vue/protocol/step.vue +++ b/app/javascript/vue/protocol/step.vue @@ -24,7 +24,7 @@ @click="toggleCollapsed"> -
+
-<%= render partial: "my_modules/protocols/print_protocol_modal", locals: { protocol: @protocol } %> +<%= render partial: "my_modules/protocols/print_protocol_modal", locals: { protocol: @protocol, comments_enabled: true} %> diff --git a/app/views/my_modules/protocols/_print_protocol_modal.html.erb b/app/views/my_modules/protocols/_print_protocol_modal.html.erb index 976a67989..d5f668395 100644 --- a/app/views/my_modules/protocols/_print_protocol_modal.html.erb +++ b/app/views/my_modules/protocols/_print_protocol_modal.html.erb @@ -12,11 +12,13 @@