Skip to content

Commit

Permalink
generate_work_url method from iiif print does not want a hash
Browse files Browse the repository at this point in the history
t wants a solr document. lets be consistant about what we give it

This change parallels one from Adventist.

fixes scientist-softserv/adventist-dl#750

ref:
- #2190
  • Loading branch information
ShanaLMoore committed Apr 23, 2024
1 parent 62b7d9c commit 2ee3d3b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="document col-6 col-md-3">
<div class="thumbnail">
<% value = collection_thumbnail(document, {}, counter: document_counter_with_offset(document_counter)) %>
<%= link_to value, generate_work_url(document.to_h, request)%>
<%= link_to value, generate_work_url(document, request)%>
<div class="caption">
<%= render_document_partials document, blacklight_config.view_config(:gallery).partials, :document_counter => document_counter %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/catalog/_index_header_list_collection.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="search-results-title-row col-12 d-flex flex-row align-items-center pb-2">
<%# OVERRIDE begin %>
<h3 class="search-result-title mb-0 pr-3"><%= link_to markdown(document.title_or_label), generate_work_url(document.to_h, request) %></h3>
<h3 class="search-result-title mb-0 pr-3"><%= link_to markdown(document.title_or_label), generate_work_url(document, request) %></h3>
<%# OVERRIDE end %>
<%= Hyrax::CollectionPresenter.new(document, current_ability).collection_type_badge %>
</div>
2 changes: 1 addition & 1 deletion app/views/catalog/_thumbnail_list_collection.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%# Override Hyrax 3.4.1 to remove thumbnail link supression and use default collection thumbnail %>
<div class="col-md-3">
<% value = collection_thumbnail(document, {}, counter: document_counter_with_offset(document_counter)) %>
<%= link_to value, generate_work_url(document.to_h, request)%>
<%= link_to value, generate_work_url(document, request)%>
</div>
2 changes: 1 addition & 1 deletion app/views/hyrax/homepage/_recent_document.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="col-sm-12">
<span class="sr-only"><%= t('hyrax.homepage.recently_uploaded.document.title_label') %></span>
<h3>
<%= link_to generate_work_url(recent_document.to_h, request), data: { turbolinks: block_valkyrie_redirect? } do %>
<%= link_to generate_work_url(recent_document, request), data: { turbolinks: block_valkyrie_redirect? } do %>
<%= markdown("#{render_thumbnail_tag(recent_document, {width: 90}, {suppress_link: true})} #{recent_document.title_or_label}") %>
<% end %>
</h3>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%# OVERRIDE Hyrax v5.0.0rc2 template for client theming and shared search %>
<h3 class="sr-only"><%= t('hyrax.homepage.recently_uploaded.document.title_label') %></h3>
<%= link_to generate_work_url(recent_document.to_h, request) do %>
<%= link_to generate_work_url(recent_document, request) do %>
<div class="recently-uploaded col-6 col-md-6 pt-3 pb-3">
<%= render_thumbnail_tag recent_document, {class: 'img-fluid mx-auto d-block'}, {suppress_link: true} %>
<div class="recent-doc-title">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h3 class="sr-only"><%= t('hyrax.homepage.recently_uploaded.document.title_label') %></h3>
<%= link_to(generate_work_url(recent_document.to_h, request)) do %>
<%= link_to(generate_work_url(recent_document, request)) do %>
<div class="recently-uploaded pb-3 col-6 col-md-6">
<%= render_thumbnail_tag recent_document, {class: 'img-fluid mx-auto d-block'}, {suppress_link: true} %>
<div class="recent-doc-title">
Expand Down

0 comments on commit 2ee3d3b

Please sign in to comment.