From f5ec98eb88d9f92ec4bb776be99ce818f1b33ee3 Mon Sep 17 00:00:00 2001 From: argirok Date: Wed, 6 Mar 2024 15:26:14 +0200 Subject: [PATCH] [plugins-functionality | WIP] affiliations update the way to get community id, updates on plugins --- .../affiliations/affiliations.component.ts | 10 +++---- .../plugin-featured-datasets.component.html | 26 ++++++++++------- .../plugin-featured-datasets.component.ts | 9 ++---- .../plugin-featured-datasets.module.ts | 3 +- .../plugin-gateway-information.component.html | 2 +- .../plugin-gateway-information.component.ts | 6 ++++ .../plugin-how-to-use.form.component.ts | 28 +++++++------------ ...plugin-learn-and-connect.form.component.ts | 21 +++----------- .../plugin-openaire-products.component.ts | 1 + .../plugin-organizations.component.html | 2 +- .../plugin-search-deposit-link.component.html | 27 +++++++++--------- .../plugin-search-deposit-link.component.ts | 6 ++++ ...ugin-search-deposit-link.form.component.ts | 21 ++++---------- ...ugin-suggested-repositories.component.html | 11 ++++++-- ...plugin-suggested-repositories.component.ts | 5 +++- .../plugins/utils/base-plugin.component.ts | 8 ++++-- dashboard/plugins/utils/pluginUtils.ts | 3 +- 17 files changed, 94 insertions(+), 95 deletions(-) diff --git a/connect/affiliations/affiliations.component.ts b/connect/affiliations/affiliations.component.ts index f786fe86..395f052a 100644 --- a/connect/affiliations/affiliations.component.ts +++ b/connect/affiliations/affiliations.component.ts @@ -28,13 +28,11 @@ export class AffiliationsComponent { public properties: EnvProperties = properties; private subscriptions = []; - constructor(private route: ActivatedRoute, private affiliationService: AffiliationService) { + constructor(private route: ActivatedRoute, private affiliationService: AffiliationService, private config: ConfigurationService) { } - public ngOnInit(/*private config: ConfigurationService */) { - this.communityId = ConnectHelper.getCommunityFromDomain(properties.domain); - - /* this.subscriptions.push(this.config.portalAsObservable.subscribe( + public ngOnInit() { + this.subscriptions.push(this.config.portalAsObservable.subscribe( res => { // this.portal = res; this.communityId = res.pid @@ -42,7 +40,7 @@ export class AffiliationsComponent { error => { console.log(error); } - ));*/ + )); if (this.getAffiliationsFromAPI) { this.showLoading = true; this.affiliationService.initAffiliations(this.communityId); diff --git a/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.html b/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.html index 7b31dcfe..10828a57 100644 --- a/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.html +++ b/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.html @@ -12,15 +12,21 @@ {{pluginObject.textLine2}} - - - +
+ + +
+ + diff --git a/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.ts b/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.ts index 1eaed3d2..1c760867 100644 --- a/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.ts +++ b/dashboard/plugins/components/featured-datasets/plugin-featured-datasets.component.ts @@ -20,7 +20,8 @@ export class PluginFeaturedDatasetsComponent extends PluginBaseComponent - No community info available available + No community info available