change the query for community in search pages of pub/data/soft and the parameters in the url

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@51872 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2018-04-26 12:21:47 +00:00
parent 77117d08eb
commit a923fb6d62
6 changed files with 44 additions and 33 deletions

View File

@ -83,9 +83,9 @@ export class AppComponent {
items: []
},
{rootItem: new MenuItem("search","Search","","",false,[],[],{}),
items: [new MenuItem("","Publications","","/search/find/publications",false,["publication"],["/search/find/publications"],{community: encodeURIComponent('"'+community.queryId+'"'), communityId: community.communityId}),
new MenuItem("","Research Data","","/search/find/datasets",false,["dataset"],["/search/find/datasets"],{community: encodeURIComponent('"'+community.queryId+'"'), communityId: community.communityId}),
new MenuItem("","Software","","/search/find/software",false,["software"],["/search/find/software"],{community: encodeURIComponent('"'+community.queryId+'"'), communityId: community.communityId}),
items: [new MenuItem("","Publications","","/search/find/publications",false,["publication"],["/search/find/publications"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
new MenuItem("","Research Data","","/search/find/datasets",false,["dataset"],["/search/find/datasets"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
new MenuItem("","Software","","/search/find/software",false,["software"],["/search/find/software"],(typeof document !== 'undefined' && ConnectHelper.isProduction(document.location.hostname))?{}:{communityId:community.communityId}),
new MenuItem("","Projects","","/search/find/projects/",false,["project"],["/search/find/projects"],{communityId: community.communityId}),
new MenuItem("","Content Providers","","/search/find/dataproviders",false,["datasource"],["/search/find/dataproviders"],{communityId: community.communityId}),
// new MenuItem("","Organizations","","/search/find/organizations/",false,["organization"],["/search/find/organizations"],{community: community.communityId}),

View File

@ -90,7 +90,7 @@ export class CommunityComponent {
this._communityService.getCommunity(this.properties, this.properties.communityAPI+this.communityId).subscribe (
community => {
this.community = community;
this.params = {community: encodeURIComponent('"'+community.queryId+'"')};
this.params = {communityId: community.communityId};
this._meta.updateTag({content:community.description},"name='description'");
this._meta.updateTag({content:community.description},"property='og:description'");
this._meta.updateTag({content:community.title},"property='og:title'");

View File

@ -20,18 +20,21 @@ export class OpenaireSearchDatasetsComponent {
connectCommunityId:string;
piwikSiteId = null;
constructor ( private route: ActivatedRoute) {
}
ngOnInit() {
var communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
}
ngOnInit() {
if(communityId){
this.advancedSearchParameters = {community:communityId, co: "and"};
this.connectCommunityId = communityId
}else{
this.route.queryParams.subscribe(data => {
if(data['community'] && data['community']!=""){
if(data['communityId'] && data['communityId']!=""){
this.advancedSearchParameters = {community: data['community'], co: "and"};
var id= decodeURIComponent(data['community']);
this.connectCommunityId = id.slice(1,id.length - 1);
this.connectCommunityId = data['communityId'];
}
});
}
}
}
}

View File

@ -21,17 +21,21 @@ export class OpenaireSearchPublicationsComponent {
connectCommunityId:string;
piwikSiteId = null;
constructor ( private route: ActivatedRoute) {
var communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
}
ngOnInit() {
var communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
if(communityId){
this.advancedSearchParameters = {community:communityId, co: "and"};
this.connectCommunityId = communityId
}else{
this.route.queryParams.subscribe(data => {
if(data['community'] && data['community']!=""){
if(data['communityId'] && data['communityId']!=""){
this.advancedSearchParameters = {community: data['community'], co: "and"};
var id= decodeURIComponent(data['community']);
this.connectCommunityId = id.slice(1,id.length - 1);
this.connectCommunityId = data['communityId'];
}
});
}
}
}

View File

@ -20,17 +20,21 @@ export class OpenaireSearchSoftwareComponent {
connectCommunityId:string;
piwikSiteId = null;
constructor ( private route: ActivatedRoute) {
var communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
}
ngOnInit() {
var communityId = ConnectHelper.getCommunityFromDomain(document.location.hostname);
this.piwikSiteId = PiwikHelper.siteIDs[communityId];
if(communityId){
this.advancedSearchParameters = {community:communityId, co: "and"};
this.connectCommunityId = communityId
}else{
this.route.queryParams.subscribe(data => {
if(data['community'] && data['community']!=""){
if(data['communityId'] && data['communityId']!=""){
this.advancedSearchParameters = {community: data['community'], co: "and"};
var id= decodeURIComponent(data['community']);
this.connectCommunityId = id.slice(1,id.length - 1);
this.connectCommunityId = data['communityId'];
}
});
}
}
}

BIN
src/assets/home.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB