From 8991b4b6fefb9a9d646c3a72936bcfc55860527a Mon Sep 17 00:00:00 2001 From: Rob Kaufman Date: Sun, 21 Apr 2024 16:39:50 -0700 Subject: [PATCH] the generate_work_url method from iiif print does not want a hash, it wants a solr document. lets be consistant about what we give it --- app/views/catalog/_index_gallery_collection_wrapper.html.erb | 2 +- app/views/catalog/_index_header_list_collection.html.erb | 2 +- app/views/catalog/_thumbnail_list_collection.html.erb | 2 +- app/views/hyrax/homepage/_recent_document.html.erb | 2 +- .../hyrax/homepage/_recent_document.html.erb | 2 +- .../hyrax/homepage/_recent_document.html.erb | 2 +- .../neutral_repository/hyrax/homepage/_recent_document.html.erb | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/catalog/_index_gallery_collection_wrapper.html.erb b/app/views/catalog/_index_gallery_collection_wrapper.html.erb index 339cb6b89..34a84edd7 100644 --- a/app/views/catalog/_index_gallery_collection_wrapper.html.erb +++ b/app/views/catalog/_index_gallery_collection_wrapper.html.erb @@ -2,7 +2,7 @@
<% value = collection_thumbnail(document, {}, counter: document_counter_with_offset(document_counter)) %> - <%= link_to value, generate_work_url(document.to_h, request)%> + <%= link_to value, generate_work_url(document, request)%>
<%= render_document_partials document, blacklight_config.view_config(:gallery).partials, :document_counter => document_counter %>
diff --git a/app/views/catalog/_index_header_list_collection.html.erb b/app/views/catalog/_index_header_list_collection.html.erb index 62a809d25..15188f83f 100644 --- a/app/views/catalog/_index_header_list_collection.html.erb +++ b/app/views/catalog/_index_header_list_collection.html.erb @@ -2,7 +2,7 @@
<%# OVERRIDE begin %> -

<%= link_to document.title_or_label, generate_work_url(document.to_h, request) %>

+

<%= link_to document.title_or_label, generate_work_url(document, request) %>

<%# OVERRIDE end %> <%= Hyrax::CollectionPresenter.new(document, current_ability).collection_type_badge %>
diff --git a/app/views/catalog/_thumbnail_list_collection.html.erb b/app/views/catalog/_thumbnail_list_collection.html.erb index 65b33703a..3812bb250 100644 --- a/app/views/catalog/_thumbnail_list_collection.html.erb +++ b/app/views/catalog/_thumbnail_list_collection.html.erb @@ -1,5 +1,5 @@ <%# Override Hyrax 3.4.1 to remove thumbnail link supression and use default collection thumbnail %>
<% value = collection_thumbnail(document, {}, counter: document_counter_with_offset(document_counter)) %> - <%= link_to value, generate_work_url(document.to_h, request)%> + <%= link_to value, generate_work_url(document, request)%>
diff --git a/app/views/hyrax/homepage/_recent_document.html.erb b/app/views/hyrax/homepage/_recent_document.html.erb index abb404737..cc37de1f1 100644 --- a/app/views/hyrax/homepage/_recent_document.html.erb +++ b/app/views/hyrax/homepage/_recent_document.html.erb @@ -5,7 +5,7 @@ <%= t('hyrax.homepage.recently_uploaded.document.title_label') %>

<%= render_thumbnail_tag recent_document, {}, {suppress_link: true} %> - <%= link_to recent_document.title_or_label, generate_work_url(recent_document.to_h, request), data: { turbolinks: block_valkyrie_redirect? } %> + <%= link_to recent_document.title_or_label, generate_work_url(recent_document, request), data: { turbolinks: block_valkyrie_redirect? } %>

<%= t('hyrax.homepage.recently_uploaded.document.depositor_label') %>: <%= link_to_profile recent_document.depositor(t('hyrax.homepage.recently_uploaded.document.depositor_missing')) %> diff --git a/app/views/themes/cultural_repository/hyrax/homepage/_recent_document.html.erb b/app/views/themes/cultural_repository/hyrax/homepage/_recent_document.html.erb index 61242d417..a2f46dd59 100644 --- a/app/views/themes/cultural_repository/hyrax/homepage/_recent_document.html.erb +++ b/app/views/themes/cultural_repository/hyrax/homepage/_recent_document.html.erb @@ -3,6 +3,6 @@

<%= render_thumbnail_tag recent_document, {class: 'img-fluid mx-auto d-block'}, {suppress_link: true} %>
- <%= link_to recent_document.title_or_label, generate_work_url(recent_document.to_h, request) %> + <%= link_to recent_document.title_or_label, generate_work_url(recent_document, request) %>
diff --git a/app/views/themes/institutional_repository/hyrax/homepage/_recent_document.html.erb b/app/views/themes/institutional_repository/hyrax/homepage/_recent_document.html.erb index 431647c0d..2a02b14a3 100644 --- a/app/views/themes/institutional_repository/hyrax/homepage/_recent_document.html.erb +++ b/app/views/themes/institutional_repository/hyrax/homepage/_recent_document.html.erb @@ -3,6 +3,6 @@
<%= render_thumbnail_tag recent_document, {class: 'img-fluid mx-auto d-block'}, {suppress_link: true} %>
- <%= link_to recent_document.title_or_label, generate_work_url(recent_document.to_h, request) %> + <%= link_to recent_document.title_or_label, generate_work_url(recent_document, request) %>
diff --git a/app/views/themes/neutral_repository/hyrax/homepage/_recent_document.html.erb b/app/views/themes/neutral_repository/hyrax/homepage/_recent_document.html.erb index b1f974732..9a8df27db 100644 --- a/app/views/themes/neutral_repository/hyrax/homepage/_recent_document.html.erb +++ b/app/views/themes/neutral_repository/hyrax/homepage/_recent_document.html.erb @@ -3,6 +3,6 @@
<%= render_thumbnail_tag recent_document, {class: 'img-fluid mx-auto d-block'}, {suppress_link: true} %>
- <%= link_to recent_document.title_or_label, generate_work_url(recent_document.to_h, request) %> + <%= link_to recent_document.title_or_label, generate_work_url(recent_document, request) %>