mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
25 lines
1.1 KiB
Text
25 lines
1.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="fas fa-download"></span> <%= t('Download')%>
|
|
</a>
|
|
<button type="button" class="btn icon-btn btn-light" data-dismiss="modal"><span class="fas fa-times"></span></button>
|
|
</div>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="file-preview-container">
|
|
<% if report_type == 'pdf' %>
|
|
<%= render partial: 'shared/pdf_viewer.html.erb', locals: { asset: report.pdf_file, report_document: true } %>
|
|
<% elsif report_type == 'docx' %>
|
|
<%= render partial: 'shared/pdf_viewer.html.erb', 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>
|
|
<div class="modal-footer">
|
|
</div>
|