diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 6e70892..fd1d088 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -15,7 +15,7 @@ const routes: Routes = [ { path: 'content', loadChildren: './content/contentPage.module#ContentPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'organizations', loadChildren: './htmlPages/organizations/organizationsPage.module#OrganizationsPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'curators', loadChildren: './curators/curators.module#CuratorsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, - { path: 'monitor', loadChildren: './statistics/statistics.module#StatisticsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + // { path: 'monitor', loadChildren: './statistics/statistics.module#StatisticsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 2a24115..8db2b3d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -23,7 +23,7 @@ import {HelperFunctions} from "./openaireLibrary/utils/HelperFunctions.class"; + [community]=community [showMenu]=showMenu [properties]="properties" [enableSearch]="true">
@@ -286,6 +286,7 @@ export class AppComponent { if(communityId && communityId!="" && com.communityId == communityId){ community = com; document.documentElement.style.setProperty('--portal-main-color', "#4C9CD5"); + // this._layoutService.getLayout(com.communityId, // this.properties.adminToolsAPIURL + '/').subscribe ( // layout => { @@ -293,8 +294,22 @@ export class AppComponent { // document.documentElement.style.setProperty('--portal-main-color', this.layout.color); // } // ); + let iSommunitymanager: boolean = false; + if(Session.isCommunityCurator() || Session.isPortalAdministrator()){ + iSommunitymanager = true; + }else if(com.managers.indexOf(Session.getUserEmail())!=-1){ + iSommunitymanager = true; + } this.community = {id: community.communityId, name: (community.shortTitle)?community.shortTitle:community.title, logoUrl:community.logoUrl}; - this.menuItems= [ + this.menuItems= []; + if(iSommunitymanager){ + this.menuItems.push( + { + rootItem: new MenuItem("manage","Manage",'https://beta.admin.connect.openaire.eu/dashboard?communityId='+community.communityId,"",false,[],[],{}), + items: [] + }); + } + this.menuItems.push( {rootItem: new MenuItem("search","Search","","/search/find",false,[],["/search/find", "/search/find/publications", "/search/find/datasets", "/search/find/software", "/search/find/other", "/search/find/projects", "/search/find/dataproviders"],this.properties.environment!="development"?{}:{communityId:community.communityId}), items: [new MenuItem("","Publications","","/search/find/publications",false,["publication"],["/search/find/publications"],this.properties.environment!="development"?{}:{communityId:community.communityId}), new MenuItem("","Research Data","","/search/find/datasets",false,["dataset"],["/search/find/datasets"],this.properties.environment!="development"?{}:{communityId:community.communityId}), @@ -302,23 +317,22 @@ export class AppComponent { new MenuItem("","Other Research Products","","/search/find/other",false,["orp"],["/search/find/other"],this.properties.environment!="development"?{}:{communityId:community.communityId}), new MenuItem("","Projects","","/search/find/projects/",false,["project"],["/search/find/projects"],this.properties.environment!="development"?{}:{communityId:community.communityId}), new MenuItem("","Content Providers","","/search/find/dataproviders",false,["datasource"],["/search/find/dataproviders"],this.properties.environment!="development"?{}:{communityId:community.communityId}), - ]}, - /*{ - rootItem: new MenuItem("monitor","Monitor","","/monitor",false,[],["/monitor"],this.properties.environment!="development"?{}:{communityId:community.communityId}), - items: [] - },*/ - { - rootItem: new MenuItem("share","Share","","",false,[],["/participate/deposit-publications","/participate/deposit-datasets","/participate/share-zenodo"],this.properties.environment!="development"?{}:{communityId:community.communityId}), + ]}); + + this.menuItems.push( { + rootItem: new MenuItem("deposit","Deposit","","",false,[],["/participate/deposit-publications","/participate/deposit-datasets","/participate/share-zenodo"],this.properties.environment!="development"?{}:{communityId:community.communityId}), items: [ new MenuItem("","Zenodo Communities","","/participate/share-zenodo",false,[],["/participate/share-zenodo"],this.properties.environment!="development"?{}:{communityId:community.communityId}), new MenuItem("","Publications","","/participate/deposit-publications",false,["publication"],["/participate/deposit-publications"],this.properties.environment!="development"?{}:{communityId:community.communityId}), new MenuItem("","Research Data","","/participate/deposit-datasets",false,["dataset"],["/participate/deposit-datasets"],this.properties.environment!="development"?{}:{communityId:community.communityId})] - }, + }); + this.menuItems.push( { rootItem: new MenuItem("link","Link","","/participate/claim",false,[],["/participate/claim"],this.properties.environment!="development"?{}:{communityId:community.communityId}), items: [] - } - ]; + }); + + } } diff --git a/src/app/community/community.component.html b/src/app/community/community.component.html index 700e09d..13197a1 100644 --- a/src/app/community/community.component.html +++ b/src/app/community/community.component.html @@ -14,7 +14,7 @@ class=" uk-h5 uk-margin-remove"> {{community.shortTitle}}
-
+

{{community.description}}

@@ -237,29 +237,44 @@ allowedCharts[entity] && statisticsSum[entity].total>0 && allowedCharts[entity].length>0">
-
- - -
+ +
-
+
@@ -278,16 +293,25 @@
-
+
@@ -302,7 +326,7 @@
--> + [type]="resultType" [properties] = properties class="communityRecentResults">
diff --git a/src/assets/connect-custom.css b/src/assets/connect-custom.css index 2dd197b..af6a5a2 100644 --- a/src/assets/connect-custom.css +++ b/src/assets/connect-custom.css @@ -174,3 +174,9 @@ div:not(.connect_App) bottom .uk-totop{ .customTabs ul.customTabsContent { border:var(--community_main_dark_color) 1px solid; } + +.communityRecentResults .search-results > li:nth-child(2){ + border-top: none !important; +} .communityRecentResults .search-results > li:last-child { + border-bottom: none !important; +}