diff --git a/searchPages/dataProviders/compatibleDataProvidersTable.component.ts b/searchPages/dataProviders/compatibleDataProvidersTable.component.ts index 87512003..f958ac9a 100644 --- a/searchPages/dataProviders/compatibleDataProvidersTable.component.ts +++ b/searchPages/dataProviders/compatibleDataProvidersTable.component.ts @@ -1,23 +1,23 @@ -import {Component, Input, ViewChild} from '@angular/core'; +import {Component, ViewChild} from '@angular/core'; import {Location} from '@angular/common'; import { ActivatedRoute} from '@angular/router'; import { Filter, Value} from '../searchUtils/searchHelperClasses.class'; import {SearchDataprovidersService} from '../../services/searchDataproviders.service'; -import {SearchResult} from '../../utils/entities/searchResult'; import {ErrorCodes} from '../../utils/properties/errorCodes'; import {ErrorMessagesComponent} from '../../utils/errorMessages.component'; -import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; +import {SearchFields} from '../../utils/properties/searchFields'; import {SearchPageTableViewComponent } from '../searchUtils/searchPageTableView.component'; import {SearchUtilsClass } from '../searchUtils/searchUtils.class'; import{EnvProperties} from '../../utils/properties/env-properties'; + @Component({ selector: 'search-content-providers-table', template: ` - +
+ + +
` diff --git a/searchPages/searchUtils/searchPageTableView.component.html b/searchPages/searchUtils/searchPageTableView.component.html index 8ab142b7..831c399a 100644 --- a/searchPages/searchUtils/searchPageTableView.component.html +++ b/searchPages/searchUtils/searchPageTableView.component.html @@ -1,3 +1,37 @@ + +
+
+
+
Filters
+ + Clear All + +
+
+ + + + + + + + + + + + + +
+
+ + +
+
@@ -19,168 +53,43 @@
-
+
- -
- +
-
- + + + + + + + + + + + + + + + Filters ({{(countFilters())}}) -
-
+ +
+
-
- Keywords: - - - - -
- {{filter.title}}: - - - - - , - - -
- - - -
-
Filter By:
- +
-
-
- -
- Keywords: - - - - -
- {{filter.title}}: - - - - - , - - -
- - - - -
- - +
+
-
@@ -328,24 +237,8 @@ [href]="properties.lastIndexInformationLink" target="_blank"> Last index information - - -
- -
- -
diff --git a/searchPages/searchUtils/searchPageTableView.component.ts b/searchPages/searchUtils/searchPageTableView.component.ts index 797a2d48..86bffca8 100644 --- a/searchPages/searchUtils/searchPageTableView.component.ts +++ b/searchPages/searchUtils/searchPageTableView.component.ts @@ -15,7 +15,7 @@ import {EnvProperties} from '../../utils/properties/env-prope import {Filter, Value} from './searchHelperClasses.class'; import {SearchResult} from '../../utils/entities/searchResult'; import {SearchFields, FieldDetails} from '../../utils/properties/searchFields'; -import {SearchUtilsClass} from './searchUtils.class'; +import {SearchCustomFilter, SearchUtilsClass} from './searchUtils.class'; import {DOI, StringUtils} from '../../utils/string-utils.class'; import {ModalLoading} from '../../utils/modal/loading.component'; import {SearchFilterComponent} from './searchFilter.component'; @@ -24,6 +24,7 @@ import {ErrorCodes} from '../../utils/properties/errorCode import {PiwikService} from '../../utils/piwik/piwik.service'; //import {SearchDataprovidersService} from '../../services/searchDataproviders.service'; import { SEOService } from '../../sharedComponents/SEO/SEO.service'; +import {HelperService} from "../../utils/helper/helper.service"; @Component({ selector: 'search-page-table', @@ -80,19 +81,22 @@ export class SearchPageTableViewComponent implements OnInit, AfterViewInit { dtTrigger: Subject = new Subject(); //necessary properties:EnvProperties; url = null; + public pageContents = null; + @Input() customFilter: SearchCustomFilter = null; constructor (private route: ActivatedRoute, private router: Router, private location: Location, private _meta: Meta, private _title: Title, private _piwikService:PiwikService, - private seoService: SEOService) { } + private seoService: SEOService, + private helper: HelperService) { } ngOnInit() { this.route.data .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; - + this.getPageContents(); this.isPiwikEnabled = data.envSpecific.enablePiwikTrack; if(typeof window !== 'undefined') { this.updateUrl(data.envSpecific.baseLink+location.pathname); @@ -358,7 +362,10 @@ public getParametersFromUrl(params) { /* Transform initial - not filtered results to get the filtered number */ - transform(results): any { + transform(results, searchUtils:SearchUtilsClass = null ): any { + if(searchUtils!=null) { + this.searchUtils = searchUtils; + } if(results.length > 0) { var errorCodes:ErrorCodes = new ErrorCodes(); this.searchUtils.status = errorCodes.LOADING; @@ -568,9 +575,12 @@ Transform initial - not filtered results to get the filtered number filters+=filter.countSelectedValues; } } - if(this.searchUtils.keyword.length > 0 ){ - filters++; - } return filters; } + private getPageContents() { + this.helper.getPageHelpContents(this.router.url, this.properties, (this.customFilter) ? this.customFilter.valueId : null).subscribe(contents => { + + this.pageContents = contents; + }) + } }