<commit_before>- content_for :page_title, "Media for '#{@object.title}'"
%fieldset
  - if @object.media.size == 0
    %p No media found for project.
  - else
    - @object.media.each do |medium|
      - if medium.is_image?
        = link_to(image_tag(medium.public_filename(:thumb)), project_process_medium_path(@object, medium), :title => "Add this item to the project")
      - else
        = link_to((medium.alt_text || medium.headline || medium.filename), project_process_medium_path(@object, medium), :title => "Add this item to the project")
.clear
.float_left
  %fieldset
    %legend Assign media to the project
    - if @available_media.size == 0
      %p= link_to("Manage media", media_path)
      %p.small (This project has all available media.)
    - else
      - @available_media.each do |medium|<commit_msg>Non image media now grab titles from several sources, in case one is blank.<commit_after>- content_for :page_title, "Media for '#{@object.title}'"
%fieldset
  - if @object.media.size == 0
    %p No media found for project.
  - else
    - @object.media.each do |medium|
      - if medium.is_image?
        = link_to(image_tag(medium.public_filename(:thumb)), project_process_medium_path(@object, medium), :title => "Add this item to the project")
      - else
        - title = (medium.alt_text.blank? ? (medium.headline.blank? ? medium.filename : medium.headline) : medium.alt_text)
        = link_to(title, project_process_medium_path(@object, medium), :title => "Add this item to the project")
.clear
.float_left
  %fieldset
    %legend Assign media to the project
    - if @available_media.size == 0
      %p= link_to("Manage media", media_path)
      %p.small (This project has all available media.)
    - else
      - @available_media.each do |medium|
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.0022522522522522522, 'mean_word_length': 3.376847290640394, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2995253', 'n_tokens_mistral': 558, 'n_tokens_neox': 548, 'n_words': 160}