From 9d0a64053958b725429027858026623e0a3a8e99 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Tue, 12 Jun 2018 11:33:29 +0000 Subject: [PATCH] Add new Content Page, add property in order to add or not the link in bottom menu git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@52452 d315682c-612b-4755-9ff5-7f18f6832af3 --- connect-production-properties.json | 1 + prepareDeploy.sh | 1 + src/app/app-routing.module.ts | 1 + src/app/app.component.ts | 13 +++++++++++-- src/app/community/community.component.html | 2 +- src/assets/env-properties.json | 3 ++- 6 files changed, 17 insertions(+), 4 deletions(-) diff --git a/connect-production-properties.json b/connect-production-properties.json index cc7f116..31fd291 100644 --- a/connect-production-properties.json +++ b/connect-production-properties.json @@ -2,6 +2,7 @@ "enablePiwikTrack" : true, "enableHelper" : true, "useCache" : true, + "showContent" : false, "metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/", "framesAPIURL" : "https://beta.openaire.eu/stats3/", "statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/", diff --git a/prepareDeploy.sh b/prepareDeploy.sh index 6c68e62..a7f191f 100755 --- a/prepareDeploy.sh +++ b/prepareDeploy.sh @@ -1,6 +1,7 @@ cp connect-production-properties.json src/assets/env-properties.json; rm -rf src/assets/common-assets/.svn/; rm -rf src/app/openaireLibrary/.svn/; +pico src/app/openaireLibrary/utils/properties/environment-specific.service.ts; npm run build:dynamic; rm -rf src node_modules .idea/ connect-production-properties.json installOpenaireLib.sh; echo 'Ready!'; diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index a3691bf..c74d35d 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -12,6 +12,7 @@ const routes: Routes = [ // { path: 'communities', loadChildren: './communities/communities.module#CommunitiesModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'my-communities', loadChildren: './my-communities/communities.module#MyCommunitiesModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'about', loadChildren: './htmlPages/about/aboutPage.module#AboutPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + { path: 'content', loadChildren: './content/contentPage.module#ContentPageModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'organizations', loadChildren: './htmlPages/organizations/organizationsPage.module#OrganizationsPageModule', 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 }}, diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 0df99f6..14d23f6 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -36,7 +36,7 @@ import {ConnectHelper} from './openaireLibrary/connect/connectHelper'; - + ` @@ -116,9 +116,18 @@ export class AppComponent { new MenuItem("","Blog","https://blogs.openaire.eu/","",false,[],[],{}), new MenuItem("","Contact us","https://beta.openaire.eu/contact-us","",false,[],[],{}) ]; + if(this.properties.showContent){ + this.bottomMenuItems.push(new MenuItem("","Content Policy","","/content",false,[],[],{})); + } }else{ - this.bottomMenuItems = [] + this.bottomMenuItems = [ + new MenuItem("","About","","/about",false,[],["/about"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}), + new MenuItem("","Organizations","","/organizations",false,[],["/organizations"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}) + ]; + if(this.properties.showContent){ + this.bottomMenuItems.push(new MenuItem("","Content Policy","","/content",false,[],[],{})); + } } this.showMenu = true; diff --git a/src/app/community/community.component.html b/src/app/community/community.component.html index 37e4fa0..3036146 100644 --- a/src/app/community/community.component.html +++ b/src/app/community/community.component.html @@ -24,7 +24,7 @@
- {{subject}} + {{subject}} diff --git a/src/assets/env-properties.json b/src/assets/env-properties.json index 939d255..5c36e61 100644 --- a/src/assets/env-properties.json +++ b/src/assets/env-properties.json @@ -2,6 +2,7 @@ "enablePiwikTrack" : false, "enableHelper" : true, "useCache" : false, + "showContent" : true, "metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/", "framesAPIURL" : "https://beta.openaire.eu/stats3/", "statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/", @@ -55,7 +56,7 @@ "cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=", - "adminToolsAPIURL" :"http://duffy.di.uoa.gr:8080/uoa-admin-tools", + "adminToolsAPIURL" :"http://scoobydoo.di.uoa.gr:8080/uoa-admin-tools", "adminToolsCommunity" :"openaire",