Skip to content

Commit

Permalink
Merge pull request #50 from mlibrary/SEARCH-1655-updated-callnumber-b…
Browse files Browse the repository at this point in the history
…rowse-fields

SEARCH-1655 author and publisher display fixes
  • Loading branch information
niquerio authored Mar 17, 2022
2 parents fe3df4d + a3a45c3 commit d7bfe6f
Show file tree
Hide file tree
Showing 5 changed files with 668 additions and 648 deletions.
13 changes: 8 additions & 5 deletions lib/models/browse_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ def title
end
def vernacular_title
output = @catalog_doc["title_display"]&.slice(1)
[output, edition].compact.join(" ") unless output.nil?
[output, vernacular_edition].compact.join(" ") unless output.nil?
end
def author
@catalog_doc["mainauthor"]&.first
@catalog_doc["main_author_display"]&.first
end
def vernacular_author
@catalog_doc["mainauthor"]&.slice(1)
@catalog_doc["main_author_display"]&.slice(1)
end
def publisher
@catalog_doc["publisher"]&.first
@catalog_doc["publisher_display"]&.first
end
def vernacular_publisher
@catalog_doc["publisher"]&.slice(1)
@catalog_doc["publisher_display"]&.slice(1)
end
def series
@catalog_doc["series"]&.first
Expand All @@ -49,6 +49,9 @@ def vernacular_series
def edition
@catalog_doc["edition"]&.first
end
def vernacular_edition
@catalog_doc["edition"]&.slice(1)
end
def mms_id
@index_doc["bib_id"]
end
Expand Down
Loading

0 comments on commit d7bfe6f

Please sign in to comment.