From 4f5f555c902eb466ce261552f6cb9ddc249fc613 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Fri, 17 Nov 2023 12:34:13 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20custom=20thumbnail=20showi?= =?UTF-8?q?ng=20on=20searches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will remove a Hyrax override that seemed to be causing some issues with the search list view and also bring in a fix from PALs with to address the search gallery view. Ref: - https://github.com/scientist-softserv/atla-hyku/issues/122 - https://github.com/scientist-softserv/palni-palci/pull/540 --- .../catalog/_index_gallery_collection_wrapper.html.erb | 9 +++++---- app/views/catalog/_thumbnail_list_collection.html.erb | 5 ----- 2 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 app/views/catalog/_thumbnail_list_collection.html.erb diff --git a/app/views/catalog/_index_gallery_collection_wrapper.html.erb b/app/views/catalog/_index_gallery_collection_wrapper.html.erb index e55b72ff..c92c85e3 100644 --- a/app/views/catalog/_index_gallery_collection_wrapper.html.erb +++ b/app/views/catalog/_index_gallery_collection_wrapper.html.erb @@ -1,8 +1,9 @@ -<%# OVERRIDE Hyrax 3.4.1: make collection thumbnail a link so it matches works %> -
+<%# OVERRIDE: Hyrax 3.5 to use render_thumbnail_tag for gallery view partial %> +
- <% value = collection_thumbnail(document, {}, counter: document_counter_with_offset(document_counter)) %> - <%= link_to value, generate_work_url(document.to_h, request)%> + <%# OVERRIDE begin %> + <%= render_thumbnail_tag document, {}, { full_url: true } %> + <%# OVERRIDE end %>
<%= render_document_partials document, blacklight_config.view_config(:gallery).partials, :document_counter => document_counter %>
diff --git a/app/views/catalog/_thumbnail_list_collection.html.erb b/app/views/catalog/_thumbnail_list_collection.html.erb deleted file mode 100644 index d06f1a48..00000000 --- a/app/views/catalog/_thumbnail_list_collection.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<%# 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)%> -