mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Merge branch 'release-1.12.11'
Conflicts: config/initializers/extends.rb
This commit is contained in:
commit
070450f813
6 changed files with 25 additions and 7 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.12.10
|
||||
1.12.11
|
||||
|
|
|
@ -15,6 +15,11 @@ module FileIconsHelper
|
|||
image_link = 'office/PowerPoint-pptx_20x20x32.png'
|
||||
end
|
||||
|
||||
# Now check for custom mappings or possible overrides
|
||||
if Extends::FILE_ICON_MAPPINGS[file_ext]
|
||||
image_link = Extends::FILE_ICON_MAPPINGS[file_ext]
|
||||
end
|
||||
|
||||
if image_link
|
||||
image_tag image_link
|
||||
else
|
||||
|
|
|
@ -20,8 +20,11 @@
|
|||
<% if wopi_file?(result.asset) %>
|
||||
<%= wopi_asset_file_name(result.asset) %>
|
||||
<% else %>
|
||||
<p><%= truncate(result.asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
||||
<p>
|
||||
<%= file_extension_icon(result.asset) %>
|
||||
<%= truncate(result.asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= wopi_result_view_file_button(result) %>
|
||||
|
|
|
@ -121,8 +121,11 @@
|
|||
<% else %>
|
||||
<%= image_tag asset.url(:medium) if asset.is_image? %>
|
||||
<% end %>
|
||||
<p><%= truncate(asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
||||
<p>
|
||||
<%= file_extension_icon(asset) %>
|
||||
<%= truncate(asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
|
|
@ -7,8 +7,11 @@
|
|||
<% if wopi_file?(asset) %>
|
||||
<%= wopi_asset_file_name(asset) %>
|
||||
<% else %>
|
||||
<p><%= truncate(asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %></p>
|
||||
<p>
|
||||
<%= file_extension_icon(asset) %>
|
||||
<%= truncate(asset.file_file_name,
|
||||
length: Constants::FILENAME_TRUNCATION_LENGTH) %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= wopi_asset_view_button(asset) %>
|
||||
|
|
|
@ -52,4 +52,8 @@ class Extends
|
|||
OMNIAUTH_PROVIDERS = []
|
||||
|
||||
INITIAL_USER_OPTIONS = {}
|
||||
|
||||
# Hash used for mapping file extensions to custom icons,
|
||||
# 'extension' => 'path_to_the_icon'
|
||||
FILE_ICON_MAPPINGS = {}
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue