mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 22:25:30 +08:00
23 lines
1 KiB
Text
23 lines
1 KiB
Text
<div class="modal-header">
|
|
<span class="file-name"><%= report.name %></span>
|
|
<div class="sci-btn-group">
|
|
<a class="btn btn-light file-download-link" href="<%= rails_blob_path(report_type == 'docx' ? report.docx_file : report.pdf_file, disposition: 'attachment') %>" data-turbolinks="false">
|
|
<span class="sn-icon sn-icon-export"></span> <%= t('Download')%>
|
|
</a>
|
|
<button type="button" class="btn icon-btn btn-light" data-dismiss="modal"><span class="sn-icon sn-icon-close"></span></button>
|
|
</div>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="file-preview-container">
|
|
<% if report_type == 'pdf' %>
|
|
<%= render partial: 'shared/pdf_viewer', locals: { asset: report.pdf_file, report_document: true } %>
|
|
<% elsif report_type == 'docx' %>
|
|
<%= render partial: 'shared/pdf_viewer', locals: { asset: report.docx_preview_file, report_document: true } %>
|
|
<% else %>
|
|
<div>
|
|
<i class="fas fa-10x fa-file-word"></i>
|
|
<h3 class="file-name"><%= report.name %></h3>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|