[develop | DONE | FIXED ] fix checks for deposit pages in explore
This commit is contained in:
parent
ac25509dac
commit
1b7179207d
|
@ -105,7 +105,7 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
|
|||
Find the appropriate repository.
|
||||
</h2>
|
||||
<div class="uk-grid uk-flex uk-flex-middle" uk-height-match="target: .uk-card-body, .uk-tile-primary;" uk-grid>
|
||||
<div page-enabled [pageRoute]="'/participate/deposit/search'">
|
||||
<div page-enabled [pageRoute]="'/participate/deposit/search'" [communityId]="communityId">
|
||||
<div class="uk-card uk-card-default uk-text-center" style="width: 360px;">
|
||||
<div class="uk-card-body uk-text-small">
|
||||
<img src="assets/common-assets/common/Logo_Horizontal.png" alt="OpenAIRE logo" class="uk-width-small uk-margin-bottom">
|
||||
|
@ -120,27 +120,40 @@ import {FullScreenModalComponent} from '../utils/modal/full-screen-modal/full-sc
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div page-enabled [pageRoute]="'/participate/deposit/zenodo'">
|
||||
<div class="uk-card uk-card-default uk-text-center" style="width: 360px;">
|
||||
<div class="uk-card-body uk-text-small">
|
||||
<img src="assets/common-assets/common/logo-zenodo.png" alt="Zenodo logo" class="uk-width-small uk-margin-bottom">
|
||||
<div class="uk-width-2-3@m uk-margin-auto">
|
||||
Deposit your research in <span class="uk-text-bold">Zenodo repository</span>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="zenodoInformation.shareInZenodoUrl" class="uk-card-footer uk-padding-small uk-tile-primary uk-flex uk-flex-center uk-light">
|
||||
<a class="uk-button uk-button-text" [routerLink]="zenodoInformation.shareInZenodoUrl" (click)="closeFsModal()">
|
||||
Use related Zenodo communities
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf="!zenodoInformation.shareInZenodoUrl"
|
||||
class="uk-card-footer uk-padding-small uk-tile-primary uk-flex uk-flex-center uk-light">
|
||||
<a class="uk-button uk-button-text custom-external" [href]="zenodoInformation.url" target="_blank">
|
||||
Zenodo Repository
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-container *ngIf="zenodoInformation.shareInZenodoUrl">
|
||||
<div page-enabled [pageRoute]="'/participate/deposit/zenodo'" [communityId]="communityId">
|
||||
<div class="uk-card uk-card-default uk-text-center" style="width: 360px;">
|
||||
<div class="uk-card-body uk-text-small">
|
||||
<img src="assets/common-assets/common/logo-zenodo.png" alt="Zenodo logo" class="uk-width-small uk-margin-bottom">
|
||||
<div class="uk-width-2-3@m uk-margin-auto">
|
||||
Deposit your research in <span class="uk-text-bold">Zenodo repository</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-card-footer uk-padding-small uk-tile-primary uk-flex uk-flex-center uk-light">
|
||||
<a class="uk-button uk-button-text" [routerLink]="zenodoInformation.shareInZenodoUrl" (click)="closeFsModal()">
|
||||
Use related Zenodo communities
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<div *ngIf="!zenodoInformation.shareInZenodoUrl">
|
||||
<div class="uk-card uk-card-default uk-text-center" style="width: 360px;">
|
||||
<div class="uk-card-body uk-text-small">
|
||||
<img src="assets/common-assets/common/logo-zenodo.png" alt="Zenodo logo" class="uk-width-small uk-margin-bottom">
|
||||
<div class="uk-width-2-3@m uk-margin-auto">
|
||||
Deposit your research in <span class="uk-text-bold">Zenodo repository</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="uk-card-footer uk-padding-small uk-tile-primary uk-flex uk-flex-center uk-light">
|
||||
<a class="uk-button uk-button-text custom-external" [href]="zenodoInformation.url" target="_blank">
|
||||
Zenodo Repository
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div page-enabled [pageRoute]="'/participate/deposit/suggested'" *ngIf="zenodoInformation.hasSuggestedRepositories">
|
||||
<div class="uk-card uk-card-default uk-text-center" style="width: 360px;">
|
||||
<div class="uk-card-body uk-text-small">
|
||||
|
|
|
@ -18,6 +18,7 @@ import {Subscription} from "rxjs";
|
|||
})
|
||||
export class IsPageEnabledComponent implements OnInit, OnDestroy {
|
||||
@Input() pageRoute:string;
|
||||
@Input() communityId:string;
|
||||
public properties: EnvProperties = properties;
|
||||
pageEnabled = false;
|
||||
|
||||
|
@ -33,10 +34,7 @@ export class IsPageEnabledComponent implements OnInit, OnDestroy {
|
|||
|
||||
|
||||
ngOnInit() {
|
||||
this.subs.push(this.communityService.getCommunityAsObservable().subscribe( community => {
|
||||
this.community = community;
|
||||
this.getPageStatus();
|
||||
}));
|
||||
this.getPageStatus();
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
@ -51,7 +49,7 @@ export class IsPageEnabledComponent implements OnInit, OnDestroy {
|
|||
|
||||
|
||||
private getPageStatus() {
|
||||
this.configurationService.isPageEnabled(this.properties, this.community.communityId, '/' + this.pageRoute).subscribe((page) => {
|
||||
this.configurationService.isPageEnabled(this.properties, this.communityId, '/' + this.pageRoute).subscribe((page) => {
|
||||
this.pageEnabled = page;
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue