Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/models/normalize_primo_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def normalize
api: 'primo',
title:,
creators:,
eyebrow:,
source:,
year:,
format:,
Expand Down Expand Up @@ -63,6 +64,14 @@ def creators
author_list.uniq
end

def eyebrow
if alma_record?
'MIT Libraries Catalog'
else
'Central Discovery Index'
end
end

def source
'Primo'
end
Expand Down
7 changes: 7 additions & 0 deletions app/models/normalize_timdex_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def normalize
api: 'timdex',
title:,
creators:,
eyebrow:,
source:,
year:,
format:,
Expand Down Expand Up @@ -45,6 +46,12 @@ def creators
.map { |creator| { 'value' => creator['value'], 'link' => nil } }
end

# Currently just using source as eyebrow.
# This will likely change to remap the source to more user-friendly values.
def eyebrow
source
end

def source
return 'Unknown source' unless @record['source']

Expand Down
4 changes: 4 additions & 0 deletions app/models/timdex_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class TimdexSearch < TimdexBase
records {
timdexRecordId
title
source
contentType
contributors {
kind
Expand Down Expand Up @@ -183,6 +184,7 @@ class TimdexSearch < TimdexBase
records {
timdexRecordId
title
source
contentType
contributors {
kind
Expand Down Expand Up @@ -309,6 +311,7 @@ class TimdexSearch < TimdexBase
records {
timdexRecordId
title
source
contentType
contributors {
kind
Expand Down Expand Up @@ -445,6 +448,7 @@ class TimdexSearch < TimdexBase
records {
timdexRecordId
title
source
contentType
contributors {
kind
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/_result.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<li class="result use">
<div class="result-content">
<p class="eyebrow">Eyebrow Text</p>
<p class="eyebrow"><%= result[:eyebrow] %></p>
<h3 class="record-title">
<span class="sr">Title: </span>
<%= link_to_result(result) %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/search/_result_primo.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<li class="result primo">
<div class="result-content">
<p class="eyebrow">Eyebrow Text</p>
<p class="eyebrow"><%= result[:eyebrow] %></p>
<h3 class="record-title">
<span class="sr">Title: </span>
<% if result[:links]&.find { |link| link['kind'] == 'full record' } %>
Expand Down
2 changes: 1 addition & 1 deletion test/vcr_cassettes/advanced_title_data.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/data.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/data_from_ridiculous_start.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/data_page_2.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geo_all.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geobox.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geobox_and_geodistance.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geobox_and_geodistance_no_decimals.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geobox_max_lat_range_limit.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geobox_max_long_range_limit.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geobox_min_lat_range_limit.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geobox_min_long_range_limit.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geodistance.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geodistance_max_lat_range_limit.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geodistance_max_long_range_limit.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geodistance_min_lat_range_limit.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/vcr_cassettes/geodistance_min_long_range_limit.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading