mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 20:19:05 +08:00
Merge pull request #3204 from aignatov-bio/ai-sci-fix-new-step-creation
Fix new step creation
This commit is contained in:
commit
4f1905d16a
1 changed files with 3 additions and 3 deletions
|
@ -2,13 +2,13 @@
|
|||
|
||||
module FileIconsHelper
|
||||
def wopi_file?(asset)
|
||||
file_ext = asset.file_name.split('.').last.downcase
|
||||
file_ext = asset.file_name.split('.').last&.downcase
|
||||
%w(csv ods xls xlsb xlsm xlsx odp pot potm potx pps ppsm
|
||||
ppsx ppt pptm pptx doc docm docx dot dotm dotx odt rtf).include?(file_ext)
|
||||
end
|
||||
|
||||
def file_fa_icon_class(asset)
|
||||
file_ext = asset.file_name.split('.').last.downcase
|
||||
file_ext = asset.file_name.split('.').last&.downcase
|
||||
|
||||
if Extends::FILE_FA_ICON_MAPPINGS[file_ext] # Check for custom mappings or possible overrides
|
||||
Extends::FILE_FA_ICON_MAPPINGS[file_ext]
|
||||
|
@ -31,7 +31,7 @@ module FileIconsHelper
|
|||
|
||||
# For showing next to file
|
||||
def file_extension_icon(asset, report = false)
|
||||
file_ext = asset.file_name.split('.').last.downcase
|
||||
file_ext = asset.file_name.split('.').last&.downcase
|
||||
if Constants::FILE_TEXT_FORMATS.include?(file_ext)
|
||||
image_link = 'icon_small/docx_file.svg'
|
||||
elsif Constants::FILE_TABLE_FORMATS.include?(file_ext)
|
||||
|
|
Loading…
Reference in a new issue