Skip to content

Commit 696a0de

Browse files
oscar-esciregithub-actions[bot]
authored andcommitted
Update: replaced logic of allMetadataValues method by allMetadataNoExcludingValues logic
(cherry picked from commit 5e59403)
1 parent 5532624 commit 696a0de

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<span *ngIf="dso.firstMetadataValue('dc.date.issued')" class="item-list-date" [innerHTML]="firstMetadataValue('dc.date.issued')"></span>)
3030
</ng-container>
3131
<span *ngIf="dso.allMetadata(['dc.contributor.author', 'dc.creator', 'dc.contributor.*']).length > 0" class="item-list-authors">
32-
<span *ngFor="let author of allMetadataNoExcludingValues(['dc.contributor.author', 'dc.creator', 'dc.contributor.*']); let last=last;">
32+
<span *ngFor="let author of allMetadataValues(['dc.contributor.author', 'dc.creator', 'dc.contributor.*']); let last=last;">
3333
<span [innerHTML]="author"><span [innerHTML]="author"></span></span>
3434
<span *ngIf="!last">; </span>
3535
</span>

src/app/shared/object-list/search-result-list-element/search-result-list-element.component.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,13 @@ export class SearchResultListElementComponent<T extends SearchResult<K>, K exten
4545
}
4646
}
4747

48-
/**
49-
* Gets all matching metadata string values from hitHighlights or dso metadata, preferring hitHighlights.
50-
*
51-
* @param {string|string[]} keyOrKeys The metadata key(s) in scope. Wildcards are supported; see [[Metadata]].
52-
* @returns {string[]} the matching string values or an empty array.
53-
*/
54-
allMetadataValues(keyOrKeys: string | string[]): string[] {
55-
return Metadata.allValues([this.object.hitHighlights, this.dso.metadata], keyOrKeys);
56-
}
57-
5848
/**
5949
* Gets all matching metadata string values from hitHighlights or dso metadata.
6050
*
6151
* @param {string|string[]} keyOrKeys The metadata key(s) in scope. Wildcards are supported; see [[Metadata]].
6252
* @returns {string[]} the matching string values or an empty array.
6353
*/
64-
allMetadataNoExcludingValues(keyOrKeys: string | string[]): string[] {
54+
allMetadataValues(keyOrKeys: string | string[]): string[] {
6555
let dsoMetadata: string[] = Metadata.allValues([this.dso.metadata], keyOrKeys);
6656
let highlights: string[] = Metadata.allValues([this.object.hitHighlights], keyOrKeys);
6757
let removedHighlights: string[] = highlights.map(str => str.replace(/<\/?em>/g, ''));

0 commit comments

Comments
 (0)