From 39aad35c4742732d3d7583c4c0b1a5bdd1945eab Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 1 Mar 2023 16:25:54 +0200 Subject: [PATCH] Move community info options to sidebar and delete internal tabs --- src/app/app.component.html | 5 ++- src/app/app.component.ts | 21 ++++++++-- src/app/openaireLibrary | 2 +- .../affiliations/affiliations.component.html | 1 - .../pages/affiliations/affiliations.module.ts | 3 +- .../community-info.component.ts | 42 ------------------- .../community-info/community-info.module.ts | 14 ------- .../profile/profile.component.ts | 1 - .../community-info/profile/profile.module.ts | 4 +- .../communityContentProviders.module.ts | 2 - .../remove-content-providers.component.html | 1 - .../customization.component.html | 27 +++++------- .../projects/communityProjects.module.ts | 2 - .../projects/remove-projects.component.html | 1 - .../subjects-edit-form.component.html | 1 - .../subjects-edit-form.module.ts | 5 ++- .../manage-zenodo-communities.component.html | 1 - .../zenodo-communities.module.ts | 3 +- src/assets/common-assets | 2 +- src/assets/openaire-theme | 2 +- 20 files changed, 39 insertions(+), 101 deletions(-) delete mode 100644 src/app/pages/community-info/community-info.component.ts delete mode 100644 src/app/pages/community-info/community-info.module.ts diff --git a/src/app/app.component.html b/src/app/app.component.html index 9971650..4fb73af 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -2,12 +2,13 @@
-
diff --git a/src/app/pages/affiliations/affiliations.module.ts b/src/app/pages/affiliations/affiliations.module.ts index 3c5142c..7bafd2d 100644 --- a/src/app/pages/affiliations/affiliations.module.ts +++ b/src/app/pages/affiliations/affiliations.module.ts @@ -11,7 +11,6 @@ import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.mod import {UtilitiesService} from '../../openaireLibrary/services/utilities.service'; import {InputModule} from "../../openaireLibrary/sharedComponents/input/input.module"; import {PageContentModule} from "../../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module"; -import {CommunityInfoModule} from "../community-info/community-info.module"; import {IconsModule} from "../../openaireLibrary/utils/icons/icons.module"; import {NoLoadPaging} from "../../openaireLibrary/searchPages/searchUtils/no-load-paging.module"; import {LoadingModule} from "../../openaireLibrary/utils/loading/loading.module"; @@ -22,7 +21,7 @@ import {PagingModule} from "../../openaireLibrary/utils/paging.module"; @NgModule({ imports: [ AffiliationsRoutingModule, CommonModule, FormsModule, RouterModule, - AlertModalModule, ReactiveFormsModule, InputModule, PageContentModule, CommunityInfoModule, IconsModule, NoLoadPaging, LoadingModule, UrlPrefixModule, PagingModule + AlertModalModule, ReactiveFormsModule, InputModule, PageContentModule, IconsModule, NoLoadPaging, LoadingModule, UrlPrefixModule, PagingModule ], declarations: [ AffiliationsComponent diff --git a/src/app/pages/community-info/community-info.component.ts b/src/app/pages/community-info/community-info.component.ts deleted file mode 100644 index 87d9c03..0000000 --- a/src/app/pages/community-info/community-info.component.ts +++ /dev/null @@ -1,42 +0,0 @@ -import {Component, Input, OnInit} from '@angular/core'; -import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo'; -import {CommunityService} from '../../openaireLibrary/connect/community/community.service'; -import {Subscription} from 'rxjs'; -import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields"; - -@Component({ - selector: 'community-info', - template: ` - - ` -}) -export class CommunityInfoComponent implements OnInit { - @Input() - public type: string; - @Input() - public tab: "profile"| "organizations" | "projects" | "content-providers" | "subjects" | "zenodo-communities" = 'profile'; - public community: CommunityInfo; - public openAIREEntities = OpenaireEntities; - private sub; - - constructor(private communityService: CommunityService) { - } - - ngOnInit() { - this.sub =this.communityService.getCommunityAsObservable().subscribe(community => { - this.community = community; - }); - } - ngOnDestroy() { - if (this.sub instanceof Subscription) { - this.sub.unsubscribe(); - } - } -} diff --git a/src/app/pages/community-info/community-info.module.ts b/src/app/pages/community-info/community-info.module.ts deleted file mode 100644 index 13be1fe..0000000 --- a/src/app/pages/community-info/community-info.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import {NgModule} from '@angular/core'; -import {RouterModule} from "@angular/router"; -import {CommonModule} from "@angular/common"; -import {CommunityInfoComponent} from "./community-info.component"; - -@NgModule({ - imports: [ - CommonModule, RouterModule - ], - declarations: [CommunityInfoComponent], - exports: [CommunityInfoComponent] -}) -export class CommunityInfoModule { -} diff --git a/src/app/pages/community-info/profile/profile.component.ts b/src/app/pages/community-info/profile/profile.component.ts index cdb91de..f46641d 100644 --- a/src/app/pages/community-info/profile/profile.component.ts +++ b/src/app/pages/community-info/profile/profile.component.ts @@ -20,7 +20,6 @@ import {Subscription} from "rxjs";

{{community.shortTitle}}

-
diff --git a/src/app/pages/community-info/profile/profile.module.ts b/src/app/pages/community-info/profile/profile.module.ts index ca8e55a..c1ee1ca 100644 --- a/src/app/pages/community-info/profile/profile.module.ts +++ b/src/app/pages/community-info/profile/profile.module.ts @@ -5,7 +5,6 @@ import {PageContentModule} from "../../../openaireLibrary/dashboard/sharedCompon import {ProfileComponent} from "./profile.component"; import {EditCommunityModule} from "./edit-community/edit-community.module"; import {LoadingModule} from "../../../openaireLibrary/utils/loading/loading.module"; -import {CommunityInfoModule} from "../community-info.module"; @NgModule({ imports: [ @@ -17,8 +16,7 @@ import {CommunityInfoModule} from "../community-info.module"; ]), PageContentModule, EditCommunityModule, - LoadingModule, - CommunityInfoModule, + LoadingModule ], declarations: [ProfileComponent], exports: [ProfileComponent] diff --git a/src/app/pages/content-providers/communityContentProviders.module.ts b/src/app/pages/content-providers/communityContentProviders.module.ts index 5d29600..4a0708e 100644 --- a/src/app/pages/content-providers/communityContentProviders.module.ts +++ b/src/app/pages/content-providers/communityContentProviders.module.ts @@ -10,7 +10,6 @@ import {ErrorMessagesModule} from '../../openaireLibrary/utils/errorMessages.mod import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; import {CommonModule} from '@angular/common'; import {PageContentModule} from "../../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module"; -import {CommunityInfoModule} from "../community-info/community-info.module"; import {InputModule} from "../../openaireLibrary/sharedComponents/input/input.module"; import {SearchInputModule} from "../../openaireLibrary/sharedComponents/search-input/search-input.module"; import {NoLoadPaging} from "../../openaireLibrary/searchPages/searchUtils/no-load-paging.module"; @@ -42,7 +41,6 @@ import {CriteriaModule} from "./criteria/criteria.module"; AlertModalModule, SearchDataprovidersServiceModule, PageContentModule, - CommunityInfoModule, InputModule, SearchInputModule, RouterModule.forChild([ 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 d921b24..4dcd4b4 100644 --- a/src/app/pages/content-providers/remove-content-providers.component.html +++ b/src/app/pages/content-providers/remove-content-providers.component.html @@ -7,7 +7,6 @@

{{community.shortTitle}}

-
diff --git a/src/app/pages/customization/customization.component.html b/src/app/pages/customization/customization.component.html index 1f11504..f532290 100644 --- a/src/app/pages/customization/customization.component.html +++ b/src/app/pages/customization/customization.component.html @@ -1,16 +1,14 @@
diff --git a/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.component.html b/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.component.html index bb4547e..7170888 100644 --- a/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.component.html +++ b/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.component.html @@ -7,7 +7,6 @@

{{community.shortTitle}}

-
diff --git a/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.module.ts b/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.module.ts index 28af737..f778ab0 100644 --- a/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.module.ts +++ b/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.module.ts @@ -13,14 +13,15 @@ import {AlertModalModule} from '../../../openaireLibrary/utils/modal/alertModal. import {NoLoadPaging} from '../../../openaireLibrary/searchPages/searchUtils/no-load-paging.module'; import {LoadingModule} from '../../../openaireLibrary/utils/loading/loading.module'; import {InputModule} from '../../../openaireLibrary/sharedComponents/input/input.module'; -import {CommunityInfoModule} from '../../community-info/community-info.module'; import {SearchInputModule} from '../../../openaireLibrary/sharedComponents/search-input/search-input.module'; import {FullScreenModalModule} from 'src/app/openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.module'; import {PagingModule} from "../../../openaireLibrary/utils/paging.module"; @NgModule({ imports: [ - SubjectsEditFormRoutingModule, CommonModule, FormsModule, RouterModule, PageContentModule, IconsModule, AlertModalModule, NoLoadPaging, LoadingModule, InputModule, CommunityInfoModule, SearchInputModule, FullScreenModalModule, PagingModule + SubjectsEditFormRoutingModule, CommonModule, FormsModule, RouterModule, + PageContentModule, IconsModule, AlertModalModule, NoLoadPaging, LoadingModule, InputModule, + SearchInputModule, FullScreenModalModule, PagingModule ], declarations: [ SubjectsEditFormComponent diff --git a/src/app/pages/zenodo-communities/manage-zenodo-communities.component.html b/src/app/pages/zenodo-communities/manage-zenodo-communities.component.html index 1dd174e..62669ed 100644 --- a/src/app/pages/zenodo-communities/manage-zenodo-communities.component.html +++ b/src/app/pages/zenodo-communities/manage-zenodo-communities.component.html @@ -7,7 +7,6 @@

{{community.shortTitle}}

-
diff --git a/src/app/pages/zenodo-communities/zenodo-communities.module.ts b/src/app/pages/zenodo-communities/zenodo-communities.module.ts index 5f2f20a..59f1ed6 100644 --- a/src/app/pages/zenodo-communities/zenodo-communities.module.ts +++ b/src/app/pages/zenodo-communities/zenodo-communities.module.ts @@ -10,7 +10,6 @@ import {ManageZenodoCommunitiesService} from '../../services/manageZenodoCommuni import {ZenodoCommunitiesServiceModule} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module'; import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; import {ZenodoCommunitiesRoutingModule} from './zenodo-communities-routing.module'; -import {CommunityInfoModule} from '../community-info/community-info.module'; import {SearchInputModule} from '../../openaireLibrary/sharedComponents/search-input/search-input.module'; import {IconsModule} from '../../openaireLibrary/utils/icons/icons.module'; import {NoLoadPaging} from '../../openaireLibrary/searchPages/searchUtils/no-load-paging.module'; @@ -24,7 +23,7 @@ import {PagingModule} from "../../openaireLibrary/utils/paging.module"; @NgModule({ imports: [ CommonModule, FormsModule, RouterModule, SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule, - AlertModalModule, ZenodoCommunitiesRoutingModule, CommunityInfoModule, PageContentModule, SearchInputModule, IconsModule, NoLoadPaging, LoadingModule, FullScreenModalModule, HTMLToStringPipeModule, PagingModule + AlertModalModule, ZenodoCommunitiesRoutingModule, PageContentModule, SearchInputModule, IconsModule, NoLoadPaging, LoadingModule, FullScreenModalModule, HTMLToStringPipeModule, PagingModule ], declarations: [ ManageZenodoCommunitiesComponent, ZenodoCommunitiesComponent, AddZenodoCommunitiesComponent, PreviewZenodoCommunityComponent diff --git a/src/assets/common-assets b/src/assets/common-assets index 8c62240..071385b 160000 --- a/src/assets/common-assets +++ b/src/assets/common-assets @@ -1 +1 @@ -Subproject commit 8c62240a403dd8a592eac78d565b185b3b1043c0 +Subproject commit 071385b36c9b9c65d6d081d6468aeea2bf01ffbf diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme index 5b838cf..a72ea0d 160000 --- a/src/assets/openaire-theme +++ b/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit 5b838cfc1c31fb2766a7cdd27734b8b78393e2e6 +Subproject commit a72ea0d0c9d0b490de6c77a238d501ee75216960