[pluginsFunctionality | DONE | CHANGED] Deposit: add Suggested repos component and links

This commit is contained in:
argirok 2024-05-17 10:04:58 +03:00
parent ecd1682cc1
commit a56e91b7ec
11 changed files with 440 additions and 129 deletions

View File

@ -279,6 +279,11 @@ const routes: Routes = [
loadChildren: () => import('./deposit/zenodo/shareInZenodo.module').then(m => m.ShareInZenodoModule),
data: {hasQuickContact: false}, canActivate: [CommunityAccessGuard]
},
{
path: 'participate/deposit/suggested',
loadChildren: () => import('./deposit/suggested/suggestedRepositories.module').then(m => m.SuggestedRepositoriesModule),
data: {hasQuickContact: false}, canActivate: [CommunityAccessGuard]
},
/** Linking Pages */
{
path: 'myclaims', loadChildren: () => import('./claims/myClaims/myClaims.module').then(m => m.LibMyClaimsModule),

View File

@ -8,6 +8,7 @@ import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommuni
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
import {Subscriber, Subscription} from "rxjs";
import {properties} from "../../environments/environment";
import {SearchCommunityDataprovidersService} from "../openaireLibrary/connect/contentProviders/searchDataproviders.service";
@Component({
selector: 'openaire-deposit',
@ -30,7 +31,8 @@ export class OpenaireDepositComponent {
constructor(private route: ActivatedRoute,
private _zenodoCommunitieService: ZenodoCommunitiesService,
private _communityService: CommunityService) {
private _communityService: CommunityService,
private searchCommunityDataprovidersService: SearchCommunityDataprovidersService) {
this.fetchZenodoInformation = new FetchZenodoInformation(this._zenodoCommunitieService);
}
@ -46,6 +48,16 @@ export class OpenaireDepositComponent {
this.zenodoInformation.url = this.properties.zenodo;
this.zenodoInformation.name = "Zenodo";
}
this.subs.push(this.searchCommunityDataprovidersService.searchDataproviders(this.properties, this.communityId, true).subscribe(
res => {
if(res && res.length > 0){
this.zenodoInformation.hasSuggestedRepositories = true;
}
},
error => {
console.log(error);
}
));
}
}));
if (!this.zenodoInformation.shareInZenodoUrl) {

View File

@ -9,6 +9,7 @@ import {DepositRoutingModule} from "./deposit-routing.module";
import {DepositFirstPageModule} from "../openaireLibrary/deposit/depositFirstPage.module";
import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service";
import {SearchCommunityDataprovidersService} from "../openaireLibrary/connect/contentProviders/searchDataproviders.service";
@NgModule({
imports: [
@ -21,7 +22,7 @@ import {ZenodoCommunitiesService} from "../openaireLibrary/connect/zenodoCommuni
exports: [
OpenaireDepositComponent,
],
providers: [PreviousRouteRecorder, IsRouteEnabled,
providers: [PreviousRouteRecorder, IsRouteEnabled, SearchCommunityDataprovidersService,
ZenodoCommunitiesService]
})
export class LibDepositModule { }

View File

@ -9,6 +9,7 @@ import {ZenodoInformationClass} from '../openaireLibrary/deposit/utils/zenodoInf
import {FetchZenodoInformation} from './utils/fetchZenodoInformation.class';
import {Subscriber, Subscription} from "rxjs";
import {properties} from "../../environments/environment";
import {SearchCommunityDataprovidersService} from "../openaireLibrary/connect/contentProviders/searchDataproviders.service";
@Component({
selector: 'openaire-search-deposit',
@ -28,7 +29,8 @@ export class OpenaireSearchDataprovidersToDepositComponent {
constructor(private route: ActivatedRoute,
private _zenodoCommunitieService: ZenodoCommunitiesService,
private _communityService: CommunityService) {
private _communityService: CommunityService,
private searchCommunityDataprovidersService: SearchCommunityDataprovidersService) {
this.fetchZenodoInformation = new FetchZenodoInformation(this._zenodoCommunitieService);
}
@ -44,6 +46,16 @@ export class OpenaireSearchDataprovidersToDepositComponent {
this.zenodoInformation.url = this.properties.zenodo;
this.zenodoInformation.name = "Zenodo";
}
this.subs.push(this.searchCommunityDataprovidersService.searchDataproviders(this.properties, this.communityId, true).subscribe(
res => {
if(res && res.length > 0){
this.zenodoInformation.hasSuggestedRepositories = true;
}
},
error => {
console.log(error);
}
));
}
}
));

View File

@ -9,6 +9,7 @@ import {SearchDataprovidersToDepositModule} from '../openaireLibrary/deposit/sea
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../openaireLibrary/error/isRouteEnabled.guard';
import {ZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module';
import {SearchCommunityDataprovidersService} from "../openaireLibrary/connect/contentProviders/searchDataproviders.service";
@NgModule({
imports: [
@ -23,6 +24,6 @@ import {ZenodoCommunitiesServiceModule} from '../openaireLibrary/connect/zenodoC
exports: [
OpenaireSearchDataprovidersToDepositComponent,
],
providers: [PreviousRouteRecorder, IsRouteEnabled]
providers: [PreviousRouteRecorder, IsRouteEnabled, SearchCommunityDataprovidersService]
})
export class LibSearchDataprovidersToDepositModule { }

View File

@ -0,0 +1,16 @@
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from "../../openaireLibrary/error/isRouteEnabled.guard";
import {SuggestedRepositoriesComponent} from "./suggestedRepositories.component";
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', component: SuggestedRepositoriesComponent, canActivate: [IsRouteEnabled], canDeactivate: [PreviousRouteRecorder] }
])
]
})
export class SuggestedRepositoriesRoutingModule { }

View File

@ -0,0 +1,78 @@
<schema2jsonld *ngIf="url" [URL]="url" [name]="title" type="other"></schema2jsonld>
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
<div class="uk-padding-small uk-padding-remove-horizontal">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
</div>
</div>
<div class="uk-container uk-container-large uk-section uk-section-small uk-margin-medium-bottom" id="tm-main">
<div class="uk-container uk-container-large uk-margin-bottom">
<div class=" uk-grid uk-flex uk-flex-middle">
<h2 class="uk-margin-top uk-margin-medium-bottom uk-width-1-2@m">Repositories suggested by the curators.</h2>
<div class="uk-flex uk-flex-center uk-flex-middle uk-width-expand@m uk-width-1-1@s">
<div class="uk-padding">
<div class="uk-flex uk-flex-column uk-flex-middle uk-margin-large-bottom">
<img src="assets/common-assets/common/logo-zenodo.png" alt="Zenodo logo" class="uk-width-small ">
<div *ngIf="this.community.zenodoCommunity || this.community.otherZenodoCommunities.length > 0" class="">
<a class="uk-button uk-button-text" [routerLink]="['../zenodo']" >
Use related Zenodo communities
</a>
</div>
<div *ngIf="!(this.community.zenodoCommunity || this.community.otherZenodoCommunities.length > 0)"
class="">
<a class="uk-button uk-button-text custom-external" [href]="properties.zenodo" target="_blank">
Zenodo Repository
</a>
</div>
</div>
<div class="uk-flex uk-flex-column uk-flex-middle">
<img src="assets/common-assets/common/Logo_Horizontal.png" alt="OpenAIRE logo" class="uk-width-small uk-margin-bottom">
<a routerLink="/participate/deposit/search" type="submit"
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
OpenAIRE Compliant Repositories
</a>
</div>
</div>
</div>
</div>
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<div *ngIf="zenodoSearchUtils.status == errorCodes.LOADING"
class="uk-animation-fade uk-margin-large uk-padding-large uk-padding-remove-horizontal" role="alert">
<loading></loading>
</div>
<div *ngIf="(zenodoSearchUtils.status == errorCodes.ERROR || zenodoSearchUtils.status == errorCodes.NONE)"
class="uk-animation-fade uk-margin-top uk-width-1-1 uk-alert uk-alert-warning" role="alert">
No suggested repositories found
</div>
<div class="uk-section">
<div *ngIf="contentProviders && contentProviders.length > 0" class="uk-grid uk-grid-medium uk-grid-match uk-child-width-1-2@m uk-margin-top" uk-grid
uk-height-match="target: .header, .body">
<ng-template ngFor let-item [ngForOf]="contentProviders" let-i="index">
<div
class="uk-animation-fade">
<div class="uk-card uk-card-default uk-card-body uk-card-hover">
{{item.name}}
<hr>
<div class="uk-text-small" [innerHTML]="item.message">
</div>
<div class="uk-flex uk-flex-right uk-margin-small-top">
<a [href]="properties.connectPortalUrl + properties.searchLinkToDataProvider + item.openaireId " class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text" target="_blank">
<span class="uk-flex uk-flex-middle">
<icon [name]="'file_upload'" [type]="'outlined'" class="uk-margin-small-right"></icon>
<span>Go to repository</span>
</span>
</a>
</div>
</div>
</div>
</ng-template>
</div>
</div>
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
</div>

View File

@ -0,0 +1,141 @@
import {Component} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {Meta, Title} from '@angular/platform-browser';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {ZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
import {CommunityService} from '../../openaireLibrary/connect/community/community.service';
import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo';
import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
import {HelperService} from "../../openaireLibrary/utils/helper/helper.service";
import {RouterHelper} from "../../openaireLibrary/utils/routerHelper.class";
import {SEOService} from "../../openaireLibrary/sharedComponents/SEO/SEO.service";
import {PiwikService} from "../../openaireLibrary/utils/piwik/piwik.service";
import {Breadcrumb} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.component";
import {properties} from "../../../environments/environment";
import {Subscriber, Subscription} from "rxjs";
import {SearchCommunityDataprovidersService} from "../../openaireLibrary/connect/contentProviders/searchDataproviders.service";
@Component({
selector: 'suggested-repositories',
templateUrl: './suggestedRepositories.component.html'
})
export class SuggestedRepositoriesComponent {
public url: string = null;
public title: string = "Suggested Repositories";
properties: EnvProperties = properties;
communityId: string = null;
community: CommunityInfo = null;
public pageContents = null;
public divContents = null;
// public warningMessage = "";
// public infoMessage = "";
masterZenodoCommunityId = null;
masterZenodoCommunity = null;
communityIds = null;
communities = [];
page = 1;
size = 5;
zenodoCommunitiesLoadedCount = 0;
zenodoSearchUtils: SearchUtilsClass = new SearchUtilsClass();
errorCodes: ErrorCodes = new ErrorCodes();
depositLink = "https://zenodo.org/deposit/new?c=";
depositLearnHowPage: string = null;
public routerHelper: RouterHelper = new RouterHelper();
breadcrumbs: Breadcrumb[] = [];
subs: Subscription[] = [];
contentProviders;
constructor(private route: ActivatedRoute,
private _router: Router,
private _meta: Meta,
private _title: Title,
private _zenodoCommunitieService: ZenodoCommunitiesService,
private _communityService: CommunityService,
private searchCommunityDataprovidersService: SearchCommunityDataprovidersService,
private helper: HelperService,
private _piwikService: PiwikService,
private seoService: SEOService) {
}
public ngOnInit() {
this.zenodoSearchUtils.status = this.errorCodes.LOADING;
this.url = properties.domain + properties.baseLink + this._router.url;
this.seoService.createLinkForCanonicalURL(this.url, false);
this.updateUrl(this.url);
this.updateTitle(this.title);
this.updateDescription("sugested repositories, deposit");
this.depositLearnHowPage = this.properties.depositLearnHowPage;
this.breadcrumbs.push({name: 'home', route: '/'}, {
name: "Deposit",
route: this.depositLearnHowPage
}, {name: "Suggested Repositories", route: null});
//this.getDivContents();
this.getPageContents();
this.subs.push(this._communityService.getCommunityAsObservable().subscribe(
community => {
if (community) {
this.communityId = community.communityId;
this.subs.push(this._piwikService.trackView(this.properties, this.title).subscribe());
this.community = community;
this.masterZenodoCommunityId = this.community.zenodoCommunity;
this.subs.push(this.searchCommunityDataprovidersService.searchDataproviders(this.properties, this.community.communityId, true).subscribe(
res => {
this.contentProviders = res;
this.zenodoSearchUtils.status = this.contentProviders && this.contentProviders.length > 0 ? this.errorCodes.DONE: this.errorCodes.NONE;
},
error => {
console.log(error);
}
));
}
}));
}
public ngOnDestroy() {
for (let sub of this.subs) {
if (sub instanceof Subscriber) {
sub.unsubscribe();
}
}
}
private updateDescription(description: string) {
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
}
private updateTitle(title: string) {
var _title = ((title.length > 50) ? title.substring(0, 50) : title);
this._title.setTitle(_title);
this._meta.updateTag({content: _title}, "property='og:title'");
}
private updateUrl(url: string) {
this._meta.updateTag({content: url}, "property='og:url'");
}
private getPageContents() {
this.subs.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
this.pageContents = contents;
}));
}
private getDivContents() {
this.subs.push(this.helper.getDivHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => {
this.divContents = contents;
}));
}
private handleError(message: string, error) {
console.error("Share in Zenodo Page: " + message, error);
}
}

View File

@ -0,0 +1,38 @@
import { NgModule} from '@angular/core';
import { CommonModule } from '@angular/common';
import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'
import {ZenodoCommunitiesServiceModule} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module';
import {RouterModule} from "@angular/router";
import {HelperModule} from "../../openaireLibrary/utils/helper/helper.module";
import {PiwikServiceModule} from "../../openaireLibrary/utils/piwik/piwikService.module";
import {Schema2jsonldModule} from "../../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module";
import {SEOServiceModule} from "../../openaireLibrary/sharedComponents/SEO/SEOService.module";
import {BreadcrumbsModule} from "../../openaireLibrary/utils/breadcrumbs/breadcrumbs.module";
import {NoLoadPaging} from "../../openaireLibrary/searchPages/searchUtils/no-load-paging.module";
import {IconsModule} from 'src/app/openaireLibrary/utils/icons/icons.module';
import {LoadingModule} from 'src/app/openaireLibrary/utils/loading/loading.module';
import {SuggestedRepositoriesRoutingModule} from "./suggestedRepositories-routing.module";
import {SuggestedRepositoriesComponent} from "./suggestedRepositories.component";
import {SearchCommunityDataprovidersService} from "../../openaireLibrary/connect/contentProviders/searchDataproviders.service";
@NgModule({
imports: [
CommonModule, SuggestedRepositoriesRoutingModule, ZenodoCommunitiesServiceModule,
RouterModule, HelperModule, LoadingModule,
PiwikServiceModule, Schema2jsonldModule, SEOServiceModule, BreadcrumbsModule, NoLoadPaging, IconsModule
],
declarations: [
SuggestedRepositoriesComponent
],
providers:[PreviousRouteRecorder, IsRouteEnabled, SearchCommunityDataprovidersService],
exports: [
SuggestedRepositoriesComponent
]
})
export class SuggestedRepositoriesModule {}

View File

@ -1,150 +1,156 @@
<schema2jsonld *ngIf="url" [URL]="url" [name]="title" type="other"></schema2jsonld>
<div class="uk-container uk-container-large uk-section uk-section-small uk-padding-remove-bottom">
<div class="uk-padding-small uk-padding-remove-horizontal">
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
<breadcrumbs [breadcrumbs]="breadcrumbs"></breadcrumbs>
</div>
</div>
<div class="uk-container uk-container-large uk-section uk-section-small uk-margin-medium-bottom" id="tm-main">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<div class="uk-container uk-container-large uk-margin-bottom">
<h2 class="uk-margin-top uk-margin-medium-bottom uk-width-2-5@m">Deposit your research in Zenodo.</h2>
<div *ngIf="masterZenodoCommunity" class="uk-animation-fade uk-margin-medium-top uk-margin-large-bottom">
<h6 class="uk-margin-medium-bottom">Main Zenodo community</h6>
<div class="uk-grid uk-grid-large uk-child-width-1-2@s" uk-grid>
<div>
<div class="uk-card uk-card-default">
<div class="uk-card-body">
<div class="uk-grid uk-grid-medium uk-flex-middle" uk-grid>
<div class="uk-width-auto" *ngIf="masterZenodoCommunity.logoUrl">
<a target="_blank" [href]="masterZenodoCommunity.link">
<img *ngIf="masterZenodoCommunity.logoUrl"
src="{{masterZenodoCommunity.logoUrl}}" width="80" height="80" alt="">
</a>
</div>
<div class="uk-width-expand">
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
<a *ngIf="masterZenodoCommunity.link" class="custom-external uk-link uk-link-heading uk-width-expand" target="_blank"
href="{{masterZenodoCommunity.link}}">
<span *ngIf="masterZenodoCommunity.title">{{masterZenodoCommunity.title}}</span>
<span *ngIf="!masterZenodoCommunity.title">[no name available]</span>
</a>
<span *ngIf="!masterZenodoCommunity.link">
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<div class="uk-container uk-container-large uk-margin-bottom">
<div class="uk-grid uk-grid-large uk-child-width-1-2@s uk-flex uk-flex-middle" uk-grid>
<div>
<h2 class="uk-margin-top uk-margin-medium-bottom">Deposit your research in Zenodo.</h2>
<div *ngIf="masterZenodoCommunity" class="uk-animation-fade uk-margin-medium-top uk-margin-large-bottom">
<h6 class="uk-margin-medium-bottom">Main Zenodo community</h6>
<div class="uk-card uk-card-default">
<div class="uk-card-body">
<div class="uk-grid uk-grid-medium uk-flex-middle" uk-grid>
<div class="uk-width-auto" *ngIf="masterZenodoCommunity.logoUrl">
<a target="_blank" [href]="masterZenodoCommunity.link">
<img *ngIf="masterZenodoCommunity.logoUrl"
src="{{masterZenodoCommunity.logoUrl}}" width="80" height="80" alt="">
</a>
</div>
<div class="uk-width-expand">
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
<a *ngIf="masterZenodoCommunity.link"
class="custom-external uk-link uk-link-heading uk-width-expand" target="_blank"
href="{{masterZenodoCommunity.link}}">
<span *ngIf="masterZenodoCommunity.title">{{masterZenodoCommunity.title}}</span>
<span *ngIf="!masterZenodoCommunity.title">[no name available]</span>
</a>
<span *ngIf="!masterZenodoCommunity.link">
<span *ngIf="masterZenodoCommunity.title">{{masterZenodoCommunity.title}}</span>
<span *ngIf="!masterZenodoCommunity.title">[no name available]</span>
</span>
</h2>
<div *ngIf="masterZenodoCommunity.date" class="uk-text-small uk-margin-small-top">
<span class="uk-text-meta">Last update: </span>{{masterZenodoCommunity.date | date:'yyyy/MM/dd'}}
</div>
</div>
</div>
<div *ngIf="masterZenodoCommunity.description" class="uk-margin-top uk-margin-bottom uk-text-small">
<p *ngIf="masterZenodoCommunity.description" class="uk-margin-remove" [innerHTML]="masterZenodoCommunity.description"></p>
</div>
<div>
</h2>
<div *ngIf="masterZenodoCommunity.date" class="uk-text-small uk-margin-small-top">
<span class="uk-text-meta">Last update: </span>{{masterZenodoCommunity.date | date:'yyyy/MM/dd'}}
</div>
</div>
</div>
<div *ngIf="masterZenodoCommunity.description" class="uk-margin-top uk-margin-bottom uk-text-small">
<p *ngIf="masterZenodoCommunity.description" class="uk-margin-remove"
[innerHTML]="masterZenodoCommunity.description"></p>
</div>
<div>
<span class="uk-width-expand uk-flex-right">
<a [href]="depositLink + masterZenodoCommunity.id" target="_blank" type="submit"
class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
<span class="uk-flex uk-flex-middle">
<icon name="file_upload" type="outlined" [flex]="true" class="uk-margin-small-right"></icon>
<span>New upload</span>
</span>
</a>
</span>
</div>
</div>
</div>
</div>
<div class="uk-flex uk-flex-center uk-flex-middle">
<div class="uk-padding">
<!-- <div class="uk-flex uk-flex-column uk-flex-middle uk-margin-large-bottom">
<img src="assets/connect-assets/deposit/suggested-repositories.svg" alt="Suggested Repositories" class="uk-width-small uk-margin-bottom" style="height: 70px;">
<a routerLink="/participate/deposit/search" type="submit"
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
Suggested Repositories
</a>
</div> -->
<div class="uk-flex uk-flex-column uk-flex-middle">
<img src="assets/common-assets/common/Logo_Horizontal.png" alt="OpenAIRE logo" class="uk-width-small uk-margin-bottom">
<a routerLink="/participate/deposit/search" type="submit"
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
OpenAIRE Compliant Repositories
</a>
</div>
</div>
</div>
</div>
</div>
<div *ngIf="zenodoSearchUtils.status == errorCodes.LOADING"
class="uk-animation-fade uk-margin-large uk-padding-large uk-padding-remove-horizontal" role="alert">
<loading></loading>
</div>
<div *ngIf="(zenodoSearchUtils.status == errorCodes.ERROR || zenodoSearchUtils.status == errorCodes.NONE) && !masterZenodoCommunity"
class="uk-animation-fade uk-margin-top uk-width-1-1 uk-alert uk-alert-warning" role="alert">
No zenodo communities found
</div>
<div class="uk-section">
<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'"
(pageChange)="getCommunities($event)"
[page]="page" [pageSize]="size"
[totalResults]="communityIds.length" >
</no-load-paging>
<div *ngIf="communityIds && communityIds.length > 0" class="uk-grid uk-grid-medium uk-grid-match uk-child-width-1-2@m uk-margin-top" uk-grid
uk-height-match="target: .header, .body">
<ng-template ngFor let-item [ngForOf]="communityIds" let-i="index">
<div *ngIf="i>=((page-1)*size) && i < communityIds.length && i< this.page * this.size && communities[this.communityIds[i]]"
class="uk-animation-fade">
<div class="uk-card uk-card-default">
<div class="uk-card-body">
<div class="header uk-grid uk-grid-medium uk-flex-middle" uk-grid>
<div class="uk-width-auto" *ngIf="communities[this.communityIds[i]].logoUrl">
<a target="_blank" [href]="communities[this.communityIds[i]].link">
<img *ngIf="communities[this.communityIds[i]].logoUrl"
src="{{communities[this.communityIds[i]].logoUrl}}" width="80" height="80" alt="">
</a>
</div>
<div class="uk-width-expand">
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
<a class="custom-external uk-link uk-link-heading uk-width-expand" target="_blank"
href="{{communities[this.communityIds[i]].link}}">
<span *ngIf="communities[this.communityIds[i]].title">{{communities[this.communityIds[i]].title}}</span>
<span *ngIf="!communities[this.communityIds[i]].title">[no name available]</span>
</a>
</h2>
<div class="uk-text-small uk-margin-small-top">
<span class="uk-text-meta">Last update: </span>{{communities[this.communityIds[i]].date | date:'yyyy/MM/dd'}}
</div>
</div>
</div>
<div class="body uk-margin-top uk-margin-bottom uk-text-small multi-line-ellipsis lines-3"> <!-- uk-height-max-small uk-overflow-auto -->
<p *ngIf="communities[this.communityIds[i]].description" class="uk-margin-remove" [innerHtml]="communities[this.communityIds[i]].description"></p>
</div>
<div>
</div>
</div>
</div>
</div>
</div>
<div class="uk-flex uk-flex-center uk-flex-middle">
<div class="uk-padding">
<div class="uk-flex uk-flex-column uk-flex-middle uk-margin-large-bottom">
<img src="assets/connect-assets/deposit/suggested-repositories.svg" alt="Suggested Repositories"
class="uk-width-small uk-margin-bottom" style="height: 70px;">
<a routerLink="/participate/deposit/suggested" type="submit"
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
Suggested Repositories
</a>
</div>
<div class="uk-flex uk-flex-column uk-flex-middle">
<img src="assets/common-assets/common/Logo_Horizontal.png" alt="OpenAIRE logo"
class="uk-width-small uk-margin-bottom">
<a routerLink="/participate/deposit/search" type="submit"
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
OpenAIRE Compliant Repositories
</a>
</div>
</div>
</div>
</div>
<div *ngIf="zenodoSearchUtils.status == errorCodes.LOADING"
class="uk-animation-fade uk-margin-large uk-padding-large uk-padding-remove-horizontal" role="alert">
<loading></loading>
</div>
<div
*ngIf="(zenodoSearchUtils.status == errorCodes.ERROR || zenodoSearchUtils.status == errorCodes.NONE) && !masterZenodoCommunity"
class="uk-animation-fade uk-margin-top uk-width-1-1 uk-alert uk-alert-warning" role="alert">
No zenodo communities found
</div>
<div class="uk-section">
<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>
<no-load-paging *ngIf="communityIds && communityIds.length > size" [type]="'Zenodo communities'"
(pageChange)="getCommunities($event)"
[page]="page" [pageSize]="size"
[totalResults]="communityIds.length">
</no-load-paging>
<div *ngIf="communityIds && communityIds.length > 0"
class="uk-grid uk-grid-medium uk-grid-match uk-child-width-1-2@m uk-margin-top" uk-grid
uk-height-match="target: .header, .body">
<ng-template ngFor let-item [ngForOf]="communityIds" let-i="index">
<div
*ngIf="i>=((page-1)*size) && i < communityIds.length && i< this.page * this.size && communities[this.communityIds[i]]"
class="uk-animation-fade">
<div class="uk-card uk-card-default">
<div class="uk-card-body">
<div class="header uk-grid uk-grid-medium uk-flex-middle" uk-grid>
<div class="uk-width-auto" *ngIf="communities[this.communityIds[i]].logoUrl">
<a target="_blank" [href]="communities[this.communityIds[i]].link">
<img *ngIf="communities[this.communityIds[i]].logoUrl"
src="{{communities[this.communityIds[i]].logoUrl}}" width="80" height="80" alt="">
</a>
</div>
<div class="uk-width-expand">
<h2 class="uk-margin-remove uk-text-break uk-inline-block uk-h6">
<a class="custom-external uk-link uk-link-heading uk-width-expand" target="_blank"
href="{{communities[this.communityIds[i]].link}}">
<span
*ngIf="communities[this.communityIds[i]].title">{{communities[this.communityIds[i]].title}}</span>
<span *ngIf="!communities[this.communityIds[i]].title">[no name available]</span>
</a>
</h2>
<div class="uk-text-small uk-margin-small-top">
<span
class="uk-text-meta">Last update: </span>{{communities[this.communityIds[i]].date | date:'yyyy/MM/dd'}}
</div>
</div>
</div>
<div class="body uk-margin-top uk-margin-bottom uk-text-small multi-line-ellipsis lines-3">
<!-- uk-height-max-small uk-overflow-auto -->
<p *ngIf="communities[this.communityIds[i]].description" class="uk-margin-remove"
[innerHtml]="communities[this.communityIds[i]].description"></p>
</div>
<div>
<span class="uk-width-expand uk-flex-right">
<a [href]="depositLink + communities[this.communityIds[i]].id" target="_blank" type="submit"
class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text">
<span class="uk-flex uk-flex-middle">
<icon name="file_upload" type="outlined" [flex]="true" class="uk-margin-small-right"></icon>
<span>New upload</span>
</span>
</a>
</span>
</div>
</div>
</div>
</div>
</ng-template>
</div>
</div>
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
</div>
</div>
</div>
</div>
</ng-template>
</div>
</div>
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
</div>

View File

@ -17,6 +17,7 @@ import {BreadcrumbsModule} from "../../openaireLibrary/utils/breadcrumbs/breadcr
import {NoLoadPaging} from "../../openaireLibrary/searchPages/searchUtils/no-load-paging.module";
import {IconsModule} from 'src/app/openaireLibrary/utils/icons/icons.module';
import {LoadingModule} from 'src/app/openaireLibrary/utils/loading/loading.module';
import {SearchCommunityDataprovidersService} from "../../openaireLibrary/connect/contentProviders/searchDataproviders.service";
@NgModule({
imports: [
@ -27,7 +28,7 @@ import {LoadingModule} from 'src/app/openaireLibrary/utils/loading/loading.modul
declarations: [
ShareInZenodoComponent
],
providers:[PreviousRouteRecorder, IsRouteEnabled],
providers:[PreviousRouteRecorder, IsRouteEnabled, SearchCommunityDataprovidersService],
exports: [
ShareInZenodoComponent
]