mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 23:21:30 +08:00
62 lines
2.6 KiB
Text
62 lines
2.6 KiB
Text
<div class="step-container" id="stepContainer<%= step.id %>" >
|
|
<div class="step-header">
|
|
<div class="step-element-header no-hover">
|
|
<div class="step-controls">
|
|
<div class="step-element-grip-placeholder"></div>
|
|
<a class="step-collapse-link hover:no-underline focus:no-underline"
|
|
href="#stepBody<%= step.id %>"
|
|
data-toggle="collapse"
|
|
data-remote="true">
|
|
<span class="sn-icon sn-icon-right "></span>
|
|
</a>
|
|
<div class="step-complete-container mx-1.5 step-element--locked">
|
|
<div class="step-state <%= step.completed ? 'completed' : '' %>"
|
|
tabindex="0"
|
|
></div>
|
|
</div>
|
|
<div class="step-position">
|
|
<%= step.position + 1 %> .
|
|
</div>
|
|
</div>
|
|
|
|
<div class="step-name-container">
|
|
<%= render partial: "shareable_links/my_modules/inline_view", locals: { text: step.name, smart_annotation_enabled: false } %>
|
|
</div>
|
|
</div>
|
|
<div class="step-actions-container">
|
|
<a href="#"
|
|
class="shareable-link-open-comments-sidebar btn icon-btn btn-light"
|
|
data-turbolinks="false"
|
|
data-object-type="Step"
|
|
data-object-id="<%= step.id %>"
|
|
data-object-target="#Step<%= step.id %>">
|
|
<i class="sn-icon sn-icon-comments"></i>
|
|
<span class="comments-counter"
|
|
id="comment-count-<%= step.id %>"
|
|
>
|
|
<%= step.comments.count %>
|
|
</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="collapse in" id="stepBody<%= step.id %>">
|
|
<div class="step-elements">
|
|
<div class="step-timestamp">
|
|
<%= t('protocols.steps.timestamp_iso_html', date: step.created_at.iso8601, user: step.user.full_name) %>
|
|
</div>
|
|
<% step.step_orderable_elements.sort_by(&:position).each do |element| %>
|
|
<% if element.orderable_type == 'StepText' %>
|
|
<%= render partial: "shareable_links/my_modules/step_elements/text", locals: { element: element.orderable } %>
|
|
<% elsif element.orderable_type == 'Checklist' %>
|
|
<%= render partial: "shareable_links/my_modules/step_elements/checklist", locals: { element: element.orderable } %>
|
|
<% elsif element.orderable_type == 'StepTable'%>
|
|
<%= render partial: "shareable_links/my_modules/step_elements/table", locals: { element: element.orderable.table } %>
|
|
<% end %>
|
|
<% end %>
|
|
<% if step.step_assets.present? %>
|
|
<%= render partial: "shareable_links/my_modules/attachments", locals: { attachments: step.assets, step: step } %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div>
|