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

🐛 Fix logic for displaying custom alt text #121

Merged
merged 1 commit into from
Jul 27, 2023
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
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