diff --git a/portal-2/src/app/deposit/deposit.module.ts b/portal-2/src/app/deposit/deposit.module.ts index eef2e6c4..c60f9ca6 100644 --- a/portal-2/src/app/deposit/deposit.module.ts +++ b/portal-2/src/app/deposit/deposit.module.ts @@ -9,13 +9,16 @@ import { DepositResultComponent } from './depositResult.component'; import {EntitiesAutocompleteModule} from '../utils/entitiesAutoComplete/entitiesAutoComplete.module'; import {DataProvidersServiceModule} from '../services/dataProvidersService.module'; import {OrganizationServiceModule} from '../services/organizationService.module'; +import {SearchResultsModule } from '../searchPages/searchUtils/searchResults.module'; + @NgModule({ imports: [ CommonModule, FormsModule, EntitiesAutocompleteModule, DataProvidersServiceModule, - OrganizationServiceModule + OrganizationServiceModule, + SearchResultsModule ], declarations: [ DepositComponent, diff --git a/portal-2/src/app/deposit/depositResult.component.ts b/portal-2/src/app/deposit/depositResult.component.ts index fed7733c..fc7f429e 100644 --- a/portal-2/src/app/deposit/depositResult.component.ts +++ b/portal-2/src/app/deposit/depositResult.component.ts @@ -39,7 +39,10 @@ import {OrganizationService} from '../services/organization.service';

Please use the information/contacts shown below to deposit your {{requestFor}}.

View all {{fetchDataproviders.searchUtils.totalResults}} results
- + + @@ -50,7 +53,7 @@ import {OrganizationService} from '../services/organization.service'; An error occured. No data providers found for institution: - + {{organization['name']}} {{organization['name']}} diff --git a/portal-2/src/app/landingPages/dataProvider/datasetsTab.component.ts b/portal-2/src/app/landingPages/dataProvider/datasetsTab.component.ts index e1896de2..fc7810a1 100644 --- a/portal-2/src/app/landingPages/dataProvider/datasetsTab.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/datasetsTab.component.ts @@ -17,7 +17,10 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';

View all {{fetchDatasets.searchUtils.totalResults}} results
- + + ` }) diff --git a/portal-2/src/app/landingPages/dataProvider/datasourcesTab.component.ts b/portal-2/src/app/landingPages/dataProvider/datasourcesTab.component.ts index 62959b44..4910a212 100644 --- a/portal-2/src/app/landingPages/dataProvider/datasourcesTab.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/datasourcesTab.component.ts @@ -17,7 +17,10 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';

View all {{fetchDataproviders.searchUtils.totalResults}} results
- + + ` }) diff --git a/portal-2/src/app/landingPages/dataProvider/projectsTab.component.ts b/portal-2/src/app/landingPages/dataProvider/projectsTab.component.ts index 0043c6be..d113dbb7 100644 --- a/portal-2/src/app/landingPages/dataProvider/projectsTab.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/projectsTab.component.ts @@ -18,7 +18,10 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';

View all {{fetchProjects.searchUtils.totalResults}} results
- + + ` }) diff --git a/portal-2/src/app/landingPages/dataProvider/publicationsTab.component.ts b/portal-2/src/app/landingPages/dataProvider/publicationsTab.component.ts index 20edf5f8..52556d0a 100644 --- a/portal-2/src/app/landingPages/dataProvider/publicationsTab.component.ts +++ b/portal-2/src/app/landingPages/dataProvider/publicationsTab.component.ts @@ -17,7 +17,10 @@ import {OpenaireProperties} from '../../utils/properties/openaireProperties';

View all {{fetchPublications.searchUtils.totalResults}} results
- + + ` }) diff --git a/portal-2/src/app/landingPages/organization/organization.component.html b/portal-2/src/app/landingPages/organization/organization.component.html index 0e688894..18c01389 100644 --- a/portal-2/src/app/landingPages/organization/organization.component.html +++ b/portal-2/src/app/landingPages/organization/organization.component.html @@ -126,7 +126,10 @@

View all {{fetchDataproviders.searchUtils.totalResults}} results
- + + diff --git a/portal-2/src/app/searchPages/dataProviders/entityRegistries.component.ts b/portal-2/src/app/searchPages/dataProviders/entityRegistries.component.ts index ec4dbb2e..1cc2883b 100644 --- a/portal-2/src/app/searchPages/dataProviders/entityRegistries.component.ts +++ b/portal-2/src/app/searchPages/dataProviders/entityRegistries.component.ts @@ -15,9 +15,11 @@ import {ExportCSVComponent} from '../../utils/exportCSV.class'; selector: 'search-entity-registries', template: ` - diff --git a/portal-2/src/app/searchPages/find/search.component.ts b/portal-2/src/app/searchPages/find/search.component.ts index 32025614..3902a012 100644 --- a/portal-2/src/app/searchPages/find/search.component.ts +++ b/portal-2/src/app/searchPages/find/search.component.ts @@ -77,7 +77,10 @@ import {SearchFields} from '../../utils/properties/searchFields';
  • - + +
    @@ -86,7 +89,10 @@ import {SearchFields} from '../../utils/properties/searchFields';
  • - + +
    @@ -95,7 +101,10 @@ import {SearchFields} from '../../utils/properties/searchFields';
  • - + +
    @@ -104,7 +113,10 @@ import {SearchFields} from '../../utils/properties/searchFields';
  • - + +
    @@ -113,7 +125,10 @@ import {SearchFields} from '../../utils/properties/searchFields';
  • - + +
    @@ -122,7 +137,10 @@ import {SearchFields} from '../../utils/properties/searchFields';
  • - + +
    diff --git a/portal-2/src/app/searchPages/searchUtils/advancedSearchPage.component.ts b/portal-2/src/app/searchPages/searchUtils/advancedSearchPage.component.ts index 7b1c517b..3b5ada0f 100644 --- a/portal-2/src/app/searchPages/searchUtils/advancedSearchPage.component.ts +++ b/portal-2/src/app/searchPages/searchUtils/advancedSearchPage.component.ts @@ -43,7 +43,11 @@ import {StringUtils} from '../../utils/string-utils.class';
    - + +
    @@ -67,6 +71,7 @@ export class AdvancedSearchPageComponent { @Input() csvParams: string; @Input() csvPath: string; + public urlParam: string; public baseURLWithParameters:string = ''; @Output() queryChange = new EventEmitter(); @@ -75,8 +80,26 @@ export class AdvancedSearchPageComponent { ngOnInit() { this.updateBaseUrlWithParameters(); + this.defineUrlParam(); // this.searchUtils.totalResults = this.results.length; } + + private defineUrlParam() { + if(this.entityType == "publication") { + this.urlParam = "articleId"; + } else if(this.entityType == "dataset") { + this.urlParam = "datasetId"; + } else if(this.entityType == "project") { + this.urlParam = "projectId"; + } else if(this.entityType == "organization") { + this.urlParam = "organizationId"; + } else if(this.entityType == "person") { + this.urlParam = "personId"; + } else { + this.urlParam = "datasourceId"; + } + } + public getSelectedFiltersFromUrl(params){ for(var i=0; i< this.fieldIds.length ; i++){ diff --git a/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts b/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts index 36b2ef2d..5c4262d3 100644 --- a/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts +++ b/portal-2/src/app/searchPages/searchUtils/searchPage.component.ts @@ -41,7 +41,12 @@ import {ModalLoading} from '../../utils/modal/loading.component';
    - + +
    @@ -51,7 +56,12 @@ import {ModalLoading} from '../../utils/modal/loading.component'; - + + @@ -65,6 +75,7 @@ export class SearchPageComponent { @Input() results = []; @Input() filters = []; @Input() type:string = ""; + @Input() entityType: string = "aaa"; @Input() searchUtils:SearchUtilsClass = new SearchUtilsClass(); @Output() queryChange = new EventEmitter(); @Output() downloadClick = new EventEmitter(); @@ -81,17 +92,36 @@ export class SearchPageComponent { private baseURLWithParameters:string = ''; private sub: any; public countFilters= 0; + public urlParam: string; constructor (private location: Location ) { } ngOnInit() { this.updateBaseUrlWithParameters(this.filters); + this.defineUrlParam(); + //console.info(this.entityType + " " + this.urlParam); } ngAfterViewChecked(){ } + private defineUrlParam() { + if(this.entityType == "publication") { + this.urlParam = "articleId"; + } else if(this.entityType == "dataset") { + this.urlParam = "datasetId"; + } else if(this.entityType == "project") { + this.urlParam = "projectId"; + } else if(this.entityType == "organization") { + this.urlParam = "organizationId"; + } else if(this.entityType == "person") { + this.urlParam = "personId"; + } else { + this.urlParam = "datasourceId"; + } + } + public getQueryParametersFromUrl(params){ //TODO when final search is done-allFqs/fq diff --git a/portal-2/src/app/searchPages/searchUtils/searchResult.component.ts b/portal-2/src/app/searchPages/searchUtils/searchResult.component.ts index a9c7ccc6..800bbee9 100644 --- a/portal-2/src/app/searchPages/searchUtils/searchResult.component.ts +++ b/portal-2/src/app/searchPages/searchUtils/searchResult.component.ts @@ -1,6 +1,7 @@ import {Component, Input} from '@angular/core'; import {SearchResult} from '../../utils/entities/searchResult'; import { ErrorCodes} from '../../utils/properties/openaireProperties'; +import {RouterHelper} from '../../utils/routerHelper.class'; @Component({ selector: 'search-result', @@ -13,7 +14,9 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
  • - + + +

    @@ -27,6 +30,7 @@ import { ErrorCodes} from '../../utils/properties/openaireProperties';
    + {{author['name']}}; @@ -126,16 +130,16 @@ export class SearchResultComponent { @Input() totalResults: number; @Input() results: SearchResult[]; @Input() status: number; - errorCodes:ErrorCodes = new ErrorCodes(); + @Input() type: string; + @Input() urlParam: string; + public errorCodes:ErrorCodes = new ErrorCodes(); + public routerHelper:RouterHelper = new RouterHelper(); public errorMessage: string = "No results found"; - constructor () { + constructor () { - } + } - ngOnInit() { - - console.info("Heeey!!"); - } + ngOnInit() {} } diff --git a/portal-2/src/app/searchPages/searchUtils/searchResults.module.ts b/portal-2/src/app/searchPages/searchUtils/searchResults.module.ts index 20f5a810..9500efb0 100644 --- a/portal-2/src/app/searchPages/searchUtils/searchResults.module.ts +++ b/portal-2/src/app/searchPages/searchUtils/searchResults.module.ts @@ -7,10 +7,12 @@ import {SearchResult} from '../../utils/entities/searchResult'; // import {SearchDownloadComponent} from './searchDownload.component'; import {SearchResultComponent} from './searchResult.component'; // import{PagingModule} from '../../utils/paging.module'; +import { RouterModule } from '@angular/router'; @NgModule({ imports: [ - CommonModule, FormsModule + CommonModule, FormsModule, + RouterModule // ,PagingModule ], declarations: [ diff --git a/portal-2/src/app/searchPages/simple/searchDataproviders.component.ts b/portal-2/src/app/searchPages/simple/searchDataproviders.component.ts index ab606413..38342979 100644 --- a/portal-2/src/app/searchPages/simple/searchDataproviders.component.ts +++ b/portal-2/src/app/searchPages/simple/searchDataproviders.component.ts @@ -14,7 +14,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class'; selector: 'search-dataproviders', template: ` - diff --git a/portal-2/src/app/searchPages/simple/searchDatasets.component.ts b/portal-2/src/app/searchPages/simple/searchDatasets.component.ts index 5deeb35c..866d7096 100644 --- a/portal-2/src/app/searchPages/simple/searchDatasets.component.ts +++ b/portal-2/src/app/searchPages/simple/searchDatasets.component.ts @@ -15,7 +15,8 @@ import {DOI} from '../../utils/string-utils.class'; selector: 'search-datasets', template: ` - diff --git a/portal-2/src/app/searchPages/simple/searchOrganizations.component.ts b/portal-2/src/app/searchPages/simple/searchOrganizations.component.ts index 7a3e5ae2..a19213ea 100644 --- a/portal-2/src/app/searchPages/simple/searchOrganizations.component.ts +++ b/portal-2/src/app/searchPages/simple/searchOrganizations.component.ts @@ -13,7 +13,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class'; selector: 'search-organizations', template: ` - diff --git a/portal-2/src/app/searchPages/simple/searchPeople.component.ts b/portal-2/src/app/searchPages/simple/searchPeople.component.ts index 6391dd10..98387214 100644 --- a/portal-2/src/app/searchPages/simple/searchPeople.component.ts +++ b/portal-2/src/app/searchPages/simple/searchPeople.component.ts @@ -15,7 +15,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class'; selector: 'search-people', template: ` - diff --git a/portal-2/src/app/searchPages/simple/searchProjects.component.ts b/portal-2/src/app/searchPages/simple/searchProjects.component.ts index 96dc3b8e..cb62aa61 100644 --- a/portal-2/src/app/searchPages/simple/searchProjects.component.ts +++ b/portal-2/src/app/searchPages/simple/searchProjects.component.ts @@ -13,7 +13,8 @@ import {SearchUtilsClass } from '../searchUtils/searchUtils.class'; selector: 'search-projects', template: ` - diff --git a/portal-2/src/app/searchPages/simple/searchPublications.component.ts b/portal-2/src/app/searchPages/simple/searchPublications.component.ts index 842377fb..8be4f19a 100644 --- a/portal-2/src/app/searchPages/simple/searchPublications.component.ts +++ b/portal-2/src/app/searchPages/simple/searchPublications.component.ts @@ -17,7 +17,8 @@ import {DOI} from '../../utils/string-utils.class'; selector: 'search-publications', template: ` -