Fix protocol repository issues [SCI-7003] (#4343)

* Fix protocol repository issues [SCI-7003]

* Remove unnecessary inRepository [SCI-7003]
This commit is contained in:
ajugo 2022-08-10 15:39:45 +02:00 committed by GitHub
parent 5df1701ae7
commit 12fc3b0b3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 13 deletions

View file

@ -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 {

View file

@ -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"
/>

View file

@ -24,7 +24,7 @@
@click="toggleCollapsed">
<span class="fas fa-caret-right"></span>
</a>
<div class="step-complete-container" :class="{ 'step-element--locked': inRepository || !urls.state_url }">
<div v-if="!inRepository" class="step-complete-container" :class="{ 'step-element--locked': !urls.state_url }">
<div :class="`step-state ${step.attributes.completed ? 'completed' : ''}`"
@click="changeState"
@keyup.enter="changeState"

View file

@ -135,7 +135,7 @@
</div>
</div>
<%= 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} %>
<!-- URL for status bar refreshing -->
<div class="hidden" data-role="protocol-status-bar-url" data-url="<%= protocol_status_bar_protocol_path(@protocol) %>"></div>

View file

@ -12,11 +12,13 @@
</div>
<div class="modal-body">
<p><%= t("protocols.print.modal.content") %></p>
<div class="sci-checkbox-container">
<%= check_box_tag :include_comments, 1, true, { class: "sci-checkbox" } %>
<span class="sci-checkbox-label"></span>
</div>
<small><%= t("protocols.print.modal.include_comments") %></small>
<% if comments_enabled %>
<div class="sci-checkbox-container">
<%= check_box_tag :include_comments, 1, true, { class: "sci-checkbox" } %>
<span class="sci-checkbox-label"></span>
</div>
<small><%= t("protocols.print.modal.include_comments") %></small>
<% end %>
</div>
<div class="modal-footer">
<div class="pull-right">

View file

@ -22,7 +22,7 @@
<!-- Create new office file modal -->
<%= render partial: 'assets/wopi/create_wopi_file_modal.html.erb' %>
<%= render partial: "my_modules/protocols/print_protocol_modal", locals: { protocol: @protocol } %>
<%= render partial: "my_modules/protocols/print_protocol_modal", locals: { protocol: @protocol, comments_enabled: false } %>
<%= javascript_include_tag "handsontable.full" %>
<%= render partial: "shared/formulas_libraries.html.erb" %>