diff --git a/src/app/features/home/components/presentationals/home-archive-form/home-archive-detail.presentational.html b/src/app/features/home/components/presentationals/home-archive-form/home-archive-detail.presentational.html index 6974cc8684c858ff9fb673d59a7c9b370cb031c2..5d2c2de492f15f3dfb856471e5e01923a8577433 100644 --- a/src/app/features/home/components/presentationals/home-archive-form/home-archive-detail.presentational.html +++ b/src/app/features/home/components/presentationals/home-archive-form/home-archive-detail.presentational.html @@ -32,6 +32,7 @@ <button mat-flat-button [dlcmButtonSpinner]="isLoadingPrepareDownload" color="primary" + *ngIf="isLoggedIn" (click)="download(archiveMetadata)" > <mat-icon>play_for_work</mat-icon> diff --git a/src/app/features/home/components/presentationals/home-archive-form/home-archive-detail.presentational.ts b/src/app/features/home/components/presentationals/home-archive-form/home-archive-detail.presentational.ts index 06888d946fa9cdb561daeb5351e0d04a5a92ffe1..df2cfdbb5e63bed9bfaebdeea32097900bb14554 100644 --- a/src/app/features/home/components/presentationals/home-archive-form/home-archive-detail.presentational.ts +++ b/src/app/features/home/components/presentationals/home-archive-form/home-archive-detail.presentational.ts @@ -10,6 +10,7 @@ import {AccessOrganizationalUnit} from "@app/generated-api"; import {SharedAbstractPresentational} from "@app/shared/components/presentationals/shared-abstract/shared-abstract.presentational"; import {ArchiveMetadata} from "@app/shared/models/business/archive-metadata.model"; import {MetadataUtil} from "@app/shared/utils/metadata.util"; +import {LocalStateModel} from "@shared/models/local-state.model"; import { BehaviorSubject, Observable, @@ -45,8 +46,11 @@ export class HomeArchiveDetailPresentational extends SharedAbstractPresentationa @Input() isLoadingPrepareDownload: boolean; - showCode: boolean = false; + @Input() + isLoggedIn: boolean; + showCode: boolean = false; + ngOnInit(): void { const metadata = this.archiveMetadata.metadata; this.listInfo = [ diff --git a/src/app/features/home/components/routables/home-detail/home-detail.routable.html b/src/app/features/home/components/routables/home-detail/home-detail.routable.html index 0939ee98b43d6426fd0aa829f61d4866ea3341c0..b73b1d323e99a42e66e8fc06603c6799749cb097 100644 --- a/src/app/features/home/components/routables/home-detail/home-detail.routable.html +++ b/src/app/features/home/components/routables/home-detail/home-detail.routable.html @@ -4,6 +4,7 @@ [searchScope]="searchScopeObs | async" [organizationalUnit]="organizationalUnitObs | async" [isLoadingPrepareDownload]="isLoadingPrepareDownloadObs | async" + [isLoggedIn]="isLoggedInObs | async" (downloadChange)="download($event)" ></dlcm-home-archive-detail> </div> diff --git a/src/app/features/home/components/routables/home-detail/home-detail.routable.ts b/src/app/features/home/components/routables/home-detail/home-detail.routable.ts index 09bccec86a20248936c087bfbaef4aa34e54f08b..6cf4e830eaf3740a41ec797ba00ad2e9af5f2fa7 100644 --- a/src/app/features/home/components/routables/home-detail/home-detail.routable.ts +++ b/src/app/features/home/components/routables/home-detail/home-detail.routable.ts @@ -38,6 +38,7 @@ export class HomeDetailRoutable extends SharedAbstractPresentational implements @Select(HomeState.searchScope) searchScopeObs: Observable<SearchScopeEnum>; @Select((state: LocalStateModel) => state.home.home_organizationalUnit.current) organizationalUnitObs: Observable<AccessOrganizationalUnit>; @Select(HomeState) stateObs: AccessOrganizationalUnit; + @Select((state: LocalStateModel) => state.application.isLoggedIn) isLoggedInObs: Observable<boolean>; isLoadingOrgUnitObs: Observable<boolean>; private _resId: string;