Skip to content
Merged
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
11 changes: 3 additions & 8 deletions src/app/shared/clarin-shared-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ export function loadItemAuthors(item, itemAuthors, baseUrl, fields, orcidDomainU
authorsMV.forEach((authorMV: MetadataValue) => {
let isOrcid = false;
let orcidUrl: string;
let searchValue: string;
let searchOperator: string;
if (authorMV.authority) {
const authority = String(authorMV.authority).trim();
if (ORCID_URL_PATTERN.test(authority)) {
Expand All @@ -95,13 +93,10 @@ export function loadItemAuthors(item, itemAuthors, baseUrl, fields, orcidDomainU
orcidUrl = `${domain}/${authority}`;
isOrcid = true;
}
searchValue = encodeURIComponent(authorMV.authority);
searchOperator = 'authority';
} else {
searchValue = encodeURIComponent(authorMV.value);
searchOperator = 'equals';
}
const authorSearchLink = baseUrl + '/search?f.author=' + searchValue + ',' + searchOperator;
// Always redirect search by author name (equals), regardless of authority/ORCID.
// The ORCID iD is only used to build the orcidUrl for the ORCID icon link.
const authorSearchLink = baseUrl + '/search?f.author=' + encodeURIComponent(authorMV.value) + ',equals';
const authorNameLink = Object.assign(new AuthorNameLink(), {
name: authorMV.value,
url: authorSearchLink,
Expand Down
Loading