% if asset.file.processing? && display_image_tag && asset.is_image? %> <%= image_tag 'medium/processing.gif' %> <%= truncate(asset.file_file_name, length: Constants::FILENAME_TRUNCATION_LENGTH) %> <% else %> <% if asset.is_image? && display_image_tag %> <%= image_tag asset.url(:medium) %> <% end %> <% if display_image_tag %>
<%= truncate(asset.file_file_name, length: Constants::FILENAME_TRUNCATION_LENGTH) %>
<% else %> <%= truncate(asset.file_file_name, length: Constants::FILENAME_TRUNCATION_LENGTH) %> <% end %> <% end %>