Deposit: show zenodo communities page if there is main OR other related communities

This commit is contained in:
argirok 2023-07-17 12:09:49 +03:00
parent f53af36929
commit 8aae6d6d80
3 changed files with 9 additions and 4 deletions

View File

@ -40,7 +40,7 @@ export class OpenaireDepositComponent {
if(community) { if(community) {
this.communityId = community.communityId this.communityId = community.communityId
let masterZenodoCommunityId = community.zenodoCommunity; let masterZenodoCommunityId = community.zenodoCommunity;
if (masterZenodoCommunityId) { if (masterZenodoCommunityId || (community.otherZenodoCommunities && community.otherZenodoCommunities.length > 0)) {
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage; this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage;
} else { } else {
this.zenodoInformation.url = this.properties.zenodo; this.zenodoInformation.url = this.properties.zenodo;

View File

@ -38,7 +38,7 @@ export class OpenaireSearchDataprovidersToDepositComponent {
if(community) { if(community) {
this.communityId = community.communityId; this.communityId = community.communityId;
let masterZenodoCommunityId = community.zenodoCommunity; let masterZenodoCommunityId = community.zenodoCommunity;
if (masterZenodoCommunityId) { if (masterZenodoCommunityId || (community.otherZenodoCommunities && community.otherZenodoCommunities.length > 0)) {
this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage; this.zenodoInformation.shareInZenodoUrl = this.properties.shareInZenodoPage;
} else { } else {
this.zenodoInformation.url = this.properties.zenodo; this.zenodoInformation.url = this.properties.zenodo;

View File

@ -76,7 +76,6 @@
</div> </div>
</div> </div>
</div> </div>
<div *ngIf="zenodoSearchUtils.status == errorCodes.LOADING" <div *ngIf="zenodoSearchUtils.status == errorCodes.LOADING"
class="uk-animation-fade uk-margin-large uk-padding-large uk-padding-remove-horizontal" role="alert"> class="uk-animation-fade uk-margin-large uk-padding-large uk-padding-remove-horizontal" role="alert">
<loading></loading> <loading></loading>
@ -86,7 +85,13 @@
No zenodo communities found No zenodo communities found
</div> </div>
<div class="uk-section"> <div class="uk-section">
<h6 class="uk-margin-medium-bottom">Other related Zenodo communities</h6> <h6 *ngIf="masterZenodoCommunity" class="uk-margin-medium-bottom">Other related Zenodo communities</h6>
<h6 *ngIf="!masterZenodoCommunity" class="uk-margin-medium-bottom">Related Zenodo communities</h6>
<div *ngIf="!masterZenodoCommunity" class="uk-margin-top uk-text-center uk-margin-medium-bottom">
<a routerLink="/participate/deposit/search" target="_blank" class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
OpenAIRE Compliant Repositories
</a>
</div>
<no-load-paging *ngIf="communityIds && communityIds.length > size" [type]="'Zenodo communities'" <no-load-paging *ngIf="communityIds && communityIds.length > size" [type]="'Zenodo communities'"
(pageChange)="getCommunities($event)" (pageChange)="getCommunities($event)"
[page]="page" [pageSize]="size" [page]="page" [pageSize]="size"