From 17e7eb2d7f30612dbd1b316dfb422ea506cadd22 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Fri, 24 Apr 2020 16:38:35 +0000 Subject: [PATCH] [Trunk | Connect]: Connect redesing 1. app.component.ts: and components added (floating buttons on the right side of each page for communities). 2. community.component.html: 3. community.component.ts: a. 'projectsCalculated' and 'contentProvidersCalculated' fields added, to calculate tootlip after both requests complete b. added methods for building tootips c. 'activeTab' set to 'summary'. 4. affiliations.component.html: minor phrasing changes (e.g. title). 5. curators.component.html: shortview changed. 6. results.component.ts: Title changed | 'View all' moved to the bottom. 7. customization.component.ts: Changed '--portal-main-color' from '#4C9CD5' to '#4687E6' | Changed '--portal-dark-color' from '#24857F' to '#2D72D6'. 8. invite.component.html: shortview changed. 9. invite.component.ts: 'properties' field as input (get it is called from app.component). 10. invite.module.ts & inviteBasic.module.ts: InviteBasicModule created to declare InviteComponent without routing and login guard | InviteModule imports InviteBasicModule and adds routing and login guar$ 11. subscribe.component.ts: Changes for subscribe button and members | 'properties' field as input (get it is called from app.component). 12. connect-custom.css: css for subscribe and invite buttons and for tooltip with 'community-page-tooltip' class. 13. customization.css: class 'communityBackground' added and css for 'subtitle' class inside 'communityBackground'. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58549 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../affiliations/affiliations.component.html | 7 +- src/app/app.component.ts | 8 + src/app/app.module.ts | 9 +- src/app/community/community.component.html | 1070 ++++++++++------- src/app/community/community.component.ts | 42 +- src/app/curators/curators.component.html | 59 +- .../results/results.component.ts | 36 +- .../customization/customization.component.ts | 4 +- .../subscribe/invite/invite.component.html | 10 +- .../subscribe/invite/invite.component.ts | 29 +- .../utils/subscribe/invite/invite.module.ts | 37 +- .../subscribe/invite/inviteBasic.module.ts | 38 + .../utils/subscribe/subscribe.component.ts | 40 +- src/assets/connect-custom.css | 53 + src/assets/customization.css | 32 +- 15 files changed, 949 insertions(+), 525 deletions(-) create mode 100644 src/app/utils/subscribe/invite/inviteBasic.module.ts diff --git a/src/app/affiliations/affiliations.component.html b/src/app/affiliations/affiliations.component.html index b1b8719..e304229 100644 --- a/src/app/affiliations/affiliations.component.html +++ b/src/app/affiliations/affiliations.component.html @@ -47,7 +47,8 @@
- Related Organizations ({{affiliations.length}}) + Supporting Organizations +
- - View more details + + See Details >
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index f718d7f..54eb8a3 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -35,6 +35,12 @@ import {UserManagementService} from "./openaireLibrary/services/user-management.
+ + + + OpenAIRE uses cookies in order to function properly.
@@ -72,6 +78,7 @@ export class AppComponent { subscriberOfCommunities = false; managerOfCommunities = false; user: User; + communityId: string = ""; // community: {id:string, name:string, logoUrl:string}; constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, @@ -119,6 +126,7 @@ export class AppComponent { communityId = ConnectHelper.getCommunityFromDomain(this.properties.domain); this.buildMenu(communityId); } + this.communityId = communityId; } public buildMenu(communityId: string) { diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 6373f85..134aaed 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -24,6 +24,12 @@ import {ThemeComponent} from "./test/theme.component"; import {CustomizationModule} from "./utils/customization/customization.module"; import {HttpInterceptorService} from "./openaireLibrary/http-interceptor.service"; import {PageURLResolverComponent} from "./openaireLibrary/utils/pageURLResolver.component"; +import {InviteModule} from "./utils/subscribe/invite/invite.module"; +import {FreeGuard} from "./openaireLibrary/login/freeGuard.guard"; +import {PreviousRouteRecorder} from "./openaireLibrary/utils/piwik/previousRouteRecorder.guard"; +import {PiwikService} from "./openaireLibrary/utils/piwik/piwik.service"; +import {CommunityService} from "./openaireLibrary/connect/community/community.service"; +import {InviteBasicModule} from "./utils/subscribe/invite/inviteBasic.module"; @NgModule({ @@ -38,7 +44,7 @@ import {PageURLResolverComponent} from "./openaireLibrary/utils/pageURLResolver. BottomModule, CookieLawModule, CustomizationModule, - SubscribeModule.forRoot(), + SubscribeModule.forRoot(), InviteBasicModule, BrowserModule.withServerTransition({appId: 'my-app'}), AppRoutingModule, BrowserTransferStateModule @@ -47,6 +53,7 @@ import {PageURLResolverComponent} from "./openaireLibrary/utils/pageURLResolver. exports: [ AppComponent ], providers:[ EnvironmentSpecificResolver, CommunitiesService, LayoutService, + //FreeGuard, PreviousRouteRecorder, PiwikService, CommunityService, { provide: HTTP_INTERCEPTORS, useClass: HttpInterceptorService, diff --git a/src/app/community/community.component.html b/src/app/community/community.component.html index c90c9be..473f77d 100644 --- a/src/app/community/community.component.html +++ b/src/app/community/community.component.html @@ -2,175 +2,524 @@ [logoURL]="community.logoUrl" type="home" [name]="community.title"> + +
-
-
-
+
+
+ + +
+ +
+
+ + +
+
+
+ + + + +
{{typeName}}
+ + +
+
+ + +
+ No graphs available +
+
+
+
+
{{statisticsSum[entity].total|number}}
+ +
Total
+
+
+
+
+
{{statisticsSum[entity].projects|number}}
+ +
Total linked projects
+
+
+
+
+
{{statisticsSum[entity].open_access|number}}
+ +
Open access
+
+
+
+
+
{{statisticsSum[entity].closed_access|number}}
+ +
Closed access
+
+
+
+
+
{{statisticsSum[entity].embargo|number}}
+ +
Embargoed
+
+
+
+
+
{{statisticsSum[entity].restricted|number}}
+ +
Restricted
+
+
+
+
+
+
+
+
    +
  • + +
    +
    + {{chartsInfoMap[chart].title}}
    + +
    +
  • +
+
+
+ +
+
+
+
+
+
+ +
+
+ {{chartsInfoMap[chart].title}}
+ +
+ +
+ +
+
+ +
+ + +
+
+
-
-
-
+
+
+
{{community.title}}
-
+
{{community.shortTitle}}
-
-
- {{community.description.substring(0, 300)}}{{community.description.length > 300 ? '...' : ''}}
-
{{community.description}}
-
- View more - + + +
+ +
    +
  • +
    +
    +
    + + Created: {{community.date | date:'dd-MMM-yyyy'}} + + + + +
    +
    +
    Description
    +
    + {{community.description.substring(0, 500)}}{{community.description.length > 500 ? '...' : ''}}
    +
    + {{community.description}} +
    + + +
    +
    +
    +
    +
    Subjects
    + + + + {{subject}} + + , + + + +
    +
    +
    +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +
    + + + + + + + + +
    +
  • +
+
-
- - {{" "}} - -
+ + + + + + - -
+ + + - + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + - + + + + + + + + + + + + + - + + + + + + + + + + + + + -
-
Subjects -
-
- - - - {{subject}} - - {{" "}} - - - - - - {{subject}} - - {{" "}} - - -
- - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -179,146 +528,19 @@
-
-
-
-
-
+ + + + + - -
- No graphs available -
-
-
-
-
{{statisticsSum[entity].total|number}}
-
Total - {{entityName}}
-
-
-
-
-
{{statisticsSum[entity].projects|number}}
-
Total projects linked to {{entityName}}
-
-
-
-
-
{{statisticsSum[entity].open_access|number}}
-
Open access - {{entityName}}
-
-
-
-
-
{{statisticsSum[entity].closed_access|number}}
-
Closed access - {{entityName}}
-
-
-
-
-
{{statisticsSum[entity].embargo|number}}
-
Embargoed - {{entityName}}
-
-
-
-
-
{{statisticsSum[entity].restricted|number}}
-
Restricted - {{entityName}}
-
-
-
-
-
-
-
- -
-
    -
  • - -
    -
    - {{chartsInfoMap[chart].title}}
    - -
    -
  • -
-
- -
- - -
- -
- - -
- -
- -
- - -
-
-
-
-
-
- -
-
- {{chartsInfoMap[chart].title}}
- -
- -
- -
-
- -
-
+ - -
Select view
- - - Overview - Graph Analysis - -
+ + + + + + + + -
+ -
+ - + + + + + + + + -
    -
  • -
    -
    - --> + + + + + + + - chartsInfoMap:statistics.chartsInfoMap, showIn:'showInDashboard'}"> -
    - -
    -
    - + + + + + + + + + + + + + -
    + -
  • -
  • -
    -
    - --> + + + + + + + - chartsInfoMap:statistics.chartsInfoMap, showIn:'showInDashboard'}"> -
    - -
    -
    - + + + + + + + + + + + + + -
    + -
  • -
  • -
    -
    - --> + + + + + + - chartsInfoMap:statistics.chartsInfoMap, showIn:'showInDashboard'}"> -
    - -
    -
    - + + + + + + + + + + + + + -
    + -
  • -
  • -
    -
    - --> + + + + + + + - chartsInfoMap:statistics.chartsInfoMap, showIn:'showInDashboard'}"> -
    - -
    -
    - + + + + + + + + + + + + + -
    + -
  • -
-
+ + + -
-
-
+ + + -
+ -
+ -
-
-
-
-
Created {{community.date | date:'dd-MM-yyyy'}}
- - -
-
- -
+ + + + + + + + + + + -
-
-
+ + +
@@ -558,3 +777,4 @@
+
\ No newline at end of file diff --git a/src/app/community/community.component.ts b/src/app/community/community.component.ts index 6b07a2a..01f40cc 100644 --- a/src/app/community/community.component.ts +++ b/src/app/community/community.component.ts @@ -42,6 +42,9 @@ export class CommunityComponent { public contentProviderTotal = null; public organizationTotal = null; + public projectsCalculated: boolean = false; + public contentProvidersCalculated: boolean = false; + params: any = {}; properties: EnvProperties; @@ -66,7 +69,7 @@ export class CommunityComponent { public subSoftware; public subOrps; @ViewChild(StatisticsForDashboardComponent) statistics: StatisticsForDashboardComponent = null; - public activeTab = "publication"; + public activeTab = "summary"; public show: string = 'overview'; searchLinkToResults: string = null; @@ -181,6 +184,9 @@ export class CommunityComponent { }, error => { this.handleError("Error getting number of projects for community with id: " + this.communityId, error); + }, + () => { + this.projectsCalculated = true; } ); @@ -191,6 +197,9 @@ export class CommunityComponent { }, error => { this.handleError("Error getting number of content providers for community with id: " + this.communityId, error); + }, + () => { + this.contentProvidersCalculated = true; } ); @@ -220,7 +229,7 @@ export class CommunityComponent { researchResultsTotal => { this.setTotal(resultType, researchResultsTotal); if (resultType == "publication") { - this.searchResearchResults(resultType, this.publicationTotal, this.publicationResults); + //this.searchResearchResults(resultType, this.publicationTotal, this.publicationResults); } }, error => { @@ -357,4 +366,33 @@ export class CommunityComponent { return (full ? ("other research product" + (plural ? "s" : "")) : "other"); } } + + public buildProjectsAndContentProvidesTooltip(): string { + let tooltipContent: string = "
"; + + if(this.projectTotal != null && this.projectTotal > 0 && this.isEntityEnabled('project') && this.isRouteEnabled(this.searchLinkToProjects)) { + tooltipContent += "Projects"; + } + if(this.projectTotal != null && this.projectTotal > 0 && this.isEntityEnabled('project') && this.isRouteEnabled(this.searchLinkToProjects) + && (this.contentProviderTotal != null && this.contentProviderTotal > 0 && this.isEntityEnabled('datasource') && this.isRouteEnabled(this.searchLinkToDataProviders))) { + tooltipContent += " and "; + } + 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/src/app/curators/curators.component.html b/src/app/curators/curators.component.html index f496d6f..0de92e1 100644 --- a/src/app/curators/curators.component.html +++ b/src/app/curators/curators.component.html @@ -89,54 +89,55 @@
- - Curators -
-
-
- Curator Photo - Curator Photo -
-
+ + Curated by: + + + + + + + + + {{curator.name}} -
-
-
-
+ + + Curator Photo Curator Photo -
-
+ + {{curator.name}} -
-
-
+ + +
Affiliations ({{curator.affiliations.length}}) -
+ -
-
- -
-
-
-
+ + + + , + +
diff --git a/src/app/searchEntries/results/results.component.ts b/src/app/searchEntries/results/results.component.ts index 60ee931..77b68f8 100644 --- a/src/app/searchEntries/results/results.component.ts +++ b/src/app/searchEntries/results/results.component.ts @@ -5,20 +5,11 @@ import {SearchResult} from "../../openaireLibrary/utils/entities/searchResult"; @Component({ selector: 'results-comp', - template: ` -
Recent research results
+ template: ` +
Recent {{getEntityName(resultType, true, true)}}
-
- -