scinote-web/app/views/shareable_links/my_modules/_step.html.erb

63 lines
2.7 KiB
Text
Raw Normal View History

<div class="step-container mt-[6px] mr-0 mb-6 ml-[-1em] pt-[8px] pr-[24px] pb-[8px] pl-0 border-solid border-[1px] border-[#fff]" id="stepContainer<%= step.id %>" >
<div class="step-header">
<div class="step-element-header no-hover">
<div class="step-controls flex items-center">
<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-2 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>
2023-08-31 21:50:35 +08:00
<div class="elements-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 !pl-[4.5rem]">
<div class="step-timestamp !m-0">
<%= 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>