mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 15:03:07 +00:00
[CST-7604] added hithighlight for person and orgunit
This commit is contained in:
@@ -6,4 +6,15 @@ export class DSONameServiceMock {
|
||||
public getName(dso: DSpaceObject) {
|
||||
return UNDEFINED_NAME;
|
||||
}
|
||||
|
||||
public getHitHighlights(object: any, dso: DSpaceObject) {
|
||||
if (object.hitHighlights && object.hitHighlights['dc.title']) {
|
||||
return object.hitHighlights['dc.title'][0];
|
||||
} else if (object.hitHighlights && object.hitHighlights['organization.legalName']) {
|
||||
return object.hitHighlights['organization.legalName'][0];
|
||||
} else if (object.hitHighlights && (object.hitHighlights['person.familyName'] || object.hitHighlights['person.givenName'])) {
|
||||
return `${object.hitHighlights['person.familyName'][0] || ''}, ${object.hitHighlights['person.givenName'][0] || ''}`;
|
||||
}
|
||||
return UNDEFINED_NAME;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user