diff --git a/app/views/search/_result_primo.html.erb b/app/views/search/_result_primo.html.erb index 7b8d47ac..ff43c851 100644 --- a/app/views/search/_result_primo.html.erb +++ b/app/views/search/_result_primo.html.erb @@ -14,69 +14,68 @@ <% end %> - <%# FRBR indicator: show a small callout and link to the Primo record %> - <% if result[:dedup_record] %> -
- Multiple versions found. - <% frbr_link = result[:links]&.find { |link| link['kind'].to_s.downcase.include?('full') && link['kind'].to_s.downcase.include?('record') }&.dig('url') %> - <% if frbr_link %> - <%= link_to 'Expand to all editions/formats', frbr_link, class: 'button frbr-link', aria: { label: "View all editions for #{result[:title]}" } %> - <% end %> -
- <% else %> +
+

+ <%= result[:year] %> +

-
-

- <%= result[:year] %> -

+ <%# unclear why TIMDEX is using contributors and Primo is using creators. Should we normalize this? %> + <% if result[:creators].present? %> + Contributors: + + <% end %> - <%# unclear why TIMDEX is using contributors and Primo is using creators. Should we normalize this? %> - <% if result[:creators].present? %> - Contributors: - +

Source: + <% if result[:source_url].present? %> + <%= link_to result[:source], result[:source_url] %> + <% else %> + <%= result[:source] %> <% end %> +

-

Source: - <% if result[:source_url].present? %> - <%= link_to result[:source], result[:source_url] %> - <% else %> - <%= result[:source] %> - <% end %> -

+ <% if result[:citation].present? %> +
+ In: <%= result[:citation] %> +
+ <% end %> - <% if result[:citation].present? %> -
- In: <%= result[:citation] %> -
- <% end %> + <% if result[:subjects].present? %> +
+ Subjects: +
    + <% result[:subjects].each do |subject| %> +
  • <%= subject %>
  • + <% end %> +
+
+ <% end %> - <% if result[:subjects].present? %> -
- Subjects: -
    - <% result[:subjects].each do |subject| %> -
  • <%= subject %>
  • - <% end %> -
-
- <% end %> + <% if result[:summary].present? %> +
+

Summary:

<%= sanitize result[:summary] %> +
+ <% end %> +
- <% if result[:summary].present? %> -
-

Summary:

<%= sanitize result[:summary] %> -
+ <% if result[:dedup_record] %> +
+ Multiple versions found. + <% frbr_link = result[:links]&.find { |link| link['kind'].to_s.downcase.include?('full') && link['kind'].to_s.downcase.include?('record') }&.dig('url') %> + <% if frbr_link %> + <%= link_to 'Expand to all editions/formats', frbr_link, class: 'button frbr-link', aria: { label: "View all editions for #{result[:title]}" } %> <% end %>
+ <% else %> <% if AlmaSru.enabled? && AlmaSru.valid_alma_id?(result[:identifier]) %> <%= render(partial: 'trigger_almasru', locals: { doc_id: result[:identifier] }) %>