Skip to content

Commit

Permalink
🎁 Make alt text for default thumbnails dynamic
Browse files Browse the repository at this point in the history
This commit will update both AllinsonFlex and IIIF Print to bring in the
partials that affect certain thumbnail images.  They should now have
their alt text respect the alt text that has been set in the Appearance
tab.

Ref:
  - samvera-labs/allinson_flex#118
  - scientist-softserv/iiif_print#267
  - #471
  • Loading branch information
kirkkwang committed Jul 19, 2023
1 parent cc055ec commit f96bd28
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/samvera-labs/allinson_flex.git
revision: e98815f6178cc17fab70c189d0fe96a618384a7a
revision: f493853597c71334d436bbe57d62e1ee7f5ada74
specs:
allinson_flex (0.1.0)
json_schemer
Expand Down Expand Up @@ -124,7 +124,7 @@ GIT

GIT
remote: https://github.com/scientist-softserv/iiif_print.git
revision: 7b82aa323db891f5f8e362e13bf3f14b4fe9e0dc
revision: eb320b1c454f0219d9e17fd12fd2b525770123b2
branch: main
specs:
iiif_print (1.0.0)
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/hyrax_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ def default_collction_image
end

def default_work_image
Site.instance.default_work_image? ? Site.instance.default_work_image.url : 'default.png'
Site.instance.default_work_image? ? Site.instance.default_work_image.url : 'work.png'
end
end
4 changes: 2 additions & 2 deletions app/views/hyrax/collections/_media_display.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<% if presenter.thumbnail_path %>
<%= image_tag presenter.thumbnail_path,
class: "representative-media",
alt: "",
alt: block_for(name: 'default_collection_image_text'),
role: "presentation" %>
<% else %>
<%= image_tag(Site.instance.default_collection_image) %>
<% end %>
<% end %>

0 comments on commit f96bd28

Please sign in to comment.