Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds filename to list of possible FS titles in Work Show Page. #706

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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