diff --git a/claims/claim-utils/claimResultSearchForm.component.ts b/claims/claim-utils/claimResultSearchForm.component.ts index b99f5e2a..095a5532 100644 --- a/claims/claim-utils/claimResultSearchForm.component.ts +++ b/claims/claim-utils/claimResultSearchForm.component.ts @@ -865,7 +865,7 @@ export class ClaimResultSearchFormComponent { } } - + filter.countAllValues = filter.values.length; } return filters; } diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index 59528c96..d9cd5a60 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -1,3 +1,8 @@ + + +
@@ -95,11 +100,7 @@
- - +
diff --git a/landingPages/landing-utils/availableOn.component.ts b/landingPages/landing-utils/availableOn.component.ts index 5cc86206..4a6d28f6 100644 --- a/landingPages/landing-utils/availableOn.component.ts +++ b/landingPages/landing-utils/availableOn.component.ts @@ -14,68 +14,79 @@ import {RouterHelper} from "../../utils/routerHelper.class";
- -

- -
+
- + -
+
@@ -120,6 +131,7 @@ import {RouterHelper} from "../../utils/routerHelper.class"; export class AvailableOnComponent { @Input() isMobile: boolean = false; + @Input() inModal: boolean = false; @Input() usedBy: "search" | "landing" = "search"; @Input() prevPath: string = ""; @Input() availableOn: HostedByCollectedFrom[]; diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index dbcb6cca..04f4235a 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -1,3 +1,9 @@ + + + +
@@ -116,11 +122,7 @@
- - - +
diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index 1c0742a9..709366de 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -1,3 +1,8 @@ + + +
@@ -141,10 +146,7 @@
- - +
diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index 5c5e76eb..1d64f1f3 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -1,3 +1,8 @@ + + +
@@ -161,11 +166,7 @@
- - - +
diff --git a/searchPages/find/searchAll.component.ts b/searchPages/find/searchAll.component.ts index c59d975a..cea70fd9 100644 --- a/searchPages/find/searchAll.component.ts +++ b/searchPages/find/searchAll.component.ts @@ -97,12 +97,12 @@ export class SearchAllComponent { subs: Subscription[] = []; - quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = { - filter: null, - selected: true, - filterId: "resultbestaccessright", - value: "Open Access" - }; + quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = null;//{ + // filter: null, + // selected: true, + // filterId: "resultbestaccessright", + // value: "Open Access" + // }; resultTypes = {publication: true, dataset: true, software: true, other: true}; @@ -290,7 +290,7 @@ export class SearchAllComponent { this.fetchDatasets.clearSubscriptions(); this.fetchPublications.clearSubscriptions(); this.fetchSoftware.clearSubscriptions(); - this.fetchPublications.clearSubscriptions(); + this.fetchOrps.clearSubscriptions(); this.fetchOrganizations.clearSubscriptions(); this.fetchDataproviders.clearSubscriptions(); this.fetchServices.clearSubscriptions(); @@ -603,9 +603,9 @@ export class SearchAllComponent { } if (entity == "result") { entity = "research-outcomes"; - if(!!this.openAccess) { - this.parameters["resultbestaccessright"] = '"' + encodeURIComponent("Open Access") + '"'; - } + // if(!!this.openAccess) { + // this.parameters["resultbestaccessright"] = '"' + encodeURIComponent("Open Access") + '"'; + // } } this.router.navigate(["/search/find", entity], {queryParams: this.parameters}); } diff --git a/searchPages/searchResearchResults.component.ts b/searchPages/searchResearchResults.component.ts index 50e48e8c..7b4e5f28 100644 --- a/searchPages/searchResearchResults.component.ts +++ b/searchPages/searchResearchResults.component.ts @@ -99,12 +99,12 @@ export class SearchResearchResultsComponent { public orderedFields = this.searchFields.RESULT_FIELDS_ORDERED; @ViewChild(NewSearchPageComponent, { static: true }) searchPage: NewSearchPageComponent; @Input() simpleView: boolean = true; - quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = { - filter: null, - selected: true, - filterId: "resultbestaccessright", - value: "Open Access" - }; + quickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = null;//{ + // filter: null, + // selected: true, + // filterId: "resultbestaccessright", + // value: "Open Access" + // }; @Input() includeOnlyResultsAndFilter: boolean = false; @Input() showBreadcrumb: boolean = false; @Output() searchPageUpdates = new EventEmitter(); @@ -551,6 +551,7 @@ export class SearchResearchResultsComponent { filter.countSelectedValues = oldFilter.countSelectedValues; filter.radioValue = oldFilter.radioValue; this.filters[index] = filter; + this.searchPage.filterFilterValues(this.filters); this.updateOrderedFilter(filter); this.cdr.detectChanges(); diff --git a/searchPages/searchUtils/newSearchPage.component.ts b/searchPages/searchUtils/newSearchPage.component.ts index 55b8f256..e854f0bd 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -223,7 +223,7 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges { } } if (typeof document !== 'undefined') { - this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(lastIndexUpdate => { + this.subscriptions.push(this.indexInfoService.lastIndexDate.subscribe(lastIndexUpdate => { if (lastIndexUpdate) { this.indexUpdateDate = new Date(lastIndexUpdate); } diff --git a/searchPages/searchUtils/searchFilter.component.ts b/searchPages/searchUtils/searchFilter.component.ts index e9b005bd..2cf3b93e 100644 --- a/searchPages/searchUtils/searchFilter.component.ts +++ b/searchPages/searchUtils/searchFilter.component.ts @@ -85,9 +85,11 @@ export class SearchFilterComponent implements OnInit, OnChanges { ngOnChanges(changes: SimpleChanges) { if (changes.filter) { - this.hasMoreValues = this.filter.values.length > this.filterValuesNum; + this.hasMoreValues = (this.filter.countUnfilteredValues > 0 ? this.filter.countUnfilteredValues : this.filter.values.length) > this.filterValuesNum; // this.filter.values = this.filter.values.filter(value => !value.name.toLowerCase().includes('unknown') && !value.name.toLowerCase().includes('not available')); - this.filter.values = this.filter.values.filter(value => value && value.name != "unidentified" && value.name != "Undetermined" && !value.name.toLowerCase().includes('unknown') && !value.name.toLowerCase().includes('not available')); + // this.filter.values = this.filter.values.filter(value => value && value.name != "unidentified" && value.name != "Undetermined" && !value.name.toLowerCase().includes('unknown') && !value.name.toLowerCase().includes('not available') + // && value.name.toLowerCase() != "null" + // ); if (this.filter.filterType == "radio" || this.filter.filterType == "triplet") { this.filter.radioValue = ""; diff --git a/searchPages/searchUtils/searchHelperClasses.class.ts b/searchPages/searchUtils/searchHelperClasses.class.ts index 8276d0b7..9a64e04a 100644 --- a/searchPages/searchUtils/searchHelperClasses.class.ts +++ b/searchPages/searchUtils/searchHelperClasses.class.ts @@ -14,6 +14,7 @@ export class Filter{ public countAllValues?: number = -1; // -1: not yet requested, 0: request failed, >0 OK // public isOpen?: boolean = false; public isViewAllOpen?: boolean = false; + public countUnfilteredValues?: number = 0; } export class Value{ diff --git a/services/servicesUtils/refineResults.class.ts b/services/servicesUtils/refineResults.class.ts index 01ec207b..dcd48d17 100644 --- a/services/servicesUtils/refineResults.class.ts +++ b/services/servicesUtils/refineResults.class.ts @@ -11,7 +11,7 @@ export class RefineResultsUtils { var searchFields:SearchFields = new SearchFields(); var filters:Filter[] = []; - if(data && fields){ + if(data && Object.keys(data).length > 0 && fields){ for(let j=0; j = new BehaviorSubject(null); constructor(private http: HttpClient) { } - getLastIndexDate(properties: EnvProperties): Observable { - let url = properties.indexInfoAPI; - return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)): url).pipe(map(res => res['claim_load_date'])).pipe(catchError(err => {return of(null)})); + get lastIndexDate(): Observable { + return this.lastIndexDateSubject.getValue() ? this.lastIndexDateSubject.asObservable() : this.getLastIndexDate(); + } + + setLastIndexDate(value: any) { + this.lastIndexDateSubject.next(value); + } + + getLastIndexDate(props: EnvProperties = properties): Observable { + let url = props.indexInfoAPI; + return this.http.get((props.useLongCache)? (props.cacheUrl+encodeURIComponent(url)): url).pipe(map(res => { + this.setLastIndexDate(res['claim_load_date']); + return res['claim_load_date']; + })).pipe(catchError(err => {return of(null)})); } getStatsLastDate(properties: EnvProperties): Observable { let url = properties.indexInfoAPI; diff --git a/utils/result-preview/result-preview.component.html b/utils/result-preview/result-preview.component.html index 306d2128..96832b0a 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -173,16 +173,16 @@
-