From 10cad849a9d5995820bbb90e2ce8d81a2d8ff9a2 Mon Sep 17 00:00:00 2001 From: argirok Date: Mon, 25 Sep 2023 11:36:05 +0300 Subject: [PATCH 01/32] Initial commit for plugins functionality: Manage Plugin Templates --- src/app/pages/admin-tools/portal-admin-tools-routing.module.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/pages/admin-tools/portal-admin-tools-routing.module.ts b/src/app/pages/admin-tools/portal-admin-tools-routing.module.ts index b92f457..5bb9ac8 100644 --- a/src/app/pages/admin-tools/portal-admin-tools-routing.module.ts +++ b/src/app/pages/admin-tools/portal-admin-tools-routing.module.ts @@ -5,7 +5,8 @@ import {RouterModule} from "@angular/router"; imports: [RouterModule.forChild([ {path: '', loadChildren: () => import('./admin-tools-routing.module').then(m => m.AdminToolsRoutingModule)}, {path: 'portals', loadChildren: () => import('../../openaireLibrary/dashboard/portal/portals.module').then(m => m.PortalsModule)}, - {path: 'classes', loadChildren: () => import('../../openaireLibrary/dashboard/divId/divIds.module').then(m => m.DivIdsModule)} + {path: 'classes', loadChildren: () => import('../../openaireLibrary/dashboard/divId/divIds.module').then(m => m.DivIdsModule)}, + {path: 'templates', loadChildren: () => import('../../openaireLibrary/dashboard/plugins/templates/pluginTemplates.module').then(m => m.PluginTemplatesModule)} ])] }) export class PortalAdminToolsRoutingModule { -- 2.17.1 From 703b1638031cc254a31f71aa3f4fc6a5e6a5e75b Mon Sep 17 00:00:00 2001 From: argirok Date: Mon, 2 Oct 2023 12:30:13 +0300 Subject: [PATCH 02/32] route for plugins --- src/app/pages/admin-tools/admin-tools-routing.module.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/pages/admin-tools/admin-tools-routing.module.ts b/src/app/pages/admin-tools/admin-tools-routing.module.ts index a835137..be30332 100644 --- a/src/app/pages/admin-tools/admin-tools-routing.module.ts +++ b/src/app/pages/admin-tools/admin-tools-routing.module.ts @@ -29,6 +29,11 @@ import {RouterModule} from '@angular/router'; loadChildren: () => import('../../openaireLibrary/dashboard/helpTexts/page-help-content-form.module').then(m => m.PageHelpContentFormModule), pathMatch: 'full' }, + { + path: 'plugins', + loadChildren: () => import('../../openaireLibrary/dashboard/plugins/plugins.module').then(m => m.PluginsModule), + pathMatch: 'full' + }, { path: 'pages', loadChildren: () => import('../../openaireLibrary/dashboard/page/pages.module').then(m => m.PagesModule), -- 2.17.1 From 47201b9dffee3bb2f6cd6ae047f625e37900b6ac Mon Sep 17 00:00:00 2001 From: argirok Date: Mon, 9 Oct 2023 13:55:30 +0300 Subject: [PATCH 03/32] commit libraries --- src/app/openaireLibrary | 2 +- src/assets/common-assets | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index 5e4aaab..8b9c8ec 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit 5e4aaab04f89446f956d524469ef2a856f556de5 +Subproject commit 8b9c8ec6651df176f23de383a91c7db448f76a4f diff --git a/src/assets/common-assets b/src/assets/common-assets index d18e0a7..031329d 160000 --- a/src/assets/common-assets +++ b/src/assets/common-assets @@ -1 +1 @@ -Subproject commit d18e0a7e43e5ab74649481ecbf352ba49893c66f +Subproject commit 031329d5ca890663a0911e3dac5649eb5c00c601 -- 2.17.1 From 9a49371a39080037af97447dd871c1005d0cd6d7 Mon Sep 17 00:00:00 2001 From: argirok Date: Tue, 17 Oct 2023 09:20:16 +0300 Subject: [PATCH 04/32] manage plugins of a template --- src/app/pages/admin-tools/portal-admin-tools-routing.module.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/pages/admin-tools/portal-admin-tools-routing.module.ts b/src/app/pages/admin-tools/portal-admin-tools-routing.module.ts index 5bb9ac8..58ef5e8 100644 --- a/src/app/pages/admin-tools/portal-admin-tools-routing.module.ts +++ b/src/app/pages/admin-tools/portal-admin-tools-routing.module.ts @@ -6,7 +6,8 @@ import {RouterModule} from "@angular/router"; {path: '', loadChildren: () => import('./admin-tools-routing.module').then(m => m.AdminToolsRoutingModule)}, {path: 'portals', loadChildren: () => import('../../openaireLibrary/dashboard/portal/portals.module').then(m => m.PortalsModule)}, {path: 'classes', loadChildren: () => import('../../openaireLibrary/dashboard/divId/divIds.module').then(m => m.DivIdsModule)}, - {path: 'templates', loadChildren: () => import('../../openaireLibrary/dashboard/plugins/templates/pluginTemplates.module').then(m => m.PluginTemplatesModule)} + {path: 'templates', loadChildren: () => import('../../openaireLibrary/dashboard/plugins/templates/pluginTemplates.module').then(m => m.PluginTemplatesModule)}, + {path: 'templates/plugins', loadChildren: () => import('../../openaireLibrary/dashboard/plugins/plugins.module').then(m => m.PluginsModule)}, ])] }) export class PortalAdminToolsRoutingModule { -- 2.17.1 From 044d5da78a3ef79e4f76464965a03a8a81e43b4b Mon Sep 17 00:00:00 2001 From: argirok Date: Fri, 19 Jan 2024 11:03:57 +0200 Subject: [PATCH 05/32] [plugins-functionality | WIP] : update admn tools API --- src/environments/environment.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 4e9ff41..2b8c4dd 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -13,6 +13,7 @@ let props: EnvProperties = { useCache: false, connectPortalUrl: 'http://scoobydoo.di.uoa.gr:4200', domain:'https://beta.admin.connect.openaire.eu', + adminToolsAPIURL: 'http://scoobydoo.di.uoa.gr:8880/uoa-admin-tools/', }; -- 2.17.1 From 49e8e56e9277cc3345ea13dd18df781baff5fbe1 Mon Sep 17 00:00:00 2001 From: argirok Date: Fri, 2 Feb 2024 09:33:01 +0200 Subject: [PATCH 06/32] [plugin-functionalities | WIP] : update plugin forms, add reording, filtering by position, create multiple templates per position, etc --- src/app/openaireLibrary | 2 +- src/assets/openaire-theme | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary index d0b4fa7..a260ed1 160000 --- a/src/app/openaireLibrary +++ b/src/app/openaireLibrary @@ -1 +1 @@ -Subproject commit d0b4fa7750a8dde3cfa6b5b81c18302380e10c35 +Subproject commit a260ed17bd28e0cff2ab1504aea7937ebc211ca8 diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme index df6a052..52eca9a 160000 --- a/src/assets/openaire-theme +++ b/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit df6a0527e9bce69f016da8d28b79885c351104c6 +Subproject commit 52eca9abe84c941a7e78a5690f273d8c8e3194f9 -- 2.17.1 From 2a27c1caf7ad7dc118738429e9c54088b8fd7d45 Mon Sep 17 00:00:00 2001 From: argirok Date: Wed, 28 Feb 2024 14:46:29 +0200 Subject: [PATCH 07/32] [plugins-functionality | WIP] content providers: update methods, add options to select for deposit and add deposition message --- .../communityContentProviders.module.ts | 3 +- .../manage-content-providers.component.ts | 44 ++++++++++++++++++- .../remove-content-providers.component.html | 18 ++++++++ .../remove-content-providers.component.ts | 4 ++ .../manageContentProviders.service.ts | 6 +-- 5 files changed, 70 insertions(+), 5 deletions(-) diff --git a/src/app/pages/content-providers/communityContentProviders.module.ts b/src/app/pages/content-providers/communityContentProviders.module.ts index 4a0708e..843d787 100644 --- a/src/app/pages/content-providers/communityContentProviders.module.ts +++ b/src/app/pages/content-providers/communityContentProviders.module.ts @@ -28,6 +28,7 @@ import {AddContentProvidersComponent} from "./add-content-providers.component"; import {ManageCommunityContentProvidersService} from "../../services/manageContentProviders.service"; import {SearchDataprovidersService} from "../../openaireLibrary/services/searchDataproviders.service"; import {CriteriaModule} from "./criteria/criteria.module"; +import {MatSlideToggleModule} from "@angular/material/slide-toggle"; @NgModule({ imports: [ @@ -48,7 +49,7 @@ import {CriteriaModule} from "./criteria/criteria.module"; path: '', component: ManageContentProvidersComponent } ]), - NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, CriteriaModule + NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, CriteriaModule, MatSlideToggleModule ], declarations: [ ManageContentProvidersComponent, diff --git a/src/app/pages/content-providers/manage-content-providers.component.ts b/src/app/pages/content-providers/manage-content-providers.component.ts index f211f4f..df641dc 100644 --- a/src/app/pages/content-providers/manage-content-providers.component.ts +++ b/src/app/pages/content-providers/manage-content-providers.component.ts @@ -23,6 +23,7 @@ import {ManageCommunityContentProvidersService} from "../../services/manageConte [communityContentProviders]="communityContentProviders" [loading]="showLoadingInRemove" [community]="community" (editCriteria)="openCriteria($event)" + (editDepositInfo)="openDeposit($event)" (communityContentProvidersChanged)="communityContentProvidersChanged($event)"> @@ -44,6 +45,17 @@ import {ManageCommunityContentProvidersService} from "../../services/manageConte + +
+
+
+ + + +
+
` }) @@ -53,6 +65,7 @@ export class ManageContentProvidersComponent implements OnInit { @ViewChild('criteria') criteria: CriteriaComponent; @ViewChild('addContentProvidersModal', { static: true }) addContentProvidersModal: FullScreenModalComponent; @ViewChild('filtersModal', { static: true }) filtersModal: FullScreenModalComponent; + @ViewChild('depositModal', { static: true }) depositModal: FullScreenModalComponent; private subscriptions: any[] = []; public showLoadingInRemove: boolean = true; public body: string = "Send from page"; @@ -60,6 +73,8 @@ export class ManageContentProvidersComponent implements OnInit { public openaireEntities = OpenaireEntities; public community: CommunityInfo; public dataProvider: ContentProvider; + message = ""; + deposit= false; constructor(private title: Title, private cdr: ChangeDetectorRef, @@ -103,7 +118,17 @@ export class ManageContentProvidersComponent implements OnInit { this.filtersModal.open(); this.cdr.detectChanges(); } - + public openDeposit(contentProvider: ContentProvider) { + this.dataProvider = contentProvider; + this.deposit = this.dataProvider.deposit; + this.message = this.dataProvider.message; + this.depositModal.title = 'Deposit info'; + this.depositModal.okButtonText = "Save"; + this.depositModal.back = true; + this.depositModal.okButton = true; + this.depositModal.open(); + this.cdr.detectChanges(); + } public saveCriteria() { let callback = (selectionCriteria): void => { this.dataProvider.selectioncriteria = selectionCriteria; @@ -128,4 +153,21 @@ export class ManageContentProvidersComponent implements OnInit { this.removeContentProvidersComponent.applyFilters(); } } + + saveDepositInfo(){ + this.dataProvider.deposit = this.deposit; + this.dataProvider.message = this.message; + console.log(this.message) + this.manageCommunityContentProvidersService.saveContentProvider(this.properties, this.dataProvider).subscribe(() => { + this.removeContentProvidersComponent.getCommunityContentProviders(); + NotificationHandler.rise('Deposit info have been successfully updated'); + }, error => { + this.criteria.handeError('An error has been occurred. Try again later!', error); + }); + } + + depositReset(){ + this.message = this.dataProvider.message; + this.deposit = this.dataProvider.deposit; + } } diff --git a/src/app/pages/content-providers/remove-content-providers.component.html b/src/app/pages/content-providers/remove-content-providers.component.html index 6156177..d57f687 100644 --- a/src/app/pages/content-providers/remove-content-providers.component.html +++ b/src/app/pages/content-providers/remove-content-providers.component.html @@ -54,6 +54,8 @@ [no title available] +
Deposit
+
{{item.message}}
Filters
@@ -64,6 +66,22 @@