mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 19:51:01 +08:00
Merge pull request #3193 from aignatov-bio/ai-sci-5490-fix-empty-office-files-in-step
Add empty office files placeholder [SCI-5490]
This commit is contained in:
commit
ebc2ca4897
3 changed files with 22 additions and 1 deletions
|
@ -223,6 +223,11 @@
|
|||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-office-file {
|
||||
padding: 5em 1em 1em;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.list-attachment-container {
|
||||
|
|
|
@ -25,7 +25,20 @@
|
|||
<%= render partial: 'assets/asset_context_menu.html.erb', locals: { asset: asset, deletable: deletable, editable: editable } %>
|
||||
</div>
|
||||
<% if wopi_enabled? && wopi_file?(asset) %>
|
||||
<div class="iframe-placeholder" data-iframe-url="<%= asset.get_action_url(current_user, 'embedview') %>"></div>
|
||||
<% if asset.file_size.positive? %>
|
||||
<div class="iframe-placeholder" data-iframe-url="<%= asset.get_action_url(current_user, 'embedview') %>"></div>
|
||||
<% else %>
|
||||
<div class="empty-office-file">
|
||||
<h2><%= t('assets.empty_office_file.description') %></h2>
|
||||
<%= button_to(toggle_view_mode_path(asset),
|
||||
method: :patch,
|
||||
remote: true,
|
||||
class: 'btn btn-primary',
|
||||
params: { asset: {view_mode: asset.view_mode }}) do %>
|
||||
<%= t('assets.empty_office_file.reload') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% elsif asset.pdf_previewable? %>
|
||||
<%= render partial: 'shared/pdf_viewer.html.erb', locals: { asset: asset } %>
|
||||
<% elsif asset.previewable? %>
|
||||
|
|
|
@ -2290,6 +2290,9 @@ en:
|
|||
description_1_html: "You are about to delete <b>%{file_name}</b></p>"
|
||||
description_2: "Are you sure you want to continue?"
|
||||
confirm_button: "Delete attachment"
|
||||
empty_office_file:
|
||||
description: "The file is empty. Please add some data before saving the file."
|
||||
reload: "Reload file"
|
||||
|
||||
atwho:
|
||||
no_results:
|
||||
|
|
Loading…
Reference in a new issue