diff --git a/claims/claim-utils/service/contexts.service.ts b/claims/claim-utils/service/contexts.service.ts index ebb38da4..e73b7cf2 100644 --- a/claims/claim-utils/service/contexts.service.ts +++ b/claims/claim-utils/service/contexts.service.ts @@ -18,7 +18,7 @@ export class ContextsService { public getPublicCommunities( apiUrl:string):any { let url = apiUrl + 's/'; return this.http.get(url) - .pipe(map(res => this.parseCommunities(res, true) )); + .pipe(map(res => this.parseCommunities(res, false) )); } parseCommunities(data, getall){ var communities = []; diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index bf9f6b34..722581eb 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -591,7 +591,7 @@ @@ -637,7 +637,7 @@ @@ -750,4 +750,4 @@ - \ No newline at end of file + diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 1cae92b8..a6ca4c35 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -314,7 +314,7 @@
-
Related Outcomes
+
Related research
- @@ -419,7 +419,7 @@ @@ -432,7 +432,7 @@ - @@ -452,7 +452,7 @@ diff --git a/searchPages/find/searchAll.component.html b/searchPages/find/searchAll.component.html index 94dd4c1f..63dd40a7 100644 --- a/searchPages/find/searchAll.component.html +++ b/searchPages/find/searchAll.component.html @@ -18,7 +18,7 @@ [isDisabled]="disableForms" [simpleView]="true" [formPlaceholderText]="formPlaceholderText" - [selectedFields]="selectedFields" + [selectedFields]="selectedFields" [showAdvancedSearchLink]="true" [fieldIdsMap]="fieldIdsMap" [fieldIds]="fieldIds" [entitiesSelection]="true" [customFilter]="customFilter" > @@ -79,17 +79,17 @@ (searchPageUpdates)="activeEntityUpdate($event)" [showAdvancedSearchLink]="false" simpleSearchLink="/search/find"> - - - diff --git a/searchPages/find/searchAll.component.ts b/searchPages/find/searchAll.component.ts index f27ddc78..18846c65 100644 --- a/searchPages/find/searchAll.component.ts +++ b/searchPages/find/searchAll.component.ts @@ -409,6 +409,7 @@ export class SearchAllComponent { //console.log(err); this.handleError("Error getting number of Projects", err); this.fetchProjects.searchUtils.status = this.errorCodes.ERROR; + this.fetchProjects.searchUtils.totalResults = null; } ); } @@ -428,6 +429,7 @@ export class SearchAllComponent { //console.log(err); this.handleError("Error getting number of Projects", err); this.fetchDataproviders.searchUtils.status = this.errorCodes.ERROR; + this.fetchDataproviders.searchUtils.totalResults = null; } ); } @@ -447,6 +449,7 @@ export class SearchAllComponent { //console.log(err); this.handleError("Error getting number of Organizations", err); this.fetchOrganizations.searchUtils.status = this.errorCodes.ERROR; + this.fetchOrganizations.searchUtils.totalResults = null; } ); @@ -467,6 +470,7 @@ export class SearchAllComponent { err => { this.handleError("Error getting number of research results", err); fetchClass.searchUtils.status = this.errorCodes.ERROR; + fetchClass.searchUtils.totalResults = null; } ); } @@ -488,7 +492,8 @@ export class SearchAllComponent { activeEntityUpdate($event) { this.disableForms = $event.disableForms; - let updated = true; + let updated = true + console.debug($event) if (this.activeEntity == "result") { if($event.searchUtils.status!=this.errorCodes.LOADING) { this.fetchPublications.searchUtils.totalResults = $event.searchUtils.totalResults; diff --git a/searchPages/searchDataProviders.component.ts b/searchPages/searchDataProviders.component.ts index ede5fcad..2ee61670 100644 --- a/searchPages/searchDataProviders.component.ts +++ b/searchPages/searchDataProviders.component.ts @@ -32,7 +32,7 @@ import {DatasourcesHelperClass} from "./searchUtils/datasourcesHelper.class"; [includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter" [piwikSiteId]=piwikSiteId [hasPrefix]="hasPrefix" [searchFormClass]="type!='deposit'?'datasourcesSearchForm':''" - [entitiesSelection]="type=='all'" [showAdvancedSearchLink]="type=='all'" + [entitiesSelection]="type=='all'" [showAdvancedSearchLink]="showAdvancedSearchLink" [filters]="filters" [simpleView]="simpleView" formPlaceholderText="Search by name, description, subject..." [showResultCount]="(type=='all' || type == 'deposit')" [showLastIndex]="type!='deposit'" @@ -79,6 +79,7 @@ export class SearchDataProvidersComponent { @Input() openaireLink: string; @Input() includeOnlyResultsAndFilter: boolean = false; @Output() searchPageUpdates = new EventEmitter(); + @Input() showAdvancedSearchLink:boolean; constructor (private route: ActivatedRoute, private _searchDataProvidersService: SearchDataprovidersService ) { this.results =[]; this.errorCodes = new ErrorCodes(); @@ -88,6 +89,9 @@ export class SearchDataProvidersComponent { ngOnInit() { this.refineFields = DatasourcesHelperClass.getrefineFields(this.type); this.pageTitle = DatasourcesHelperClass.getTitle(this.type); + if(this.showAdvancedSearchLink == null){ + this.showAdvancedSearchLink = (this.type == "all"); + } this.route.data .subscribe((data: { envSpecific: EnvProperties }) => { this.properties= data.envSpecific; diff --git a/searchPages/searchOrganizations.component.ts b/searchPages/searchOrganizations.component.ts index f42cf56b..43c88c4c 100644 --- a/searchPages/searchOrganizations.component.ts +++ b/searchPages/searchOrganizations.component.ts @@ -31,7 +31,7 @@ import {NewSearchPageComponent} from "./searchUtils/newSearchPage.component"; [includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter" [sort]="false" [filters]="filters" - [simpleView]="simpleView" formPlaceholderText="Search by organization name..." + [simpleView]="simpleView" formPlaceholderText="Search by organization name..." [showAdvancedSearchLink]="showAdvancedSearchLink" > ` @@ -67,7 +67,9 @@ export class SearchOrganizationsComponent { @Input() openaireLink: string; @Input() includeOnlyResultsAndFilter: boolean = false; @Output() searchPageUpdates = new EventEmitter(); -public resourcesQuery = "(oaftype exact organization)"; + @Input() showAdvancedSearchLink:boolean = true; + + public resourcesQuery = "(oaftype exact organization)"; constructor (private route: ActivatedRoute, private _searchOrganizationsService: SearchOrganizationsService ) { this.results =[]; this.errorCodes = new ErrorCodes(); @@ -187,7 +189,7 @@ public resourcesQuery = "(oaftype exact organization)"; //console.log(err); this.handleError("Error getting organizations", err); this.searchUtils.status = this.errorMessages.getErrorCode(err.status); - + this.searchUtils.totalResults = 0; //TODO check erros (service not available, bad request) // if( ){ // this.searchUtils.status = errorCodes.ERROR; diff --git a/searchPages/searchProjects.component.ts b/searchPages/searchProjects.component.ts index 0bdd9b57..c0f193ec 100644 --- a/searchPages/searchProjects.component.ts +++ b/searchPages/searchProjects.component.ts @@ -31,7 +31,7 @@ import {RangeFilter} from "../utils/rangeFilter/rangeFilterHelperClasses.class"; [includeOnlyResultsAndFilter]="includeOnlyResultsAndFilter" [filters]="filters" [rangeFilters]="rangeFilters" [rangeFields]="rangeFields" - [simpleView]="simpleView" formPlaceholderText="Search by title, acronym, project code..." + [simpleView]="simpleView" formPlaceholderText="Search by title, acronym, project code..." [showAdvancedSearchLink]="showAdvancedSearchLink" [sort]="false" > @@ -73,6 +73,8 @@ export class SearchProjectsComponent { @Input() openaireLink: string; @Input() includeOnlyResultsAndFilter: boolean = false; @Output() searchPageUpdates = new EventEmitter(); + @Input() showAdvancedSearchLink:boolean = true; + constructor (private route: ActivatedRoute, private _searchProjectsService: SearchProjectsService ) { this.results =[]; @@ -193,7 +195,7 @@ export class SearchProjectsComponent { //console.log(err); this.handleError("Error getting projects", err); this.searchUtils.status = this.errorMessages.getErrorCode(err.status); - + this.searchUtils.totalResults = null; //TODO check erros (service not available, bad request) // if( ){ // this.searchUtils.status = errorCodes.ERROR; diff --git a/searchPages/searchResearchResults.component.ts b/searchPages/searchResearchResults.component.ts index 0485c04d..1bf69a84 100644 --- a/searchPages/searchResearchResults.component.ts +++ b/searchPages/searchResearchResults.component.ts @@ -195,7 +195,7 @@ export class SearchResearchResultsComponent { err => { this.handleError("Error getting " + this.getEntityName(this.resultType, true, true), err); this.searchUtils.status = this.errorMessages.getErrorCode(err.status); - + this.searchUtils.totalResults = null; //TODO check erros (service not available, bad request) // if( ){ // this.searchUtils.status = ErrorCodes.ERROR; @@ -212,6 +212,7 @@ export class SearchResearchResultsComponent { //this.searchPage.closeLoading(); this.disableForms = false; + this.searchPageUpdates.emit({disableForms: this.disableForms, searchUtils: this.searchUtils}) } diff --git a/searchPages/searchUtils/advancedSearchForm.component.html b/searchPages/searchUtils/advancedSearchForm.component.html index 26add03a..b1e8dbef 100644 --- a/searchPages/searchUtils/advancedSearchForm.component.html +++ b/searchPages/searchUtils/advancedSearchForm.component.html @@ -160,15 +160,34 @@ Search
diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index 11a195f9..a633f0d6 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -84,11 +84,21 @@