File Details

<%- stat = @generic_file.audit_stat(false) audit = case stat when 0 'failing' when 1 'passing' else stat end -%> <% unless @generic_file.related_files.empty? %> <% end %>
Depositor <%= link_to_profile @generic_file.depositor %>
Date Uploaded
Date Modified <%= @generic_file.date_modified %>
Audit Status<%= audit %>
Related Files
Characterization <%= "not yet characterized" if @generic_file.characterization_terms.values.flatten.map(&:empty?).reduce(true) { |sum, value| sum && value } %> <% @generic_file.characterization_terms.each_pair do |term, values| %>
<% label = term.to_s %> <% if label == "format_label" %> <% label = "File Format" %> <% values = @generic_file.file_format %> <% end %> <% label = label.humanize %> <% if values.is_a? Array %> <% length = values.length %> <% length = Sufia.config.fits_message_length-1 if term == :status_message && values.length > Sufia.config.fits_message_length-1 %> <% values[0..length].each_with_index do |value, idx| %> <% next if value.empty? %> <%= "#{label}: #{value.truncate(250)}" %> <%= "
".html_safe unless idx == length %> <% end %> <% if length != values.length %> <%= render partial: "generic_files/extra_fields_modal", locals: {name: term, values: values, start: Sufia.config.fits_message_length}%> <% end %> <% else %> <%= "#{label}: #{values.truncate(250)}" %>
<% end %>
<% end %>