From 3ec805c51ca51a520cebd032d2d3637bb6fc49f3 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Wed, 31 Jan 2024 11:05:46 +0200 Subject: [PATCH] [plugins-functionality | WIP] create plugins on separate folders/components --- ...in-discover-by-subcommunity.component.html | 13 ++ ...ugin-discover-by-subcommunity.component.ts | 12 ++ .../plugin-discover-by-subcommunity.module.ts | 25 +++ .../plugin-featured-datasets.component.html | 15 ++ .../plugin-featured-datasets.component.ts | 12 ++ .../plugin-featured-datasets.module.ts | 25 +++ .../plugin-gateway-information.component.html | 80 +++++++++ .../plugin-gateway-information.component.less | 16 ++ .../plugin-gateway-information.component.ts | 164 ++++++++++++++++++ .../plugin-gateway-information.module.ts | 27 +++ .../plugin-how-to-use.component.html | 58 +++++++ .../how-to-use/plugin-how-to-use.component.ts | 12 ++ .../how-to-use/plugin-how-to-use.module.ts | 25 +++ .../plugin-learn-and-connect.component.html | 57 ++++++ .../plugin-learn-and-connect.component.ts | 12 ++ .../plugin-learn-and-connect.module.ts | 25 +++ .../plugin-search-deposit-link.component.html | 2 + .../plugin-search-deposit-link.component.ts | 12 ++ .../plugin-search-deposit-link.module.ts | 25 +++ ...ugin-suggested-repositories.component.html | 65 +++++++ ...plugin-suggested-repositories.component.ts | 12 ++ .../plugin-suggested-repositories.module.ts | 25 +++ .../wrapper/plugin-wrapper.component.ts | 21 +++ .../plugins/wrapper/plugin-wrapper.module.ts | 13 +- 24 files changed, 751 insertions(+), 2 deletions(-) create mode 100644 dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.component.html create mode 100644 dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.component.ts create mode 100644 dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.module.ts create mode 100644 dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.html create mode 100644 dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.ts create mode 100644 dashboard/plugins/components/featured-datasets/plugin-featured-datasets.module.ts create mode 100644 dashboard/plugins/components/gateway-information/plugin-gateway-information.component.html create mode 100644 dashboard/plugins/components/gateway-information/plugin-gateway-information.component.less create mode 100644 dashboard/plugins/components/gateway-information/plugin-gateway-information.component.ts create mode 100644 dashboard/plugins/components/gateway-information/plugin-gateway-information.module.ts create mode 100644 dashboard/plugins/components/how-to-use/plugin-how-to-use.component.html create mode 100644 dashboard/plugins/components/how-to-use/plugin-how-to-use.component.ts create mode 100644 dashboard/plugins/components/how-to-use/plugin-how-to-use.module.ts create mode 100644 dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.component.html create mode 100644 dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.component.ts create mode 100644 dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.module.ts create mode 100644 dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.html create mode 100644 dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.ts create mode 100644 dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.module.ts create mode 100644 dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.component.html create mode 100644 dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.component.ts create mode 100644 dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.module.ts diff --git a/dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.component.html b/dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.component.html new file mode 100644 index 00000000..33b05dd4 --- /dev/null +++ b/dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.component.html @@ -0,0 +1,13 @@ +
plugin-discover-by-subcommunity
+
+

+ Discover content by sub-community +

+ +
\ No newline at end of file diff --git a/dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.component.ts b/dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.component.ts new file mode 100644 index 00000000..f89bf05f --- /dev/null +++ b/dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; +import {PluginBaseComponent} from "../../utils/base-plugin.component"; + +@Component({ + selector: 'plugin-discover-by-subcommunity', + templateUrl: 'plugin-discover-by-subcommunity.component.html' +}) +export class PluginDiscoverBySubcommunityComponent extends PluginBaseComponent{ + constructor() { + super() + } +} diff --git a/dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.module.ts b/dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.module.ts new file mode 100644 index 00000000..744c8ae5 --- /dev/null +++ b/dashboard/plugins/components/discover-by-subcommunity/plugin-discover-by-subcommunity.module.ts @@ -0,0 +1,25 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; +import {PluginsService} from "../../../../services/plugins.service"; +import {IconsModule} from "../../../../utils/icons/icons.module"; +import {NumberRoundModule} from "../../../../utils/pipes/number-round.module"; +import {IconsService} from "../../../../utils/icons/icons.service"; +import {SearchResearchResultsServiceModule} from "../../../../services/searchResearchResultsService.module"; +import {PluginFieldEditModule} from "../../utils/plugin-field-edit.module"; +import {PluginDiscoverBySubcommunityComponent} from './plugin-discover-by-subcommunity.component'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule + ], + providers:[PluginsService], + declarations: [PluginDiscoverBySubcommunityComponent], + exports: [PluginDiscoverBySubcommunityComponent] +}) +export class PluginDiscoverBySubcommunityModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([]) + } +} diff --git a/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.html b/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.html new file mode 100644 index 00000000..0c383a37 --- /dev/null +++ b/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.html @@ -0,0 +1,15 @@ +
plugin-featured-datasets
+ \ No newline at end of file diff --git a/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.ts b/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.ts new file mode 100644 index 00000000..27e3e061 --- /dev/null +++ b/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; +import {PluginBaseComponent} from "../../utils/base-plugin.component"; + +@Component({ + selector: 'plugin-featured-datasets', + templateUrl: 'plugin-featured-datasets.component.html' +}) +export class PluginFeaturedDatasetsComponent extends PluginBaseComponent{ + constructor() { + super() + } +} diff --git a/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.module.ts b/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.module.ts new file mode 100644 index 00000000..e34b810d --- /dev/null +++ b/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.module.ts @@ -0,0 +1,25 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; +import {PluginsService} from "../../../../services/plugins.service"; +import {IconsModule} from "../../../../utils/icons/icons.module"; +import {NumberRoundModule} from "../../../../utils/pipes/number-round.module"; +import {IconsService} from "../../../../utils/icons/icons.service"; +import {SearchResearchResultsServiceModule} from "../../../../services/searchResearchResultsService.module"; +import {PluginFieldEditModule} from "../../utils/plugin-field-edit.module"; +import {PluginFeaturedDatasetsComponent} from './plugin-featured-datasets.component'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule + ], + providers:[PluginsService], + declarations: [PluginFeaturedDatasetsComponent], + exports: [PluginFeaturedDatasetsComponent] +}) +export class PluginFeaturedDatasetsModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([]) + } +} diff --git a/dashboard/plugins/components/gateway-information/plugin-gateway-information.component.html b/dashboard/plugins/components/gateway-information/plugin-gateway-information.component.html new file mode 100644 index 00000000..808e964f --- /dev/null +++ b/dashboard/plugins/components/gateway-information/plugin-gateway-information.component.html @@ -0,0 +1,80 @@ +
plugin-gateway-information
+
+ +
+
+ Gateway Information +
+
+ +
+
+ Created: {{community.date | date:'dd-MMM-yyyy'}} +
+ +
+
\ No newline at end of file diff --git a/dashboard/plugins/components/gateway-information/plugin-gateway-information.component.less b/dashboard/plugins/components/gateway-information/plugin-gateway-information.component.less new file mode 100644 index 00000000..099bd4a1 --- /dev/null +++ b/dashboard/plugins/components/gateway-information/plugin-gateway-information.component.less @@ -0,0 +1,16 @@ +.plugin-gateway-information { + overflow: hidden; + position: relative; + .plugin-background { + object-fit: cover; + opacity: 0.3; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + } + .plugin-content { + position: relative; + } +} \ No newline at end of file diff --git a/dashboard/plugins/components/gateway-information/plugin-gateway-information.component.ts b/dashboard/plugins/components/gateway-information/plugin-gateway-information.component.ts new file mode 100644 index 00000000..8647f53a --- /dev/null +++ b/dashboard/plugins/components/gateway-information/plugin-gateway-information.component.ts @@ -0,0 +1,164 @@ +import {Component} from '@angular/core'; +import {PluginBaseComponent} from "../../utils/base-plugin.component"; +import {ConfigurationService} from '../../../../../openaireLibrary/utils/configuration/configuration.service'; +import {CommunityService} from '../../../../../openaireLibrary/connect/community/community.service'; +import {SearchCommunityProjectsService} from '../../../../../openaireLibrary/connect/projects/searchProjects.service'; +import {SearchCommunityDataprovidersService} from '../../../../../openaireLibrary/connect/contentProviders/searchDataproviders.service'; +import {ZenodoCommunitiesService} from '../../../../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service'; +import {ConnectHelper} from '../../../../../openaireLibrary/connect/connectHelper'; +import {User} from '../../../../../openaireLibrary/login/utils/helper.class'; + +@Component({ + selector: 'plugin-gateway-information', + templateUrl: 'plugin-gateway-information.component.html', + styleUrls: ['plugin-gateway-information.component.less'] +}) +export class PluginGatewayInformationComponent extends PluginBaseComponent{ + community = null; + portal = null; + params: any = {}; + + projectTotal = null; + contentProviderTotal = null; + projectsCalculated: boolean = false; + contentProvidersCalculated: boolean = false; + zenodoCommunityIdS = []; + masterZenodoCommunity = null; + + searchLinkToProjects: string = null; + searchLinkToDataProviders: string = null; + shareInZenodoPage: string = null; + + displayedAllSubjects = []; + displayedSubjects = []; + displayedSdg = []; + displayedFos = []; + + private user: User; + + constructor(private config: ConfigurationService, + private communityService: CommunityService, + private searchCommunityProjectsService: SearchCommunityProjectsService, + private searchCommunityDataprovidersService: SearchCommunityDataprovidersService, + private zenodoCommunitiesService: ZenodoCommunitiesService) { + super() + } + + ngOnInit() { + this.searchLinkToProjects = this.properties.searchLinkToProjects; + this.searchLinkToDataProviders = this.properties.searchLinkToDataProviders; + this.shareInZenodoPage = this.properties.shareInZenodoPage; + + this.subscriptions.push(this.config.portalAsObservable.subscribe( + res => { + console.log(res); + this.portal = res; + }, + error => { + console.log(error); + } + )); + this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe( + community => { + console.log(community); + this.community = community; + if(community && !ConnectHelper.isPrivate(community, this.user)) { + this.displayedSubjects = community.subjects; + this.displayedSdg = community.sdg; + this.displayedFos = community.fos; + this.displayedSubjects.forEach(element => { + this.displayedAllSubjects.push({value: element, type: 'resultsubject'}); + }); + this.displayedSdg.forEach(element => { + this.displayedAllSubjects.push({value: element, type: 'sdg'}); + }); + this.displayedFos.forEach(element => { + this.displayedAllSubjects.push({value: element, type: 'fos'}); + }); + if (this.properties.environment == "development") { + this.params = {communityId: community.communityId}; + } + if (this.community.zenodoCommunity) { + this.subscriptions.push(this.zenodoCommunitiesService.getZenodoCommunityById(this.properties, this.properties.zenodoCommunities + this.community.zenodoCommunity).subscribe( + res => { + this.masterZenodoCommunity = res; + }, + error => { + console.log(error); + } + )); + } + this.zenodoCommunityIdS = this.community.otherZenodoCommunities; + } + } + )); + // Double check below: is `this.community.communityId` correct? the other way was through @input communityID from ConnectHelper service - domain + this.subscriptions.push(this.searchCommunityProjectsService.countTotalProjects(this.properties, this.community.communityId).subscribe( + res => { + this.projectTotal = res; + }, + error => { + console.log(error); + }, + () => { + this.projectsCalculated = true; + } + )); + // Double check below: is `this.community.communityId` correct? the other way was through @input communityID from ConnectHelper service - domain + this.subscriptions.push(this.searchCommunityDataprovidersService.countTotalDataproviders(this.properties, this.community.communityId).subscribe( + res => { + this.contentProviderTotal = res; + }, + error => { + console.log(error); + }, + () => { + this.contentProvidersCalculated = true; + } + )); + } + + isEntityEnabled(entity: string) { + return this.portal.entities.some(x => x['pid'] == entity && x['isEnabled'] === true); + } + + isRouteEnabled(route: string) { + return this.portal.pages.some(x => x['route'] == route && x['isEnabled'] === true); + } + + buildProjectsTooltip(): string { + let tooltipContent: string = "
"; + + if (this.projectTotal != null && this.projectTotal > 0 && this.isEntityEnabled('project') && this.isRouteEnabled(this.searchLinkToProjects)) { + tooltipContent += "Projects"; + } + + tooltipContent += " have been selected as relevant for your community by the gateway curators."; + tooltipContent += "
"; + + return tooltipContent; + } + + public buildContentProvidersTooltip(): string { + let tooltipContent: string = "
"; + + if (this.contentProviderTotal != null && this.contentProviderTotal > 0 && this.isEntityEnabled('datasource') && this.isRouteEnabled(this.searchLinkToDataProviders)) { + tooltipContent += "Content Providers"; + } + + tooltipContent += " have been selected as relevant for your community by the gateway curators."; + tooltipContent += "
"; + + return tooltipContent; + } + + public buildZenodoCommunitiesTooltip(): string { + let tooltipContent: string = "
"; + + tooltipContent += "Zenodo is a catch-all repository for OpenAIRE."; + tooltipContent += "
A Zenodo Community is created and curated by Zenodo users.
"; + tooltipContent += "
"; + + return tooltipContent; + } +} diff --git a/dashboard/plugins/components/gateway-information/plugin-gateway-information.module.ts b/dashboard/plugins/components/gateway-information/plugin-gateway-information.module.ts new file mode 100644 index 00000000..cf54391a --- /dev/null +++ b/dashboard/plugins/components/gateway-information/plugin-gateway-information.module.ts @@ -0,0 +1,27 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; +import {PluginsService} from "../../../../services/plugins.service"; +import {IconsModule} from "../../../../utils/icons/icons.module"; +import {NumberRoundModule} from "../../../../utils/pipes/number-round.module"; +import {IconsService} from "../../../../utils/icons/icons.service"; +import {SearchResearchResultsServiceModule} from "../../../../services/searchResearchResultsService.module"; +import {PluginFieldEditModule} from "../../utils/plugin-field-edit.module"; +import {PluginGatewayInformationComponent} from './plugin-gateway-information.component'; +import {CuratorsModule} from '../../../../../curators/curators.module'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule, + CuratorsModule + ], + providers:[PluginsService], + declarations: [PluginGatewayInformationComponent], + exports: [PluginGatewayInformationComponent] +}) +export class PluginGatewayInformationModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([]) + } +} diff --git a/dashboard/plugins/components/how-to-use/plugin-how-to-use.component.html b/dashboard/plugins/components/how-to-use/plugin-how-to-use.component.html new file mode 100644 index 00000000..e69947e3 --- /dev/null +++ b/dashboard/plugins/components/how-to-use/plugin-how-to-use.component.html @@ -0,0 +1,58 @@ +
plugin-how-to-use
+
+

+ How to use the gateway? +

+
+
+ +
+
+ +
+
+ Tutorials +
+
+ The mini-video tutorials can help you find quick answers on specific gateway functionalities. +
+ + View all + +
+ +
+
+ +
+
+ Guides +
+
+ Textual guides to all gateway functionalities. +
+ + Guide for the users + + + Guide for the managers + +
+ +
+
+ +
+
+ Webinars +
+
+ Recordings and slides of webinars on OpenAIRE CONNECT and your gateway. +
+ + View all + +
+
+
+
\ No newline at end of file diff --git a/dashboard/plugins/components/how-to-use/plugin-how-to-use.component.ts b/dashboard/plugins/components/how-to-use/plugin-how-to-use.component.ts new file mode 100644 index 00000000..31fa75b4 --- /dev/null +++ b/dashboard/plugins/components/how-to-use/plugin-how-to-use.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; +import {PluginBaseComponent} from "../../utils/base-plugin.component"; + +@Component({ + selector: 'plugin-how-to-use', + templateUrl: 'plugin-how-to-use.component.html' +}) +export class PluginHowToUseComponent extends PluginBaseComponent{ + constructor() { + super() + } +} diff --git a/dashboard/plugins/components/how-to-use/plugin-how-to-use.module.ts b/dashboard/plugins/components/how-to-use/plugin-how-to-use.module.ts new file mode 100644 index 00000000..b7a35e6c --- /dev/null +++ b/dashboard/plugins/components/how-to-use/plugin-how-to-use.module.ts @@ -0,0 +1,25 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; +import {PluginsService} from "../../../../services/plugins.service"; +import {IconsModule} from "../../../../utils/icons/icons.module"; +import {NumberRoundModule} from "../../../../utils/pipes/number-round.module"; +import {IconsService} from "../../../../utils/icons/icons.service"; +import {SearchResearchResultsServiceModule} from "../../../../services/searchResearchResultsService.module"; +import {PluginFieldEditModule} from "../../utils/plugin-field-edit.module"; +import {PluginHowToUseComponent} from './plugin-how-to-use.component'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule + ], + providers:[PluginsService], + declarations: [PluginHowToUseComponent], + exports: [PluginHowToUseComponent] +}) +export class PluginHowToUseModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([]) + } +} diff --git a/dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.component.html b/dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.component.html new file mode 100644 index 00000000..8613e3bc --- /dev/null +++ b/dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.component.html @@ -0,0 +1,57 @@ +
plugin-learn-and-connect
+
+

+ Learn & Connect with Open Science +

+
+
+ +
+
+ +
+
+ OS Practices +
+
+ Open Science best practices for your community, policies and mandates. +
+ + Learn more + +
+ +
+
+ +
+
+ OS Guides for beginners +
+
+ New to Open Science? Learn the basics! +
+ +
+ +
+
+ +
+
+ Webinars +
+
+ Recordings and slides of webinars on different aspects of Open Science. +
+ + Learn more + +
+
+
+
\ No newline at end of file diff --git a/dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.component.ts b/dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.component.ts new file mode 100644 index 00000000..0661e263 --- /dev/null +++ b/dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; +import {PluginBaseComponent} from "../../utils/base-plugin.component"; + +@Component({ + selector: 'plugin-learn-and-connect', + templateUrl: 'plugin-learn-and-connect.component.html' +}) +export class PluginLearnAndConnectComponent extends PluginBaseComponent{ + constructor() { + super() + } +} diff --git a/dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.module.ts b/dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.module.ts new file mode 100644 index 00000000..3fdaebb2 --- /dev/null +++ b/dashboard/plugins/components/learn-and-connect/plugin-learn-and-connect.module.ts @@ -0,0 +1,25 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; +import {PluginsService} from "../../../../services/plugins.service"; +import {IconsModule} from "../../../../utils/icons/icons.module"; +import {NumberRoundModule} from "../../../../utils/pipes/number-round.module"; +import {IconsService} from "../../../../utils/icons/icons.service"; +import {SearchResearchResultsServiceModule} from "../../../../services/searchResearchResultsService.module"; +import {PluginFieldEditModule} from "../../utils/plugin-field-edit.module"; +import {PluginLearnAndConnectComponent} from './plugin-learn-and-connect.component'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule + ], + providers:[PluginsService], + declarations: [PluginLearnAndConnectComponent], + exports: [PluginLearnAndConnectComponent] +}) +export class PluginLearnAndConnectModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([]) + } +} diff --git a/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.html b/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.html new file mode 100644 index 00000000..4819e6be --- /dev/null +++ b/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.html @@ -0,0 +1,2 @@ +
plugin-search-deposit-link
+ \ No newline at end of file diff --git a/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.ts b/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.ts new file mode 100644 index 00000000..5c2272f0 --- /dev/null +++ b/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; +import {PluginBaseComponent} from "../../utils/base-plugin.component"; + +@Component({ + selector: 'plugin-search-deposit-link', + templateUrl: 'plugin-search-deposit-link.component.html' +}) +export class PluginSearchDepositLinkComponent extends PluginBaseComponent{ + constructor() { + super() + } +} diff --git a/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.module.ts b/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.module.ts new file mode 100644 index 00000000..54269f97 --- /dev/null +++ b/dashboard/plugins/components/search-deposit-link/plugin-search-deposit-link.module.ts @@ -0,0 +1,25 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; +import {PluginsService} from "../../../../services/plugins.service"; +import {IconsModule} from "../../../../utils/icons/icons.module"; +import {NumberRoundModule} from "../../../../utils/pipes/number-round.module"; +import {IconsService} from "../../../../utils/icons/icons.service"; +import {SearchResearchResultsServiceModule} from "../../../../services/searchResearchResultsService.module"; +import {PluginFieldEditModule} from "../../utils/plugin-field-edit.module"; +import {PluginSearchDepositLinkComponent} from './plugin-search-deposit-link.component'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule + ], + providers:[PluginsService], + declarations: [PluginSearchDepositLinkComponent], + exports: [PluginSearchDepositLinkComponent] +}) +export class PluginSearchDepositLinkModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([]) + } +} diff --git a/dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.component.html b/dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.component.html new file mode 100644 index 00000000..88534d5a --- /dev/null +++ b/dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.component.html @@ -0,0 +1,65 @@ +
plugin-suggested-repositories
+
+
+

+ + Suggested repositories & journals +

+ + View all + +
+
+ +
    +
    +
    \ No newline at end of file diff --git a/dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.component.ts b/dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.component.ts new file mode 100644 index 00000000..04e13e93 --- /dev/null +++ b/dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.component.ts @@ -0,0 +1,12 @@ +import {Component} from '@angular/core'; +import {PluginBaseComponent} from "../../utils/base-plugin.component"; + +@Component({ + selector: 'plugin-suggested-repositories', + templateUrl: 'plugin-suggested-repositories.component.html' +}) +export class PluginSuggestedRepositoriesComponent extends PluginBaseComponent{ + constructor() { + super() + } +} diff --git a/dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.module.ts b/dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.module.ts new file mode 100644 index 00000000..ab061bd3 --- /dev/null +++ b/dashboard/plugins/components/suggested-repositories/plugin-suggested-repositories.module.ts @@ -0,0 +1,25 @@ +import {NgModule} from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {FormsModule} from '@angular/forms'; +import {PluginsService} from "../../../../services/plugins.service"; +import {IconsModule} from "../../../../utils/icons/icons.module"; +import {NumberRoundModule} from "../../../../utils/pipes/number-round.module"; +import {IconsService} from "../../../../utils/icons/icons.service"; +import {SearchResearchResultsServiceModule} from "../../../../services/searchResearchResultsService.module"; +import {PluginFieldEditModule} from "../../utils/plugin-field-edit.module"; +import {PluginSuggestedRepositoriesComponent} from './plugin-suggested-repositories.component'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule + ], + providers:[PluginsService], + declarations: [PluginSuggestedRepositoriesComponent], + exports: [PluginSuggestedRepositoriesComponent] +}) +export class PluginSuggestedRepositoriesModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([]) + } +} diff --git a/dashboard/plugins/wrapper/plugin-wrapper.component.ts b/dashboard/plugins/wrapper/plugin-wrapper.component.ts index 043aa52c..f65de01a 100644 --- a/dashboard/plugins/wrapper/plugin-wrapper.component.ts +++ b/dashboard/plugins/wrapper/plugin-wrapper.component.ts @@ -17,6 +17,27 @@ import {PluginEditEvent} from "../utils/base-plugin.component"; + + + + + + + + + + + + + + + + + + + + + `, diff --git a/dashboard/plugins/wrapper/plugin-wrapper.module.ts b/dashboard/plugins/wrapper/plugin-wrapper.module.ts index 606d01fb..a158ff26 100644 --- a/dashboard/plugins/wrapper/plugin-wrapper.module.ts +++ b/dashboard/plugins/wrapper/plugin-wrapper.module.ts @@ -2,14 +2,23 @@ import {NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; import {CommonModule} from '@angular/common'; import {FormsModule} from '@angular/forms'; -import {PluginResultsNumbersModule} from "../components/results-numbers/plugin-results-numbers.module"; import {PluginWrapperComponent} from "./plugin-wrapper.component"; import {PluginTestModule} from "../components/test/plugin-test.module"; import {PluginOpenaireProductsModule} from "../components/openaireProducts/plugin-openaire-products.module"; +import {PluginResultsNumbersModule} from "../components/results-numbers/plugin-results-numbers.module"; +import {PluginDiscoverBySubcommunityModule} from '../components/discover-by-subcommunity/plugin-discover-by-subcommunity.module'; +import {PluginGatewayInformationModule} from '../components/gateway-information/plugin-gateway-information.module'; +import {PluginSearchDepositLinkModule} from '../components/search-deposit-link/plugin-search-deposit-link.module'; +import {PluginLearnAndConnectModule} from '../components/learn-and-connect/plugin-learn-and-connect.module'; +import {PluginHowToUseModule} from '../components/how-to-use/plugin-how-to-use.module'; +import {PluginSuggestedRepositoriesModule} from '../components/suggested-repositories/plugin-suggested-repositories.module'; +import {PluginFeaturedDatasetsModule} from '../components/featured-datasets/plugin-featured-datasets.module'; @NgModule({ imports: [ - CommonModule, RouterModule, FormsModule, PluginResultsNumbersModule, PluginTestModule, PluginOpenaireProductsModule + CommonModule, RouterModule, FormsModule, PluginResultsNumbersModule, PluginTestModule, PluginOpenaireProductsModule, + PluginDiscoverBySubcommunityModule, PluginGatewayInformationModule, PluginSearchDepositLinkModule, PluginLearnAndConnectModule, + PluginHowToUseModule, PluginSuggestedRepositoriesModule, PluginFeaturedDatasetsModule ], declarations: [PluginWrapperComponent], exports: [PluginWrapperComponent]