From 0d2250e5cda0953d95758b34b42be12fd54f3cd7 Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Thu, 27 Jul 2023 10:37:21 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20list=20collection=20thumbn?= =?UTF-8?q?ail=20alt=20text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit will fix the alt text for the collection thumbnail on the dashboard and the Allinson Flex update will fix the thumbnail for the work on the dashboard. Ref: - https://github.com/samvera-labs/allinson_flex/pull/121 - https://github.com/scientist-softserv/utk-hyku/issues/471 --- Gemfile.lock | 2 +- .../hyrax/dashboard/collections/_list_collections.html.erb | 2 +- app/views/hyrax/my/collections/_list_collections.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 47b54c91..0528618b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/samvera-labs/allinson_flex.git - revision: 2141b481e2f4a35b4df87c54edf6bc7c1611bfb0 + revision: 72e2cbeda64ea68769067ebb94ff1766101a94c3 specs: allinson_flex (0.1.0) json_schemer diff --git a/app/views/hyrax/dashboard/collections/_list_collections.html.erb b/app/views/hyrax/dashboard/collections/_list_collections.html.erb index 7b006307..98fe0103 100644 --- a/app/views/hyrax/dashboard/collections/_list_collections.html.erb +++ b/app/views/hyrax/dashboard/collections/_list_collections.html.erb @@ -22,7 +22,7 @@ <% if (collection_presenter.thumbnail_path == nil) %> <% else %> - <%= image_tag(collection_presenter.thumbnail_path, alt: "#{collection_presenter.title_or_label} #{t('hyrax.dashboard.my.sr.thumbnail')}") %> + <%= image_tag(collection_presenter.thumbnail_path, alt: block_for(name: 'default_collection_image_text') || "#{collection_presenter.title_or_label} #{t('hyrax.dashboard.my.sr.thumbnail')}") %> <% end %> <%= link_to collection_presenter.show_path do %> diff --git a/app/views/hyrax/my/collections/_list_collections.html.erb b/app/views/hyrax/my/collections/_list_collections.html.erb index 75245cd6..26c720b7 100644 --- a/app/views/hyrax/my/collections/_list_collections.html.erb +++ b/app/views/hyrax/my/collections/_list_collections.html.erb @@ -24,7 +24,7 @@ <% if (collection_presenter.thumbnail_path == nil) %> <% else %> - <%= image_tag(collection_presenter.thumbnail_path, alt: "#{collection_presenter.title_or_label} #{t('hyrax.dashboard.my.sr.thumbnail')}") %> + <%= image_tag(collection_presenter.thumbnail_path, alt: block_for(name: 'default_collection_image_text') || "#{collection_presenter.title_or_label} #{t('hyrax.dashboard.my.sr.thumbnail')}") %> <% end %> <%= link_to collection_presenter.show_path, id: "src_copy_link#{id}" do %>