Skip to content

Commit

Permalink
Adds filename to list of possible FS titles in Work Show Page.
Browse files Browse the repository at this point in the history
  • Loading branch information
bwatson78 committed Jan 13, 2025
1 parent 9e62a2c commit 9ad5d10
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/models/solr_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,8 @@ def original_checksum
def preservation_events
self['preservation_events_tesim']
end

def title_label_or_filename
title.presence || label.presence || self['original_filename_ssi']
end
end
4 changes: 3 additions & 1 deletion app/views/hyrax/base/_member.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
<td class="thumbnail">
<%= document_presenter(member).thumbnail.thumbnail_tag(alt: 'file details') %>
</td>
<td class="attribute attribute-filename ensure-wrapped"><%= link_to(member.link_name, contextual_path(member, @presenter)) %></td>
<td class="attribute attribute-filename ensure-wrapped">
<%= link_to(member.try(:solr_document).try(:title_label_or_filename), contextual_path(member, @presenter)) %>
</td>
<td class="attribute attribute-file_set_use"><%= member.try(:solr_document)&.fetch("file_set_use_ssi", '') %></td>
<td class="attribute attribute-date_uploaded"><%= member.try(:date_uploaded) %></td>
<td class="attribute attribute-permission"><%= member.permission_badge %></td>
Expand Down

0 comments on commit 9ad5d10

Please sign in to comment.