mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
Merge pull request #2954 from atmire/w2p-104686_Live-import-preview-only-shows-first-mdv-7.6
Live import preview should show all metadata values, not only the first one
This commit is contained in:
@@ -18,10 +18,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div *ngFor="let metadata of metadataList" class="row">
|
||||
<div class="col-md-12">
|
||||
<strong>{{'item.preview.' + metadata.key | translate}}</strong>
|
||||
<p>{{metadata.value.value}}</p>
|
||||
</div>
|
||||
<p class="col-md-12">
|
||||
<strong class="">{{'item.preview.' + metadata.key | translate}}</strong><br>
|
||||
<ng-container *ngFor="let metadatum of metadata.values">
|
||||
<span>{{metadatum.value}}</span><br>
|
||||
</ng-container>
|
||||
</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
@@ -113,7 +113,7 @@ describe('SubmissionImportExternalPreviewComponent test suite', () => {
|
||||
it('Should init component properly', () => {
|
||||
comp.externalSourceEntry = externalEntry;
|
||||
const expected = [
|
||||
{ key: 'dc.identifier.uri', value: Metadata.first(comp.externalSourceEntry.metadata, 'dc.identifier.uri') },
|
||||
{ key: 'dc.identifier.uri', values: Metadata.all(comp.externalSourceEntry.metadata, 'dc.identifier.uri') },
|
||||
];
|
||||
fixture.detectChanges();
|
||||
|
||||
|
@@ -43,7 +43,7 @@ export class SubmissionImportExternalPreviewComponent implements OnInit {
|
||||
/**
|
||||
* The entry metadata list
|
||||
*/
|
||||
public metadataList: { key: string, value: MetadataValue }[];
|
||||
public metadataList: { key: string, values: MetadataValue[] }[];
|
||||
/**
|
||||
* The label prefix to use to generate the translation label
|
||||
*/
|
||||
@@ -78,7 +78,7 @@ export class SubmissionImportExternalPreviewComponent implements OnInit {
|
||||
metadataKeys.forEach((key) => {
|
||||
this.metadataList.push({
|
||||
key: key,
|
||||
value: Metadata.first(this.externalSourceEntry.metadata, key),
|
||||
values: Metadata.all(this.externalSourceEntry.metadata, key),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user