diff --git a/app/helpers/file_icons_helper.rb b/app/helpers/file_icons_helper.rb index 4e6ee3eef..513bfbf3c 100644 --- a/app/helpers/file_icons_helper.rb +++ b/app/helpers/file_icons_helper.rb @@ -28,6 +28,18 @@ module FileIconsHelper fa_class end + def file_fa_icon_class_v2(asset) + file_ext = asset.file_file_name.split('.').last + + if Constants::FILE_TEXT_FORMATS.include?(file_ext) + return 'fa-file-alt' + elsif Constants::WHITELISTED_IMAGE_TYPES.include?(file_ext) + return 'fa-image' + else + return 'fa-paperclip' + end + end + # For showing next to file def file_extension_icon(asset) file_ext = asset.file_file_name.split('.').last diff --git a/app/views/steps/attachments/_item.html.erb b/app/views/steps/attachments/_item.html.erb index df43af3e6..c1dc45310 100644 --- a/app/views/steps/attachments/_item.html.erb +++ b/app/views/steps/attachments/_item.html.erb @@ -17,7 +17,7 @@ <% if image_preview %> <%= image_tag image_preview %> <% else %> - + <% end %>