From 785ad4077b4e5c5163b9b372b0f8a3e23931cc0c Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Tue, 23 Jan 2024 15:49:44 +0100 Subject: [PATCH] Do not show empty item type box in the item view box --- .../clarin-item-box-view.component.html | 4 ++-- .../clarin-item-box-view/clarin-item-box-view.component.ts | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html index c132f1fd3c5..b7c800c71f8 100644 --- a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html +++ b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.html @@ -1,8 +1,8 @@
-
- {{ itemType }} +
diff --git a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts index 75d028df12a..51168bb4b98 100644 --- a/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts +++ b/src/app/shared/clarin-item-box-view/clarin-item-box-view.component.ts @@ -7,7 +7,7 @@ import { getFirstSucceededRemoteDataPayload, getFirstSucceededRemoteListPayload } from '../../core/shared/operators'; import { Collection } from '../../core/shared/collection.model'; -import { isNull } from '../empty.util'; +import { isEmpty, isNull } from '../empty.util'; import { followLink } from '../utils/follow-link-config.model'; import { Community } from '../../core/shared/community.model'; import { BehaviorSubject } from 'rxjs'; @@ -215,6 +215,10 @@ export class ClarinItemBoxViewComponent implements OnInit { secureImageData(imageByteArray) { return secureImageData(this.sanitizer, imageByteArray); } + + hasItemType() { + return !isEmpty(this.itemType); + } } /**