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 18, 2023
1 parent cc055ec commit 98aa3fc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
17 changes: 9 additions & 8 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: 3938eb0e2f2aa239d6ce52d2d4c597d1146f9651
branch: main
specs:
iiif_print (1.0.0)
Expand Down Expand Up @@ -506,8 +506,6 @@ GEM
scanf (~> 1.0)
sxp (~> 1.1)
unicode-types (~> 1.6)
ecma-re-validator (0.4.0)
regexp_parser (~> 2.2)
edtf (3.0.7)
activesupport (>= 3.0, < 8.0)
equivalent-xml (0.6.0)
Expand Down Expand Up @@ -681,11 +679,10 @@ GEM
rdf (~> 3.1)
json-schema (3.0.0)
addressable (>= 2.8)
json_schemer (0.2.21)
ecma-re-validator (~> 0.3)
json_schemer (1.0.3)
hana (~> 1.3)
regexp_parser (~> 2.0)
uri_template (~> 0.7)
simpleidn (~> 0.2)
jsonlint (0.3.0)
oj (~> 3)
optimist (~> 3)
Expand Down Expand Up @@ -1181,6 +1178,8 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
simpleidn (0.2.1)
unf (~> 0.1.4)
slop (4.9.2)
smart_properties (1.17.0)
snaky_hash (2.0.1)
Expand Down Expand Up @@ -1246,10 +1245,12 @@ GEM
tzinfo (1.2.9)
thread_safe (~> 0.1)
uber (0.1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (1.8.0)
unicode-types (1.7.0)
unicode_utils (1.4.0)
uri_template (0.7.0)
validatable (1.6.7)
valkyrie (2.2.0)
activemodel
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 98aa3fc

Please sign in to comment.