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 91bd51bd..34f71a93 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";
- -

- -
+
- + -
+
@@ -118,6 +129,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 d102c511..b43476da 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.html b/searchPages/find/searchAll.component.html index d6056c69..a479a543 100644 --- a/searchPages/find/searchAll.component.html +++ b/searchPages/find/searchAll.component.html @@ -36,17 +36,17 @@ {{resultsName}} - - ({{fetchPublications.searchUtils.totalResults | number}}) - + + {{projectName}} - - ({{fetchProjects.searchUtils.totalResults | number}}) + @@ -54,8 +54,8 @@ {{dataSourcesName}} - - ({{fetchDataproviders.searchUtils.totalResults | number}}) + @@ -63,8 +63,8 @@ {{servicesName}} - - ({{fetchServices.searchUtils.totalResults | number}}) + @@ -72,9 +72,9 @@ {{organizationsName}} - - ({{fetchOrganizations.searchUtils.totalResults | number}}) - + + 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/find/searchAll.module.ts b/searchPages/find/searchAll.module.ts index ae6e9160..692e5743 100644 --- a/searchPages/find/searchAll.module.ts +++ b/searchPages/find/searchAll.module.ts @@ -23,13 +23,14 @@ import {SearchDataProvidersModule} from "../searchDataProviders.module"; import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard"; import {BreadcrumbsModule} from "../../utils/breadcrumbs/breadcrumbs.module"; import {SliderTabsModule} from "../../sharedComponents/tabs/slider-tabs.module"; +import {NumberRoundModule} from "../../utils/pipes/number-round.module"; @NgModule({ imports: [ CommonModule, FormsModule, RouterModule, DataProvidersServiceModule, ProjectsServiceModule, SearchResearchResultsServiceModule, OrganizationsServiceModule, - SearchResultsModule, PiwikServiceModule, Schema2jsonldModule, SEOServiceModule, AdvancedSearchFormModule, SearchResearchResultsModule, SearchProjectsModule, SearchOrganizationsModule, SearchDataProvidersModule, BreadcrumbsModule, SliderTabsModule + SearchResultsModule, PiwikServiceModule, Schema2jsonldModule, SEOServiceModule, AdvancedSearchFormModule, SearchResearchResultsModule, SearchProjectsModule, SearchOrganizationsModule, SearchDataProvidersModule, BreadcrumbsModule, SliderTabsModule, NumberRoundModule ], declarations: [ SearchAllComponent diff --git a/searchPages/searchResearchResults.component.ts b/searchPages/searchResearchResults.component.ts index d8e78fe6..00bc7bc2 100644 --- a/searchPages/searchResearchResults.component.ts +++ b/searchPages/searchResearchResults.component.ts @@ -91,12 +91,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(); @@ -530,6 +530,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 3335bf93..be34dfef 100644 --- a/searchPages/searchUtils/newSearchPage.component.ts +++ b/searchPages/searchUtils/newSearchPage.component.ts @@ -218,7 +218,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 896cc360..12a4bed0 100644 --- a/searchPages/searchUtils/searchFilter.component.ts +++ b/searchPages/searchUtils/searchFilter.component.ts @@ -84,9 +84,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.radioValue = ""; diff --git a/searchPages/searchUtils/searchHelperClasses.class.ts b/searchPages/searchUtils/searchHelperClasses.class.ts index 01a68404..03d5a603 100644 --- a/searchPages/searchUtils/searchHelperClasses.class.ts +++ b/searchPages/searchUtils/searchHelperClasses.class.ts @@ -13,6 +13,7 @@ export class Filter{ // public uniqueValueIdSelected: string; public countAllValues?: number = -1; // -1: not yet requested, 0: request failed, >0 OK public isOpen?: 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 063a1d7e..ccf0b230 100644 --- a/utils/result-preview/result-preview.component.html +++ b/utils/result-preview/result-preview.component.html @@ -185,16 +185,16 @@
-