From c61fee836f3c3ff1b6f0533a03f39653988750ec Mon Sep 17 00:00:00 2001 From: jazairi <16103405+jazairi@users.noreply.github.com> Date: Tue, 3 Feb 2026 10:00:44 -0800 Subject: [PATCH 1/2] Reintroduce availability statements for journals Why these changes are being introduced: We had removed this feature, but UXWS would like it back. Relevant ticket(s): - [USE-363](https://mitlibraries.atlassian.net/browse/USE-363) How this addresses that need: This removes the clause that excludes journals from availability statements. Side effects of this change: None. --- app/views/search/_result_primo.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/search/_result_primo.html.erb b/app/views/search/_result_primo.html.erb index 4bd5d27d..9d06348b 100644 --- a/app/views/search/_result_primo.html.erb +++ b/app/views/search/_result_primo.html.erb @@ -97,7 +97,7 @@ <%= render(partial: 'trigger_openalex_setup', locals: { doi: result[:doi], pmid: result[:pmid] }) %> <% end %> - <% if result[:availability].present? && result[:format].downcase != 'journal' %> + <% if result[:availability].present? %> <% if result[:links]&.find { |link| link['kind'] == 'full record' } %> <%= link_to(availability(result[:availability], result[:location], result[:other_availability]), result[:links].find { |link| link['kind'] == 'full record' }['url']) %> From 6b8a718ed6289f962dc071db3e2ad73f59998b14 Mon Sep 17 00:00:00 2001 From: jazairi <16103405+jazairi@users.noreply.github.com> Date: Wed, 4 Feb 2026 09:20:25 -0800 Subject: [PATCH 2/2] Fix styling of libkey buttons paired with availability statements --- app/assets/stylesheets/partials/_results.scss | 21 +++++++++++++++++++ app/views/search/_result_primo.html.erb | 6 ++++-- app/views/thirdiron/browzine.html.erb | 4 +++- app/views/thirdiron/libkey.html.erb | 4 +++- 4 files changed, 31 insertions(+), 4 deletions(-) diff --git a/app/assets/stylesheets/partials/_results.scss b/app/assets/stylesheets/partials/_results.scss index 75ced13e..23fc4213 100644 --- a/app/assets/stylesheets/partials/_results.scss +++ b/app/assets/stylesheets/partials/_results.scss @@ -303,6 +303,27 @@ display: flex; align-items: center; gap: 24px; + flex-wrap: wrap; + } + + // Browzine / LibKey actions wrapper + .libkey-actions { + // Default to underlined link styling for inline display (when paired with other buttons) + a.libkey-link { + @include underlinedLinks; + font-weight: $fw-medium; + font-size: 1.6rem; + } + } + + // When libkey-actions is the first button (no other buttons before it), + // display as full-width secondary button + .result-get > .libkey-actions:not(.result-get > a.button ~ .libkey-actions) { + flex: 0 0 100%; + + a.libkey-link { + @include buttonSecondary; + } } // Make result buttons present as underlined links diff --git a/app/views/search/_result_primo.html.erb b/app/views/search/_result_primo.html.erb index 9d06348b..a5493346 100644 --- a/app/views/search/_result_primo.html.erb +++ b/app/views/search/_result_primo.html.erb @@ -98,15 +98,17 @@ <% end %> <% if result[:availability].present? %> - +
<% if result[:links]&.find { |link| link['kind'] == 'full record' } %> <%= link_to(availability(result[:availability], result[:location], result[:other_availability]), result[:links].find { |link| link['kind'] == 'full record' }['url']) %> <% else %> <%= availability(result[:availability], result[:location], result[:other_availability]) %> <% end %> - +
<% end %> + <%# Trigger BrowZine lookup (render inside result-get so injected HTML + is part of the flex `.result-get` area and receives expected styles) %> <% if ThirdIron.enabled? && result[:format].downcase == 'journal' && result[:issn].present? %> <%= render(partial: 'trigger_browzine', locals: { issn: result[:issn] }) %> <% end %> diff --git a/app/views/thirdiron/browzine.html.erb b/app/views/thirdiron/browzine.html.erb index 54e5301c..460f8c2c 100644 --- a/app/views/thirdiron/browzine.html.erb +++ b/app/views/thirdiron/browzine.html.erb @@ -1,5 +1,7 @@ <% if ThirdIron.enabled? && @browzine.present? %> <% if @browzine[:browzine_link].present? %> - <%= link_to( @browzine[:browzine_link][:text], @browzine[:browzine_link][:link], class: 'button libkey-link' ) %> +
+ <%= link_to @browzine[:browzine_link][:text], @browzine[:browzine_link][:link], class: 'button libkey-link' %> +
<% end %> <% end %> diff --git a/app/views/thirdiron/libkey.html.erb b/app/views/thirdiron/libkey.html.erb index 470d511f..c5f97825 100644 --- a/app/views/thirdiron/libkey.html.erb +++ b/app/views/thirdiron/libkey.html.erb @@ -15,7 +15,9 @@ <%# Display browzine link if available. This should always display if we have it regardless of other links. %> <% if @libkey[:browzine_link].present? %> - <%= link_to( @libkey[:browzine_link][:text], @libkey[:browzine_link][:link], class: 'button libkey-link' ) %> +
+ <%= link_to @libkey[:browzine_link][:text], @libkey[:browzine_link][:link], class: 'button libkey-link' %> +
<% end %> <%# If we didn't get data back from LibKey, we try OpenAlex unless OA_ALWAYS is enabled at which point we would have already requested data from OpenAlex in parallel to LibKey %>