diff --git a/claims/claim-utils/claimContextSearchForm.component.ts b/claims/claim-utils/claimContextSearchForm.component.ts index 6f508eb6..54cb3ab3 100644 --- a/claims/claim-utils/claimContextSearchForm.component.ts +++ b/claims/claim-utils/claimContextSearchForm.component.ts @@ -275,7 +275,7 @@ getCommunities () { }else{ this.loading = true; - this._contextService.getCommunities(this.properties.contextsAPI).subscribe( + this._contextService.getPublicCommunities(this.properties.contextsAPI).subscribe( data => { this.communities = data; if(this.communities.length > 0){ diff --git a/claims/claim-utils/service/contexts.service.ts b/claims/claim-utils/service/contexts.service.ts index 31000b8f..47f257a7 100644 --- a/claims/claim-utils/service/contexts.service.ts +++ b/claims/claim-utils/service/contexts.service.ts @@ -19,16 +19,28 @@ export class ContextsService { let key = url; //console.info('ContextsService: request communities '+url); return this.http.get(url) - .map(res => res.json()).map(res => this.parseCommunities(res) ) + .map(res => res.json()).map(res => this.parseCommunities(res, true) ) // .do(request => console.info("Get claims: offset = ")) .catch(this.handleError); } - parseCommunities(data){ + public getPublicCommunities( apiUrl:string):any { + let url = apiUrl + 's/'; + + let key = url; + //console.info('ContextsService: request communities '+url); + return this.http.get(url) + .map(res => res.json()).map(res => this.parseCommunities(res, false) ) + // .do(request => console.info("Get claims: offset = ")) + .catch(this.handleError); + } + parseCommunities(data, getall){ var communities = []; for(var i = 0; i< data.length; i++){ if(data[i].type && (data[i].type == "ri" || data[i].type == "community")){ - communities.push(data[i]); + if(getall || data[i].status!='hidden') { + communities.push(data[i]); + } } } return communities; diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index 878c088e..0caa9d81 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -44,7 +44,7 @@
    -
  • Results with funding information: {{dataProviderInfo.aggregationStatus.fundedContent | number}} diff --git a/landingPages/dataset/dataset.component.html b/landingPages/dataset/dataset.component.html index 1fb2c41c..023c44a9 100644 --- a/landingPages/dataset/dataset.component.html +++ b/landingPages/dataset/dataset.component.html @@ -42,7 +42,7 @@
      + [journal]="datasetInfo.journal" [properties]="properties">
    • Embargo end date: {{datasetInfo.embargoEndDate}}
    • diff --git a/landingPages/landing-utils/showPublisher.component.ts b/landingPages/landing-utils/showPublisher.component.ts index 83b5c4a5..50f7c27e 100644 --- a/landingPages/landing-utils/showPublisher.component.ts +++ b/landingPages/landing-utils/showPublisher.component.ts @@ -1,4 +1,5 @@ import {Component, Input} from '@angular/core'; +import {EnvProperties} from "../../utils/properties/env-properties"; @Component({ selector: 'showPublisher', @@ -46,7 +47,7 @@ import {Component, Input} from '@angular/core'; >)
    • -
    • @@ -62,6 +63,7 @@ export class ShowPublisherComponent { @Input() publisher; @Input() journal; @Input() sherpaUrl = 'http://www.sherpa.ac.uk/romeo/search.php?issn='; + @Input() properties:EnvProperties; constructor() { diff --git a/landingPages/orp/orp.component.html b/landingPages/orp/orp.component.html index cc89fb9d..770ae245 100644 --- a/landingPages/orp/orp.component.html +++ b/landingPages/orp/orp.component.html @@ -29,7 +29,7 @@
        + [journal]="orpInfo.journal" [properties]="properties">
      • Embargo end date: {{orpInfo.embargoEndDate}}
      • diff --git a/landingPages/publication/publication.component.html b/landingPages/publication/publication.component.html index 329afdf3..464fbfee 100644 --- a/landingPages/publication/publication.component.html +++ b/landingPages/publication/publication.component.html @@ -33,7 +33,7 @@
          + [journal]="publicationInfo.journal" [properties]="properties">
        • Embargo end date: {{publicationInfo.embargoEndDate}}