scinote-web/app/views/shareable_links/my_modules/_attachments.html.erb
ajugo 44c919d3dc
Implement shareable link task view [SCI-8752] (#5843)
* Implement shareable link task view [SCI-8752]
2023-07-26 15:19:32 +02:00

23 lines
950 B
Plaintext

<div class="step-attachments">
<div class="attachments-actions">
<div class="title">
<h3> <%= t('protocols.steps.files', count: attachments.length) %> </h3>
</div>
</div>
<div class="attachments">
<% attachments.each do |attachment| %>
<% if attachment.file.attached? %>
<%= render partial: "shareable_links/my_modules/step_attachments/#{ attachment.view_mode }", locals: { asset: attachment, step: step } %>
<%= render partial: "shareable_links/my_modules/step_attachments/file_preview", locals: { asset: attachment, gallery: attachments.pluck(:id) } %>
<% else %>
<%= attachment.view_mode %>
<%= render partial: "shareable_links/my_modules/step_attachments/empty", locals: { asset: attachment } %>
<% end %>
<% end %>
</div>
</div>
<%= javascript_include_tag 'shared/file_preview' %>
<%= javascript_include_tag 'pdf_js' %>
<%= stylesheet_link_tag 'pdf_js_styles' %>