diff --git a/package.json b/package.json
index 25dc3c5..f6b8273 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
],
"scripts": {
"ng": "ng",
- "start": " ng serve --disable-host-check --host 0.0.0.0 --port 5000",
+ "start": " ng serve --disable-host-check --host 0.0.0.0",
"start:dynamic": "PORT=5000 npm run build:dynamic && npm run serve:dynamic",
"start:static": "npm run build:static && npm run serve:static",
"build": "ng build",
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index 7a998a8..1624c0a 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -11,7 +11,7 @@ const routes: Routes = [
{ path: '', loadChildren: './communitywrapper/communityWrapper.module#CommunityWrapperModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
// { path: 'communities', loadChildren: './communities/communities.module#CommunitiesModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'my-communities', loadChildren: './my-communities/communities.module#CommunitiesModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
- { path: 'statistics', 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 2fc4cd4..b3e3485 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -7,7 +7,7 @@ import{MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu';
import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
import {CommunitiesService} from "./openaireLibrary/connect/communities/communities.service";
import {Session} from './openaireLibrary/login/utils/helper.class';
-import {ConnectHelper} from './utils/connectHelper';
+import {ConnectHelper} from './openaireLibrary/connect/connectHelper';
@Component({
//changeDetection: ChangeDetectionStrategy.Default,
@@ -74,10 +74,14 @@ export class AppComponent {
new MenuItem("","My claims","","/myclaims",false,[],["/myclaims"],{}),
];
for(var com of communities){
- for(var manager of com.managers){
- if(manager== Session.getUserEmail()){
- this.userMenuItems.push(new MenuItem("","Manage "+((com.shortTitle)?com.shortTitle:com.title),"https://admin.demo.openaire.eu?communityId="+com.communityId,"",false,[],[],{}));
- }
+ if(Session.isCommunityCurator()||Session.isPortalAdministrator()){
+ this.userMenuItems.push(new MenuItem("","Manage "+((com.shortTitle)?com.shortTitle:com.title),"https://admin.demo.openaire.eu?communityId="+com.communityId,"",false,[],[],{}));
+ }else{
+ for(var manager of com.managers){
+ if(manager== Session.getUserEmail()){
+ this.userMenuItems.push(new MenuItem("","Manage "+((com.shortTitle)?com.shortTitle:com.title),"https://admin.demo.openaire.eu?communityId="+com.communityId,"",false,[],[],{}));
+ }
+ }
}
if((data['communityId'] && data['communityId']!="" && com.communityId == data['communityId'])
@@ -99,7 +103,7 @@ export class AppComponent {
// new MenuItem("","Organizations","","/search/find/organizations/",false,["organization"],["/search/find/organizations"],{community: community.communityId}),
]},
{
- rootItem: new MenuItem("monitor","Monitor","","/statistics",false,[],["/statistics"],{communityId:community.communityId}),
+ rootItem: new MenuItem("monitor","Monitor","","/monitor",false,[],["/statistics"],{communityId:community.communityId}),
items: []
},
{
diff --git a/src/app/communities/communities.component.ts b/src/app/communities/communities.component.ts
index 7716e46..712119d 100644
--- a/src/app/communities/communities.component.ts
+++ b/src/app/communities/communities.component.ts
@@ -14,7 +14,7 @@ import {PiwikService} from '../openaireLibrary/utils/
import {Meta} from '../openaireLibrary/sharedComponents/metaService';
import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service';
import {CommunitiesService} from '../openaireLibrary/connect/communities/communities.service';
-import {ConnectHelper} from '../utils/connectHelper';
+import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
@Component({
selector: 'communities',
diff --git a/src/app/community/community.component.ts b/src/app/community/community.component.ts
index 77c196c..f961cb8 100644
--- a/src/app/community/community.component.ts
+++ b/src/app/community/community.component.ts
@@ -157,5 +157,4 @@ export class CommunityComponent {
this.piwiksub.unsubscribe();
}
}
-
}
diff --git a/src/app/communitywrapper/communityWrapper.component.ts b/src/app/communitywrapper/communityWrapper.component.ts
index e6f3fca..db0fd39 100644
--- a/src/app/communitywrapper/communityWrapper.component.ts
+++ b/src/app/communitywrapper/communityWrapper.component.ts
@@ -2,7 +2,7 @@ import {Component, Input, Output, EventEmitter, ViewChild, ChangeDetectionStrate
import {Observable} from 'rxjs/Observable';
import {ActivatedRoute, Router} from '@angular/router';
-import {ConnectHelper} from '../utils/connectHelper';
+import {ConnectHelper} from '..//openaireLibrary/connect/connectHelper';
@Component({
selector: 'community-wrapper',
@@ -25,7 +25,7 @@ export class CommunityWrapperComponent {
communityId => {
this.communityId = communityId['communityId'];
if(!this.communityId){
- this.communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
+ this.communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
}
if(this.communityId){
this.dashboard = true;
diff --git a/src/app/searchEntries/results/results.component.ts b/src/app/searchEntries/results/results.component.ts
index a671139..150449f 100644
--- a/src/app/searchEntries/results/results.component.ts
+++ b/src/app/searchEntries/results/results.component.ts
@@ -25,15 +25,17 @@ import { CommunityInfo } from '../../openaireLibrary/connect/community/community
{{item.accessRights}}
-
+
+
{{author}};
...
+
+ ({{item.year}})
-
{{item.year}}
{{item.description}}
diff --git a/src/app/searchPages/simple/searchDataproviders.component.ts b/src/app/searchPages/simple/searchDataproviders.component.ts
index 3005901..7eb08c3 100644
--- a/src/app/searchPages/simple/searchDataproviders.component.ts
+++ b/src/app/searchPages/simple/searchDataproviders.component.ts
@@ -10,7 +10,7 @@ import {SearchPageTableViewComponent } from '../../openaireLibrary/searchPages/s
import {SearchUtilsClass } from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {SearchCommunityDataprovidersService} from '../../services/searchDataproviders.service';
-import {ConnectHelper} from '../../utils/connectHelper';
+import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
@Component({
selector: 'openaire-search-dataproviders',
diff --git a/src/app/searchPages/simple/searchDatasets.component.ts b/src/app/searchPages/simple/searchDatasets.component.ts
index 25c6de0..584b97c 100644
--- a/src/app/searchPages/simple/searchDatasets.component.ts
+++ b/src/app/searchPages/simple/searchDatasets.component.ts
@@ -14,7 +14,7 @@ import {ActivatedRoute} from '@angular/router';
})
export class OpenaireSearchDatasetsComponent {
- advancedSearchParameters:any={community: "%22egi%7C%7CEGI%20Federation%22", co: "and"};
+ advancedSearchParameters:any;
connectCommunityId:string;
constructor( private route: ActivatedRoute) {
}
@@ -22,6 +22,7 @@ export class OpenaireSearchDatasetsComponent {
this.route.queryParams.subscribe(data => {
if(data['community'] && data['community']!=""){
+ this.advancedSearchParameters = {community: data['community'], co: "and"};
var id= decodeURIComponent(data['community']);
this.connectCommunityId = id.slice(1,id.length - 1);
}
diff --git a/src/app/searchPages/simple/searchProjects.component.ts b/src/app/searchPages/simple/searchProjects.component.ts
index 6bfcb58..c37f501 100644
--- a/src/app/searchPages/simple/searchProjects.component.ts
+++ b/src/app/searchPages/simple/searchProjects.component.ts
@@ -10,7 +10,7 @@ import {SearchPageTableViewComponent } from '../../openaireLibrary/searchPages/s
import {SearchUtilsClass } from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {SearchCommunityProjectsService} from '../../services/searchProjects.service';
-import {ConnectHelper} from '../../utils/connectHelper';
+import {ConnectHelper} from '../../openaireLibrary/connect/connectHelper';
@Component({
selector: 'openaire-search-projects',
diff --git a/src/app/searchPages/simple/searchPublications.component.ts b/src/app/searchPages/simple/searchPublications.component.ts
index 1898ecc..63399ae 100644
--- a/src/app/searchPages/simple/searchPublications.component.ts
+++ b/src/app/searchPages/simple/searchPublications.component.ts
@@ -15,17 +15,18 @@ import {ActivatedRoute} from '@angular/router';
})
export class OpenaireSearchPublicationsComponent {
- advancedSearchParameters:any={community: "%22egi%7C%7CEGI%20Federation%22", co: "and"};
- connectCommunityId:string;
- constructor( private route: ActivatedRoute) {
- }
- ngOnInit() {
- this.route.queryParams.subscribe(data => {
+ advancedSearchParameters:any;
+ connectCommunityId:string;
+ constructor( private route: ActivatedRoute) {
+ }
+ ngOnInit() {
+ this.route.queryParams.subscribe(data => {
- if(data['community'] && data['community']!=""){
- var id= decodeURIComponent(data['community']);
- this.connectCommunityId = id.slice(1,id.length - 1);
- }
- });
- }
+ if(data['community'] && data['community']!=""){
+ this.advancedSearchParameters = {community: data['community'], co: "and"};
+ var id= decodeURIComponent(data['community']);
+ this.connectCommunityId = id.slice(1,id.length - 1);
+ }
+ });
+ }
}
diff --git a/src/app/searchPages/simple/searchSoftware.component.ts b/src/app/searchPages/simple/searchSoftware.component.ts
index f942f43..28b16e0 100644
--- a/src/app/searchPages/simple/searchSoftware.component.ts
+++ b/src/app/searchPages/simple/searchSoftware.component.ts
@@ -14,7 +14,7 @@ import {ActivatedRoute} from '@angular/router';
})
export class OpenaireSearchSoftwareComponent {
- advancedSearchParameters:any={community: "%22egi%7C%7CEGI%20Federation%22", co: "and"};
+ advancedSearchParameters:any;
connectCommunityId:string;
constructor( private route: ActivatedRoute) {
}
@@ -22,6 +22,7 @@ export class OpenaireSearchSoftwareComponent {
this.route.queryParams.subscribe(data => {
if(data['community'] && data['community']!=""){
+ this.advancedSearchParameters = {community: data['community'], co: "and"};
var id= decodeURIComponent(data['community']);
this.connectCommunityId = id.slice(1,id.length - 1);
}
diff --git a/src/app/statistics/statistics.component.ts b/src/app/statistics/statistics.component.ts
index f046706..0948dbb 100644
--- a/src/app/statistics/statistics.component.ts
+++ b/src/app/statistics/statistics.component.ts
@@ -18,7 +18,7 @@ import {ConfigurationService} from '../openaireLibrary/utils/configuratio
import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {Meta} from '../openaireLibrary/sharedComponents/metaService';
import { DomSanitizer, SafeResourceUrl, SafeUrl } from '@angular/platform-browser';
-import {ConnectHelper} from '../utils/connectHelper';
+import {ConnectHelper} from '../openaireLibrary/connect/connectHelper';
@Component({
selector: 'statistics',
diff --git a/src/app/utils/connectHelper.ts b/src/app/utils/connectHelper.ts
deleted file mode 100644
index 68c3cae..0000000
--- a/src/app/utils/connectHelper.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-export class ConnectHelper{
-
- public static getCommunityFromDomain(domain:string):string{
- // domain = "beta.egi.openaire.eu"; for testing
- if(domain.indexOf("di.uoa.gr")!=-1){
- return null;
- }
- if(domain.indexOf("beta")!=-1){
- domain = domain.substr(domain.indexOf(".")+1,domain.length);
- domain = domain.substr(0,domain.indexOf("."));
- }else{
- domain = domain.substr(0,domain.indexOf("."));
- }
- if(domain == "connect"){
- return null;
- }
- return domain;
- }
- public static isProduction(domain:string):boolean{
- console.log("Domain:"+domain);
- if(domain.indexOf(".di.uoa.gr")!=-1){
- return false;
- }else if(domain.indexOf(".openaire.eu")!=-1){
- return true;
- }
- }
- public static getProductionPrefix(domain:string):string{
- if(domain.indexOf("beta.")!=-1){
- return "beta.";
- }else{
- return "";
- }
- }
-}
diff --git a/src/assets/discover-custom.css b/src/assets/discover-custom.css
index 5f84811..0721009 100644
--- a/src/assets/discover-custom.css
+++ b/src/assets/discover-custom.css
@@ -337,7 +337,7 @@ color: #414141}
.publicationsSearchForm{
background-image: url('./search_pubs_1.jpg'); box-sizing: border-box; height: 250px;
}
-.projectsSearchForm{
+.projectsSearchForm, .projectsTableSearchForm{
background-image: url('./projects_search.jpg'); box-sizing: border-box; height: 250px;
}
.organizationsSearchForm{
@@ -349,7 +349,7 @@ color: #414141}
.softwareSearchForm{
background-image: url('./search_data.jpg'); box-sizing: border-box; height: 250px;
}
-.datasourcesSearchForm, .compatibleDatasourcesSearchForm,
+.datasourcesSearchForm,.datasourcesTableSearchForm, .compatibleDatasourcesSearchForm,
.compatibleDatasourcesTableSearchForm {
background-image: url('./providers_search.jpg'); box-sizing: border-box; height: 250px;
}
diff --git a/src/assets/env-properties.json b/src/assets/env-properties.json
index 44ef332..663e1ea 100644
--- a/src/assets/env-properties.json
+++ b/src/assets/env-properties.json
@@ -1,6 +1,6 @@
{
"enablePiwikTrack" : false,
- "enableHelper" : false,
+ "enableHelper" : true,
"useCache" : false,
"metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/",
"framesAPIURL" : "https://beta.openaire.eu/stats3/",
diff --git a/src/index.html b/src/index.html
index 5322f87..a6827aa 100644
--- a/src/index.html
+++ b/src/index.html
@@ -7,12 +7,14 @@
-
+
+
+
+
+
-
-
-
+