diff --git a/app/models/normalize_eds_books.rb b/app/models/normalize_eds_books.rb index ca473e86..bf31d8d1 100644 --- a/app/models/normalize_eds_books.rb +++ b/app/models/normalize_eds_books.rb @@ -16,12 +16,16 @@ def book_metadata(result) def subjects bibrecord['BibEntity']['Subjects']&.map do |s| - [s['SubjectFull'], subject_link(s['SubjectFull'])] + [subject_name(s), subject_link(s)] end end + def subject_name(subject) + subject['SubjectFull'] + end + def subject_link(subject) - ENV['EDS_PROFILE_URI'] + URI.encode_www_form_component("DE \"#{subject}\"") + URI.encode_www_form_component("SU \"#{subject_name(subject)}\"") end def location diff --git a/app/models/normalize_eds_common.rb b/app/models/normalize_eds_common.rb index 2eecf3f7..2405aaf6 100644 --- a/app/models/normalize_eds_common.rb +++ b/app/models/normalize_eds_common.rb @@ -78,7 +78,7 @@ def type def authors contributors&.map do |author_node| - [author_name(author_node), author_link(author_node)] + [author_name(author_node), author_search_format(author_node)] end end @@ -86,10 +86,6 @@ def author_name(author_node) author_node.dig('PersonEntity', 'Name', 'NameFull') end - def author_link(author_node) - ENV['EDS_PROFILE_URI'] + author_search_format(author_node) - end - def author_search_format(author_node) URI.encode_www_form_component("AU \"#{author_name(author_node)}\"") end diff --git a/app/views/search/_result.html.erb b/app/views/search/_result.html.erb index 450ec646..f61c5eb3 100644 --- a/app/views/search/_result.html.erb +++ b/app/views/search/_result.html.erb @@ -1,4 +1,9 @@