Merge pull request #6214 from artoscinote/ma_SCI_9286

Add new step buttons for protocol template, remove bottom new result button [SCI-9286]
This commit is contained in:
Martin Artnik 2023-09-14 12:26:16 +02:00 committed by GitHub
commit 31c0ddba7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View file

@ -131,6 +131,17 @@
</div>
<div class="border-0 border-b border-dashed border-sn-light-grey" v-if="!inRepository"></div>
<div id="protocol-steps-container" :class=" inRepository ? 'protocol-steps collapse in' : ''">
<div v-if="urls.add_step_url && inRepository" class="py-5">
<a
class="btn btn-secondary"
:title="i18n.t('protocols.steps.new_step_title')"
@keyup.enter="addStep(steps.length)"
@click="addStep(steps.length)"
tabindex="0">
<span class="sn-icon sn-icon-new-task" aria-hidden="true"></span>
<span>{{ i18n.t("protocols.steps.new_step") }}</span>
</a>
</div>
<div class="protocol-steps">
<div v-for="(step, index) in steps" :key="step.id" class="step-block">
<div v-if="index > 0 && urls.add_step_url" class="insert-step" @click="addStep(index)">
@ -153,9 +164,8 @@
:assignableMyModuleId="protocol.attributes.assignable_my_module_id"
/>
</div>
<div class="insert-step"></div>
<div v-if="steps.length > 0" class="py-5">
<a v-if="urls.add_step_url"
<div v-if="steps.length > 0 && urls.add_step_url && inRepository" class="py-5">
<a
class="btn btn-secondary"
:title="i18n.t('protocols.steps.new_step_title')"
@keyup.enter="addStep(steps.length)"

View file

@ -26,12 +26,6 @@
@result:restored="removeResult"
/>
</div>
<div v-if="results.length > 0" class="p-3 rounded-md bg-sn-white my-4">
<button v-if="canCreate" :title="i18n.t('my_modules.results.add_title')" class="btn btn-secondary" @click="createResult">
<i class="sn-icon sn-icon-new-task"></i>
{{ i18n.t('my_modules.results.add_label') }}
</button>
</div>
</div>
</template>