mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge pull request #3034 from tdonohue/port_2954_to_7x
[Port dspace-7_x] 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>
|
</div>
|
||||||
<div *ngFor="let metadata of metadataList" class="row">
|
<div *ngFor="let metadata of metadataList" class="row">
|
||||||
<div class="col-md-12">
|
<p class="col-md-12">
|
||||||
<strong>{{'item.preview.' + metadata.key | translate}}</strong>
|
<strong class="">{{'item.preview.' + metadata.key | translate}}</strong><br>
|
||||||
<p>{{metadata.value.value}}</p>
|
<ng-container *ngFor="let metadatum of metadata.values">
|
||||||
</div>
|
<span>{{metadatum.value}}</span><br>
|
||||||
|
</ng-container>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
@@ -105,7 +105,7 @@ describe('SubmissionImportExternalPreviewComponent test suite', () => {
|
|||||||
it('Should init component properly', () => {
|
it('Should init component properly', () => {
|
||||||
comp.externalSourceEntry = externalEntry;
|
comp.externalSourceEntry = externalEntry;
|
||||||
const expected = [
|
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();
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@ export class SubmissionImportExternalPreviewComponent implements OnInit {
|
|||||||
/**
|
/**
|
||||||
* The entry metadata list
|
* 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
|
* The label prefix to use to generate the translation label
|
||||||
*/
|
*/
|
||||||
@@ -62,7 +62,7 @@ export class SubmissionImportExternalPreviewComponent implements OnInit {
|
|||||||
metadataKeys.forEach((key) => {
|
metadataKeys.forEach((key) => {
|
||||||
this.metadataList.push({
|
this.metadataList.push({
|
||||||
key: key,
|
key: key,
|
||||||
value: Metadata.first(this.externalSourceEntry.metadata, key)
|
values: Metadata.all(this.externalSourceEntry.metadata, key)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user