Skip to content

Commit

Permalink
Merge pull request #121 from samvera-labs/list-works-partial-rework
Browse files Browse the repository at this point in the history
🐛 Fix logic for displaying custom alt text
  • Loading branch information
kirkkwang authored Jul 27, 2023
2 parents 2141b48 + 5c28e3c commit 72e2cbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 1 addition & 5 deletions app/views/hyrax/dashboard/works/_list_works.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
<td>
<div class='media'>
<%= link_to [main_app, document], class: 'media-left', 'aria-hidden' => true do %>
<% if document.thumbnail_id.nil? %>
<%= image_tag default_work_image, { class: 'hidden-xs file_listing_thumbnail', alt: 'Default work thumbnail' } %>
<% else %>
<%= render_thumbnail_tag document, { class: 'hidden-xs file_listing_thumbnail', alt: block_for(name: 'default_work_image_text') }, { suppress_link: true } %>
<% end %>
<%= render_thumbnail_tag document, { class: 'hidden-xs file_listing_thumbnail', alt: block_for(name: 'default_work_image_text') || "#{document.title_or_label} #{t('hyrax.homepage.admin_sets.thumbnail')}" }, { suppress_link: true } %>
<% end %>

<div class='media-body'>
Expand Down
6 changes: 1 addition & 5 deletions app/views/hyrax/my/works/_list_works.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
<td>
<div class='media'>
<%= link_to [main_app, document], class: 'media-left', 'aria-hidden' => true do %>
<% if document.thumbnail_id.nil? %>
<%= image_tag default_work_image, { class: 'hidden-xs file_listing_thumbnail', alt: 'Default work thumbnail' } %>
<% else %>
<%= render_thumbnail_tag document, { class: 'hidden-xs file_listing_thumbnail', alt: block_for(name: 'default_work_image_text') }, { suppress_link: true } %>
<% end %>
<%= render_thumbnail_tag document, { class: 'hidden-xs file_listing_thumbnail', alt: block_for(name: 'default_work_image_text') || "#{document.title_or_label} #{t('hyrax.homepage.admin_sets.thumbnail')}" }, { suppress_link: true } %>
<% end %>

<div class='media-body'>
Expand Down

0 comments on commit 72e2cbe

Please sign in to comment.