diff --git a/src/app/item-page/simple/field-components/preview-section/preview-section.component.html b/src/app/item-page/simple/field-components/preview-section/preview-section.component.html index cd937f7b465..de3462c6e8f 100644 --- a/src/app/item-page/simple/field-components/preview-section/preview-section.component.html +++ b/src/app/item-page/simple/field-components/preview-section/preview-section.component.html @@ -1,10 +1,24 @@ - -
-
-
{{'item.preview.loading-files' | translate}} - + + +
+ {{ 'item.view.box.no-files.message' | translate }}
-
-
- -
+ + +
+ +
+ + + + +
+
+
+ {{ 'item.preview.loading-files' | translate }} + +
+
+
\ No newline at end of file diff --git a/src/app/item-page/simple/field-components/preview-section/preview-section.component.ts b/src/app/item-page/simple/field-components/preview-section/preview-section.component.ts index 3f485e70f08..9968e942534 100644 --- a/src/app/item-page/simple/field-components/preview-section/preview-section.component.ts +++ b/src/app/item-page/simple/field-components/preview-section/preview-section.component.ts @@ -16,6 +16,7 @@ export class PreviewSectionComponent implements OnInit { listOfFiles: BehaviorSubject = new BehaviorSubject([] as any); emailToContact: string; + hasNoFiles: BehaviorSubject = new BehaviorSubject(true); constructor(protected registryService: RegistryService, private configService: ConfigurationDataService) {} // Modified @@ -26,11 +27,10 @@ export class PreviewSectionComponent implements OnInit { .pipe(getAllSucceededRemoteListPayload()) .subscribe((data: MetadataBitstream[]) => { this.listOfFiles.next(data); + this.hasNoFiles.next(!Array.isArray(data) || data.length === 0); }); this.configService.findByPropertyName('lr.help.mail')?.subscribe(remoteData => { this.emailToContact = remoteData.payload?.values?.[0]; }); } - - }