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 { .protocol-description {
margin-bottom: 2em; margin-bottom: 2em;
img { .data-block {
border-radius: 50%; img {
height: 24px; border-radius: 50%;
width: 24px; height: 24px;
width: 24px;
}
} }
.fas.block-icon { .fas.block-icon {

View file

@ -39,7 +39,7 @@
:value="protocol.attributes.name" :value="protocol.attributes.name"
:characterLimit="255" :characterLimit="255"
:placeholder="i18n.t('my_modules.protocols.protocol_status_bar.enter_name')" :placeholder="i18n.t('my_modules.protocols.protocol_status_bar.enter_name')"
:allowBlank="true" :allowBlank="!inRepository"
:attributeName="`${i18n.t('Protocol')} ${i18n.t('name')}`" :attributeName="`${i18n.t('Protocol')} ${i18n.t('name')}`"
@update="updateName" @update="updateName"
/> />

View file

@ -24,7 +24,7 @@
@click="toggleCollapsed"> @click="toggleCollapsed">
<span class="fas fa-caret-right"></span> <span class="fas fa-caret-right"></span>
</a> </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' : ''}`" <div :class="`step-state ${step.attributes.completed ? 'completed' : ''}`"
@click="changeState" @click="changeState"
@keyup.enter="changeState" @keyup.enter="changeState"

View file

@ -135,7 +135,7 @@
</div> </div>
</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 --> <!-- URL for status bar refreshing -->
<div class="hidden" data-role="protocol-status-bar-url" data-url="<%= protocol_status_bar_protocol_path(@protocol) %>"></div> <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>
<div class="modal-body"> <div class="modal-body">
<p><%= t("protocols.print.modal.content") %></p> <p><%= t("protocols.print.modal.content") %></p>
<div class="sci-checkbox-container"> <% if comments_enabled %>
<%= check_box_tag :include_comments, 1, true, { class: "sci-checkbox" } %> <div class="sci-checkbox-container">
<span class="sci-checkbox-label"></span> <%= check_box_tag :include_comments, 1, true, { class: "sci-checkbox" } %>
</div> <span class="sci-checkbox-label"></span>
<small><%= t("protocols.print.modal.include_comments") %></small> </div>
<small><%= t("protocols.print.modal.include_comments") %></small>
<% end %>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<div class="pull-right"> <div class="pull-right">

View file

@ -22,7 +22,7 @@
<!-- Create new office file modal --> <!-- Create new office file modal -->
<%= render partial: 'assets/wopi/create_wopi_file_modal.html.erb' %> <%= 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" %> <%= javascript_include_tag "handsontable.full" %>
<%= render partial: "shared/formulas_libraries.html.erb" %> <%= render partial: "shared/formulas_libraries.html.erb" %>