scinote-web/app/views/shareable_links/my_modules/_attachments.html.erb
ajugo 6f76e86171
Implement results tab for shareable task link [SCI-8753] (#5910)
* Implement results tab for shareable task link [SCI-8753]
2023-08-07 10:45:52 +02:00

23 lines
957 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, show_context: true } %>
<%= 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' %>