diff --git a/deploy/beta-properties.json b/deploy/beta-properties.json index 2cca034..f5696f2 100644 --- a/deploy/beta-properties.json +++ b/deploy/beta-properties.json @@ -1,7 +1,7 @@ { "environment" : "beta", - "enablePiwikTrack" : true, - "enableHelper" : true, + "enablePiwikTrack" : false, + "enableHelper" : false, "useCache" : true, "metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/", "framesAPIURL" : "https://beta.openaire.eu/stats3/", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 4fb998e..1a301e4 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -16,7 +16,9 @@ const routes: Routes = [ { path: 'search/project', loadChildren: './landingPages/project/libProject.module#LibProjectModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/dataprovider', loadChildren: '././landingPages/dataProvider/libDataProvider.module#LibDataProviderModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/organization', loadChildren: './landingPages/organization/libOrganization.module#LibOrganizationModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, - { path: 'search/find', loadChildren: './searchPages/find/libSearch.module#LibMainSearchModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + { path: ':id/search/find', loadChildren: './searchPages/find/libSearch.module#LibMainSearchModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + { path: 'search/find', loadChildren: './searchPages/find/libSearch.module#LibMainSearchModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + { path: 'search/find/publications', loadChildren: './searchPages/simple/searchPublications.module#LibSearchPublicationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/find/datasets', loadChildren: './searchPages/simple/searchDatasets.module#LibSearchDatasetsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/find/software', loadChildren: './searchPages/simple/searchSoftware.module#LibSearchSoftwareModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 2607d8f..f30b182 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -17,14 +17,13 @@ import {HelperFunctions} from "./openaireLibrary/utils/HelperFunctions.class"; + [logOutUrl]="properties.logoutUrl" [cookieDomain]="properties.cookieDomain" [userMenu]="false" [community]="community" [showCommunityName]="true">
- - + OpenAIRE uses cookies in order to function properly.
Cookies are small pieces of data that websites store in your browser to allow us to give you the best browsing experience possible. @@ -49,15 +48,15 @@ export class AppComponent { new MenuItem("", "Research Data", "", "/search/find/datasets", false, ["dataset"], ["/search/find/datasets"], {}), new MenuItem("", "Software", "", "/search/find/software", false, ["software"], ["/search/find/software"], {}), new MenuItem("", "Other Research Products", "", "/search/find/other", false, ["orp"], ["/search/find/other"], {}), - new MenuItem("", "Projects", "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], {}), - new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], {}), + // new MenuItem("", "Projects", "", "/search/find/projects/", false, ["project"], ["/search/find/projects"], {}), + // new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], {}), new MenuItem("", "Organizations", "", "/search/find/organizations/", false, ["organization"], ["/search/find/organizations"], {}) ] } ]; + community = {id: "CA", name: "Canada Aggregator", logoUrl:"assets/common-assets/logo-small-aggregator.png"}; - feedbackmail: string properties: EnvProperties; constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, @@ -83,17 +82,6 @@ export class AppComponent { .then(es => { this.propertiesService.setEnvProperties(es); this.properties = this.propertiesService.envSpecific; - this.feedbackmail = this.properties.feedbackmail; - // if (Session.isPortalAdministrator()) { - // this.userMenuItems.push(new MenuItem("", "Manage all links", "", "/claims", false, [], ["/claims"], {})); - // this.userMenuItems.push(new MenuItem("", "Manage helptexts", - // ((this.properties.environment == "beta") ? "https://beta.admin.connect.openaire.eu" : "https://admin.explore.openaire.eu") + "/dashboard?communityId=openaire", "", true, [], [], {})) - // - // } else if (Session.isClaimsCurator()) { - // this.userMenuItems.push(new MenuItem("", "Manage all links", "", "/claims", false, [], ["/claims"], {})); - // - // } - //console.log(this.properties.loginUrl); }, error => { console.log("App couldn't fetch properties"); console.log(error); diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index b71ba75..901e5f1 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -12,7 +12,7 @@
- +
@@ -22,14 +22,22 @@

- {{publicationsSize.number|number}} {{publicationsSize.size}} publications{{((showDatasets && datasetsSize)?",":"")}} - {{datasetsSize.number|number}} {{datasetsSize.size}} research data + Search for more than + {{publicationsSize.number|number}} + {{publicationsSize.size}} publications{{((showDatasets||showSoftware||showOrp)?",":"")}} + {{datasetsSize.number|number}} + {{datasetsSize.size}} research data{{((showSoftware ||showOrp)?",":"")}} + {{softwareSize.number|number}} + {{softwareSize.size}} software{{(showOrp?",":"")}} + {{otherSize.number|number}} + {{otherSize.size}} other research products
- from {{datasourcesSize.number |number}} {{datasourcesSize.size}} content providers + from {{organizationsSize.number |number}} + {{organizationsSize.size}} organizations + + from {{datasourcesSize.number |number}} {{datasourcesSize.size}} content providers {{((showDataProviders && datasourcesSize)?" and ":" from ")}} {{fundersSize.number|number}} {{fundersSize.size}} funders - - linked together for an integrated research search - +

@@ -46,7 +54,7 @@ name="OpenAIRE Explore"> -
+ -
+ + <!–
–>

{{publicationsSize.count|number}} publications

{{datasetsSize.count|number}} research data

- + <!–
–> @@ -186,13 +194,13 @@ Projects

- +
–> @@ -236,192 +244,12 @@
- - + --> - - - - - - - - - - - -
+ +

@@ -484,68 +312,5 @@

- + --> - - diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index a3aff14..1c48b38 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -1,206 +1,279 @@ -import {Component, Input, Output, EventEmitter, ViewChild, ChangeDetectionStrategy, ViewEncapsulation} from '@angular/core'; -import {Observable} from 'rxjs'; +import {Component} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Location} from '@angular/common'; import "rxjs/add/observable/zip"; -import {Title, Meta} from '@angular/platform-browser'; +import {Meta, Title} from '@angular/platform-browser'; import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service'; -import { SearchPublicationsService} from '../openaireLibrary/services/searchPublications.service'; -import { FetchDataproviders} from '../openaireLibrary/utils/fetchEntitiesClasses/fetchDataproviders.class'; -import { SearchDataprovidersService} from '../openaireLibrary/services/searchDataproviders.service'; -import { SearchProjectsService} from '../openaireLibrary/services/searchProjects.service'; -import { SearchDatasetsService} from '../openaireLibrary/services/searchDatasets.service'; -import { SearchOrganizationsService} from '../openaireLibrary/services/searchOrganizations.service'; -import { RefineFieldResultsService} from '../openaireLibrary/services/refineFieldResults.service'; -import { SearchFields} from '../openaireLibrary/utils/properties/searchFields'; -import { NumberUtils} from '../openaireLibrary/utils/number-utils.class'; +import {SearchPublicationsService} from '../openaireLibrary/services/searchPublications.service'; +import {FetchDataproviders} from '../openaireLibrary/utils/fetchEntitiesClasses/fetchDataproviders.class'; +import {SearchDataprovidersService} from '../openaireLibrary/services/searchDataproviders.service'; +import {SearchProjectsService} from '../openaireLibrary/services/searchProjects.service'; +import {SearchDatasetsService} from '../openaireLibrary/services/searchDatasets.service'; +import {SearchOrganizationsService} from '../openaireLibrary/services/searchOrganizations.service'; +import {RefineFieldResultsService} from '../openaireLibrary/services/refineFieldResults.service'; +import {SearchFields} from '../openaireLibrary/utils/properties/searchFields'; +import {NumberUtils} from '../openaireLibrary/utils/number-utils.class'; -import { RouterHelper} from '../openaireLibrary/utils/routerHelper.class'; -import { EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; -import { ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes'; +import {RouterHelper} from '../openaireLibrary/utils/routerHelper.class'; +import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; +import {ErrorCodes} from '../openaireLibrary/utils/properties/errorCodes'; import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service'; -import { SEOService } from '../openaireLibrary/sharedComponents/SEO/SEO.service'; +import {SEOService} from '../openaireLibrary/sharedComponents/SEO/SEO.service'; +import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; +import {StringUtils} from "../openaireLibrary/utils/string-utils.class"; +import {SearchSoftwareService} from "../openaireLibrary/services/searchSoftware.service"; +import {SearchOrpsService} from "../openaireLibrary/services/searchOrps.service"; @Component({ - selector: 'home', - templateUrl: 'home.component.html', + selector: 'home', + templateUrl: 'home.component.html', }) export class HomeComponent { public piwiksub: any; public subfunders: any; public pageTitle = "OpenAIRE" - public keyword:string = ""; + public keyword: string = ""; - public searchFields:SearchFields = new SearchFields(); - public errorCodes:ErrorCodes = new ErrorCodes(); - public routerHelper:RouterHelper = new RouterHelper(); + public searchFields: SearchFields = new SearchFields(); + public errorCodes: ErrorCodes = new ErrorCodes(); + public routerHelper: RouterHelper = new RouterHelper(); - public publicationsSize:any = null; - public datasetsSize:any = null; - public fundersSize:any = null; - public projectsSize:any = null; - public datasourcesSize:any = null; + public publicationsSize: any = null; + public datasetsSize: any = null; + public softwareSize: any = null; + public otherSize: any = null; + public organizationsSize: any = null; + public fundersSize: any = null; + public projectsSize: any = null; + public datasourcesSize: any = null; - private numResults: number = 2; - public fetchDataproviders : FetchDataproviders; + public fetchDataproviders: FetchDataproviders; - showPublications:boolean= false; - showDatasets:boolean= false; - showProjects:boolean= false; - showDataProviders:boolean= false; + showPublications: boolean = false; + showDatasets: boolean = false; + showSoftware: boolean = false; + showOrp: boolean = false; + showOrganizations: boolean = false; + showProjects: boolean = false; + showDataProviders: boolean = false; properties: EnvProperties; -public subPub;public subData;public subProjects;public subOrg; public subDataPr; + public subPub; + public subSoft; + public subOrp; + public subData; + public subProjects; + public subOrg; + public subDataPr; + customFilter:SearchCustomFilter= new SearchCustomFilter(); - constructor ( + constructor( private route: ActivatedRoute, - private _router: Router, - private _searchPublicationsService: SearchPublicationsService, - private _searchDataprovidersService: SearchDataprovidersService, - private _searchProjectsService: SearchProjectsService, - private _searchDatasetsService: SearchDatasetsService, - private _searchOrganizationsService: SearchOrganizationsService, - private _refineFieldResultsService:RefineFieldResultsService, - private location: Location, private _piwikService:PiwikService, - private config: ConfigurationService, private _meta: Meta, private _title: Title, private seoService: SEOService - ) { + private _router: Router, + private _searchPublicationsService: SearchPublicationsService, + private _searchDataprovidersService: SearchDataprovidersService, + private _searchProjectsService: SearchProjectsService, + private _searchDatasetsService: SearchDatasetsService, + private _searchSoftwareService: SearchSoftwareService, + private _searchOrpsService: SearchOrpsService, + private _searchOrganizationsService: SearchOrganizationsService, + private _refineFieldResultsService: RefineFieldResultsService, + private location: Location, private _piwikService: PiwikService, + private config: ConfigurationService, private _meta: Meta, private _title: Title, private seoService: SEOService + ) { - var description = "openAIRE explore, open access, publications, research results, European commission, search"; + let description = "openAIRE explore, open access, publications, research results, European commission, search"; - var title = "OpenAIRE | Explore"; + let title = "OpenAIRE | Explore"; - this._title.setTitle(title); - this._meta.updateTag({content:description},"name='description'"); - this._meta.updateTag({content:description},"property='og:description'"); - this._meta.updateTag({content:title},"property='og:title'"); - - - //this.fetchDataproviders = new FetchDataproviders(this._searchDataprovidersService); + this._title.setTitle(title); + this._meta.updateTag({content: description}, "name='description'"); + this._meta.updateTag({content: description}, "property='og:description'"); + this._meta.updateTag({content: title}, "property='og:title'"); + this.customFilter.set("Country", "country", "CA" , "Canada"); } public ngOnInit() { this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { + .subscribe((data: { envSpecific: EnvProperties }) => { this.properties = data.envSpecific; - this.seoService.createLinkForCanonicalURL(this.properties.baseLink+this._router.url, false); - if(this.properties!=null){ - var url = this.properties.baseLink+this._router.url; - this._meta.updateTag({content:url},"property='og:url'"); - if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ + this.seoService.createLinkForCanonicalURL(this.properties.baseLink + this._router.url, false); + let url = this.properties.baseLink + this._router.url; + this._meta.updateTag({content: url}, "property='og:url'"); + if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { this.piwiksub = this._piwikService.trackView(this.properties, "OpenAIRE").subscribe(); } + this.showPublications = true; + this.showOrp = true; + this.showOrganizations = true; + this.showDatasets = true; + this.showSoftware = true; + //this.showProjects = false; + // this.showDataProviders = true; + this.getNumbers(); - this.config.getCommunityInformation(this.properties.adminToolsAPIURL, this.properties.adminToolsCommunity ).subscribe(data => { - var showEntity = {}; - for(var i=0; i< data['entities'].length; i++){ + /* this.config.getCommunityInformation(this.properties.adminToolsAPIURL, this.properties.adminToolsCommunity).subscribe(data => { + let showEntity = {}; + for (let i = 0; i < data['entities'].length; i++) { - showEntity[""+data['entities'][i]["pid"]+""] = data['entities'][i]["isEnabled"]; - } - this.showPublications = showEntity["publication"]; - this.showDatasets = showEntity["dataset"]; - this.showProjects = showEntity["project"]; - this.showDataProviders = showEntity["datasource"]; - this.getNumbers(); - // if(this.showDataProviders) { - // this.fetchDataproviders.getResultsForHome(this.numResults, this.properties); - // } - }, - error => { - this.handleError("Error getting community information", error); - } - ); - } - }); + showEntity["" + data['entities'][i]["pid"] + ""] = data['entities'][i]["isEnabled"]; + } + this.showPublications = showEntity["publication"]; + this.showDatasets = showEntity["dataset"]; + this.showProjects = showEntity["project"]; + this.showDataProviders = showEntity["datasource"]; + this.getNumbers(); + // if(this.showDataProviders) { + // this.fetchDataproviders.getResultsForHome(this.numResults, this.properties); + // } + }, + error => { + this.handleError("Error getting community information", error); + } + );*/ + + }); } + public ngOnDestroy() { - if(this.piwiksub){ + if (this.piwiksub) { this.piwiksub.unsubscribe(); } - if(this.subfunders){ + if (this.subfunders) { this.subfunders.unsubscribe(); } - if(this.subPub){ - this.subPub.unsubscribe(); - } - if(this.subData){ - this.subData.unsubscribe(); - } - // if(this.subProjects){ - // this.subProjects.unsubscribe(); - // } - // if(this.subOrg){ - // this.subOrg.unsubscribe(); - // } - if(this.subDataPr){ - this.subDataPr.unsubscribe(); - } + if (this.subPub) { + this.subPub.unsubscribe(); + } + if (this.subOrp) { + this.subOrp.unsubscribe(); + } + if (this.subSoft) { + this.subSoft.unsubscribe(); + } + if (this.subData) { + this.subData.unsubscribe(); + } + if (this.subProjects) { + this.subProjects.unsubscribe(); + } + if (this.subOrg) { + this.subOrg.unsubscribe(); + } + if (this.subDataPr) { + this.subDataPr.unsubscribe(); + } } - private getNumbers() { - if(this.showPublications){ - this.subPub = this._searchPublicationsService.numOfSearchPublications("", this.properties).subscribe( - data => { - if(data && data != null && data > 0 ){ - this.publicationsSize = NumberUtils.roundNumber(data); - - } - }, - err => { - //console.log(err); - this.handleError("Error getting number of publications", err); - } - ); - } - if(this.showDatasets){ - this.subData = this._searchDatasetsService.numOfSearchDatasets("", this.properties).subscribe( - data => { - if(data && data != null && data > 0 ){ - this.datasetsSize = NumberUtils.roundNumber(data); - } - }, - err => { - //console.log(err); - this.handleError("Error getting number of research data", err); - } - ); - } - if(this.showProjects){ - this.subfunders = this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"],"project", this.properties).subscribe( - data => { - - - if(data[0] && data[0] > 0 ){ - this.projectsSize = NumberUtils.roundNumber(data[0]); - } - if(data[1].length > 0 && data[1][0].filterId == "funder" && data[1][0].values ){ - this.fundersSize = NumberUtils.roundNumber(data[1][0].values.length); - } - - }, - err => { - //console.log(err); - this.handleError("Error getting 'funder' field results of projects", err); + private getNumbers() { + let refineQuery = null + if(this.customFilter){ + refineQuery= "&fq="+StringUtils.URIEncode(this.customFilter.queryFieldName + " exact " + StringUtils.quote((this.customFilter.valueId ))); + } + if (this.showPublications) { + this.subPub = this._searchPublicationsService.numOfSearchPublications("", this.properties,refineQuery).subscribe( + data => { + if (data && data > 0) { + this.publicationsSize = NumberUtils.roundNumber(data); + }else{ + this.showPublications = false; + } + }, + err => { + this.handleError("Error getting number of publications", err); + } + ); + } + if (this.showDatasets) { + this.subData = this._searchDatasetsService.numOfSearchDatasets("", this.properties,refineQuery).subscribe( + data => { + if (data && data > 0) { + this.datasetsSize = NumberUtils.roundNumber(data); + }else{ + this.showDatasets = false; + } + }, + err => { + this.handleError("Error getting number of research data", err); + } + ); + } + if (this.showSoftware) { + this.subSoft = this._searchSoftwareService.numOfSearchSoftware("", this.properties,refineQuery).subscribe( + data => { + if (data && data > 0) { + this.softwareSize = NumberUtils.roundNumber(data); + }else{ + this.showSoftware = false; + } + }, + err => { + this.handleError("Error getting number of software data", err); + } + ); + } + if (this.showOrp) { + this.subOrp = this._searchOrpsService.numOfSearchOrps("", this.properties,refineQuery).subscribe( + data => { + if (data && data > 0) { + this.otherSize = NumberUtils.roundNumber(data); + }else{ + this.showOrp = false; + } + }, + err => { + this.handleError("Error getting number of software data", err); + } + ); + } + if (this.showProjects) { + this.subfunders = this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"], "project", this.properties).subscribe( + data => { + if (data[0] && data[0] > 0) { + this.projectsSize = NumberUtils.roundNumber(data[0]); + } + else{ + this.showProjects = false; + } + if (data[1].length > 0 && data[1][0].filterId == "funder" && data[1][0].values) { + this.fundersSize = NumberUtils.roundNumber(data[1][0].values.length); + } + }, + err => { + this.handleError("Error getting 'funder' field results of projects", err); }); - } - if(this.showDataProviders){ - this.subDataPr = this._searchDataprovidersService.numOfSearchDataproviders("", this.properties).subscribe( - data => { - if(data && data != null && data > 0 ){ - this.datasourcesSize = NumberUtils.roundNumber(data); - } + } + if (this.showDataProviders) { + this.subDataPr = this._searchDataprovidersService.numOfSearchDataproviders("", this.properties).subscribe( + data => { + if (data && data > 0) { + this.datasourcesSize = NumberUtils.roundNumber(data); + }else{ + this.showDataProviders = false; + } + }, + err => { + this.handleError("Error getting number of content providers", err); + } + ); + } + if (this.showOrganizations) { + this.subOrg = this._searchOrganizationsService.numOfSearchOrganizations("", this.properties, refineQuery).subscribe( + data => { + if (data && data > 0) { + this.organizationsSize = NumberUtils.roundNumber(data); + } + }, + err => { + this.handleError("Error getting number of Organizations", err); + } + ); + } + } - }, - err => { - //console.log(err); - this.handleError("Error getting number of content providers", err); - } - ); - } - } - - private handleError(message: string, error) { - console.error("Home Page: "+message, error); - } + private handleError(message: string, error) { + console.error("Home Page: " + message, error); + } } diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index c986f15..c04982e 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -24,6 +24,8 @@ import {Schema2jsonldModule} from '../openaireLibrary/sharedComponents/schema2js import { SEOServiceModule } from '../openaireLibrary/sharedComponents/SEO/SEOService.module'; import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module'; +import {SoftwareServiceModule} from "../openaireLibrary/services/softwareService.module"; +import {OrpsServiceModule} from "../openaireLibrary/services/orpsService.module"; @NgModule({ imports: [ @@ -31,7 +33,7 @@ import {ErrorMessagesModule} from '../openaireLibrary/utils/errorMessages.module RefineFieldResultsServiceModule, DataProvidersServiceModule, DatasetsServiceModule, ProjectsServiceModule, PublicationsServiceModule, - OrganizationsServiceModule, + OrganizationsServiceModule, SoftwareServiceModule, OrpsServiceModule, SearchFormModule, PiwikServiceModule, HomeRoutingModule, diff --git a/src/app/landingPages/dataset/dataset.component.ts b/src/app/landingPages/dataset/dataset.component.ts index 8bf5e06..2b879fe 100644 --- a/src/app/landingPages/dataset/dataset.component.ts +++ b/src/app/landingPages/dataset/dataset.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewChild, ElementRef} from '@angular/core'; +import {Component} from '@angular/core'; @Component({ selector: 'openaire-dataset', diff --git a/src/app/landingPages/organization/organization.component.ts b/src/app/landingPages/organization/organization.component.ts index f3df57b..467b895 100644 --- a/src/app/landingPages/organization/organization.component.ts +++ b/src/app/landingPages/organization/organization.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewChild, ElementRef} from '@angular/core'; +import {Component} from '@angular/core'; @Component({ selector: 'openaire-organization', diff --git a/src/app/landingPages/orp/orp.component.ts b/src/app/landingPages/orp/orp.component.ts index a63b6fa..8fc9bd8 100644 --- a/src/app/landingPages/orp/orp.component.ts +++ b/src/app/landingPages/orp/orp.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewChild, ElementRef} from '@angular/core'; +import {Component} from '@angular/core'; @Component({ selector: 'openaire-orp', diff --git a/src/app/landingPages/project/project.component.ts b/src/app/landingPages/project/project.component.ts index f4876ba..a3964da 100644 --- a/src/app/landingPages/project/project.component.ts +++ b/src/app/landingPages/project/project.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewChild, ElementRef} from '@angular/core'; +import {Component} from '@angular/core'; @Component({ selector: 'openaire-project', diff --git a/src/app/landingPages/publication/publication.component.ts b/src/app/landingPages/publication/publication.component.ts index 4120950..bbc9929 100644 --- a/src/app/landingPages/publication/publication.component.ts +++ b/src/app/landingPages/publication/publication.component.ts @@ -1,17 +1,17 @@ -import {Component, ViewChild, ElementRef} from '@angular/core'; +import {Component} from '@angular/core'; @Component({ - selector: 'openaire-publication', - template: ``, - }) -export class OpenairePublicationComponent{ - constructor ( ) { + selector: 'openaire-publication', + template: ` + `, +}) +export class OpenairePublicationComponent { + constructor() { } ngOnInit() { -} - + } } diff --git a/src/app/landingPages/software/software.component.ts b/src/app/landingPages/software/software.component.ts index b073066..d3673ef 100644 --- a/src/app/landingPages/software/software.component.ts +++ b/src/app/landingPages/software/software.component.ts @@ -1,4 +1,4 @@ -import {Component, ViewChild, ElementRef} from '@angular/core'; +import {Component} from '@angular/core'; @Component({ selector: 'openaire-software', diff --git a/src/app/searchPages/advanced/advancedSearchDatasets.component.ts b/src/app/searchPages/advanced/advancedSearchDatasets.component.ts index 86e57d0..5624637 100644 --- a/src/app/searchPages/advanced/advancedSearchDatasets.component.ts +++ b/src/app/searchPages/advanced/advancedSearchDatasets.component.ts @@ -1,16 +1,23 @@ -import {Component, Input, ViewChild} from '@angular/core'; +import {Component} from '@angular/core'; +import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; @Component({ - selector: 'openaire-advanced-search-datasets', - template: ` - + selector: 'openaire-advanced-search-datasets', + template: ` + - ` - }) + ` +}) -export class OpenaireAdvancedSearchDatasetsComponent { +export class OpenaireAdvancedSearchDatasetsComponent { + customFilter:SearchCustomFilter= new SearchCustomFilter(); + constructor () { + this.customFilter.set("Country", "country", "CA" , "Canada"); + } + ngOnInit() { + } } diff --git a/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts b/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts index cc9339e..95e52ee 100644 --- a/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts +++ b/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts @@ -1,16 +1,23 @@ -import {Component, Input, ViewChild} from '@angular/core'; +import {Component} from '@angular/core'; +import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; @Component({ - selector: 'openaire-advanced-search-organizations', - template: ` - + selector: 'openaire-advanced-search-organizations', + template: ` + - ` - }) + ` +}) export class OpenaireAdvancedSearchOrganizationsComponent { + customFilter:SearchCustomFilter= new SearchCustomFilter(); + constructor () { + this.customFilter.set("Country", "country", "CA" , "Canada"); + } + ngOnInit() { + } } diff --git a/src/app/searchPages/advanced/advancedSearchOrps.component.ts b/src/app/searchPages/advanced/advancedSearchOrps.component.ts index 262ab1b..c7e7d26 100644 --- a/src/app/searchPages/advanced/advancedSearchOrps.component.ts +++ b/src/app/searchPages/advanced/advancedSearchOrps.component.ts @@ -1,16 +1,23 @@ -import {Component, Input, ViewChild} from '@angular/core'; +import {Component} from '@angular/core'; +import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; @Component({ selector: 'openaire-advanced-search-orps', template: ` - + ` }) -export class OpenaireAdvancedSearchOrpsComponent { +export class OpenaireAdvancedSearchOrpsComponent { + customFilter:SearchCustomFilter= new SearchCustomFilter(); + constructor () { + this.customFilter.set("Country", "country", "CA" , "Canada"); + } + ngOnInit() { + } } diff --git a/src/app/searchPages/advanced/advancedSearchProjects.component.ts b/src/app/searchPages/advanced/advancedSearchProjects.component.ts index 50bf7e4..766150f 100644 --- a/src/app/searchPages/advanced/advancedSearchProjects.component.ts +++ b/src/app/searchPages/advanced/advancedSearchProjects.component.ts @@ -1,4 +1,5 @@ -import {Component, Input, ViewChild} from '@angular/core'; +import {Component} from '@angular/core'; + @Component({ selector: 'openaire-advanced-search-projects', template: ` diff --git a/src/app/searchPages/advanced/advancedSearchPublications.component.ts b/src/app/searchPages/advanced/advancedSearchPublications.component.ts index 26e393d..6a23f3e 100644 --- a/src/app/searchPages/advanced/advancedSearchPublications.component.ts +++ b/src/app/searchPages/advanced/advancedSearchPublications.component.ts @@ -1,13 +1,21 @@ -import {Component, Input, ViewChild} from '@angular/core'; +import {Component} from '@angular/core'; +import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; @Component({ selector: 'openaire-advanced-search-publications', template: ` - + ` }) -export class OpenaireAdvancedSearchPublicationsComponent { +export class OpenaireAdvancedSearchPublicationsComponent { + customFilter:SearchCustomFilter= new SearchCustomFilter(); + constructor () { + this.customFilter.set("Country", "country", "CA" , "Canada"); + } + ngOnInit() { + + } } diff --git a/src/app/searchPages/advanced/advancedSearchSoftware.component.ts b/src/app/searchPages/advanced/advancedSearchSoftware.component.ts index 4bc30c7..973b667 100644 --- a/src/app/searchPages/advanced/advancedSearchSoftware.component.ts +++ b/src/app/searchPages/advanced/advancedSearchSoftware.component.ts @@ -1,15 +1,22 @@ -import {Component, Input, ViewChild} from '@angular/core'; +import {Component} from '@angular/core'; +import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; @Component({ - selector: 'openaire-advanced-search-software', - template: ` - + selector: 'openaire-advanced-search-software', + template: ` + - ` - }) + ` +}) export class OpenaireAdvancedSearchSoftwareComponent { - + customFilter:SearchCustomFilter= new SearchCustomFilter(); + constructor () { + this.customFilter.set("Country", "country", "CA" , "Canada"); + } + ngOnInit() { + + } } diff --git a/src/app/searchPages/dataProviders/compatibleDataProviders-routing.module.ts b/src/app/searchPages/dataProviders/compatibleDataProviders-routing.module.ts deleted file mode 100644 index 6221c85..0000000 --- a/src/app/searchPages/dataProviders/compatibleDataProviders-routing.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import{OpenaireSearchCompatibleDataprovidersComponent} from './compatibleDataProviders.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; - - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireSearchCompatibleDataprovidersComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { - redirect: '/error', community : 'openaire' - }, canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class CompatibleDataProvidersRoutingModule { } diff --git a/src/app/searchPages/dataProviders/compatibleDataProviders.component.ts b/src/app/searchPages/dataProviders/compatibleDataProviders.component.ts deleted file mode 100644 index d74440b..0000000 --- a/src/app/searchPages/dataProviders/compatibleDataProviders.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {Component, Input, ViewChild} from '@angular/core'; -import { ActivatedRoute} from '@angular/router'; - -@Component({ - selector: 'openaire-search-content-providers', - template: ` - - - - - ` - -}) -export class OpenaireSearchCompatibleDataprovidersComponent { - -} diff --git a/src/app/searchPages/dataProviders/compatibleDataProviders.module.ts b/src/app/searchPages/dataProviders/compatibleDataProviders.module.ts deleted file mode 100644 index 8ce1cb9..0000000 --- a/src/app/searchPages/dataProviders/compatibleDataProviders.module.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import{ CompatibleDataProvidersRoutingModule} from './compatibleDataProviders-routing.module'; -import{OpenaireSearchCompatibleDataprovidersComponent} from './compatibleDataProviders.component'; - -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; - -import { CompatibleDataProvidersModule} from '../../openaireLibrary/searchPages/dataProviders/compatibleDataProviders.module'; - -@NgModule({ - imports: [ - CommonModule, FormsModule, - CompatibleDataProvidersModule, - CompatibleDataProvidersRoutingModule - - ], - declarations: [ - OpenaireSearchCompatibleDataprovidersComponent - ], - providers:[FreeGuard, IsRouteEnabled], - exports: [ - OpenaireSearchCompatibleDataprovidersComponent - ] -}) -export class LibCompatibleDataProvidersModule { } diff --git a/src/app/searchPages/dataProviders/compatibleDataProvidersTable-routing.module.ts b/src/app/searchPages/dataProviders/compatibleDataProvidersTable-routing.module.ts deleted file mode 100644 index d3d7b17..0000000 --- a/src/app/searchPages/dataProviders/compatibleDataProvidersTable-routing.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import{OpenaireSearchCompatibleDataprovidersTableComponent} from './compatibleDataProvidersTable.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; - - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireSearchCompatibleDataprovidersTableComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { - redirect: '/error', community : 'openaire' - }, canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class CompatibleDataProvidersTableRoutingModule { } diff --git a/src/app/searchPages/dataProviders/compatibleDataProvidersTable.component.ts b/src/app/searchPages/dataProviders/compatibleDataProvidersTable.component.ts deleted file mode 100644 index eb8908f..0000000 --- a/src/app/searchPages/dataProviders/compatibleDataProvidersTable.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import {Component, Input, ViewChild} from '@angular/core'; - - -@Component({ - selector: 'openaire-search-content-providers-table', - template: ` - - - - ` - -}) -export class OpenaireSearchCompatibleDataprovidersTableComponent { -} diff --git a/src/app/searchPages/dataProviders/compatibleDataProvidersTable.module.ts b/src/app/searchPages/dataProviders/compatibleDataProvidersTable.module.ts deleted file mode 100644 index 495ccac..0000000 --- a/src/app/searchPages/dataProviders/compatibleDataProvidersTable.module.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import{OpenaireSearchCompatibleDataprovidersTableComponent} from './compatibleDataProvidersTable.component'; -import {CompatibleDataProvidersTableRoutingModule} from './compatibleDataProvidersTable-routing.module'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; -import { CompatibleDataProvidersTableModule} from '../../openaireLibrary/searchPages/dataProviders/compatibleDataProvidersTable.module'; - -@NgModule({ - imports: [ - CommonModule, FormsModule, - CompatibleDataProvidersTableModule, - CompatibleDataProvidersTableRoutingModule - - ], providers:[FreeGuard, IsRouteEnabled], - declarations: [ - OpenaireSearchCompatibleDataprovidersTableComponent - ], - exports: [ - OpenaireSearchCompatibleDataprovidersTableComponent - ] -}) -export class LibCompatibleDataProvidersTableModule { } diff --git a/src/app/searchPages/dataProviders/entityRegistries-routing.module.ts b/src/app/searchPages/dataProviders/entityRegistries-routing.module.ts deleted file mode 100644 index b1baff2..0000000 --- a/src/app/searchPages/dataProviders/entityRegistries-routing.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import{OpenaireSearchEntityRegistriesComponent} from './entityRegistries.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireSearchEntityRegistriesComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { - redirect: '/error', community : 'openaire' - }, canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class EntityRegistriesRoutingModule { } diff --git a/src/app/searchPages/dataProviders/entityRegistries.component.ts b/src/app/searchPages/dataProviders/entityRegistries.component.ts deleted file mode 100644 index 82336f9..0000000 --- a/src/app/searchPages/dataProviders/entityRegistries.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {Component, Input, ViewChild} from '@angular/core'; -import { ActivatedRoute} from '@angular/router'; - -@Component({ - selector: 'openaire-search-entity-registries', - template: ` - - - - - ` - -}) -export class OpenaireSearchEntityRegistriesComponent { - -} diff --git a/src/app/searchPages/dataProviders/entityRegistries.module.ts b/src/app/searchPages/dataProviders/entityRegistries.module.ts deleted file mode 100644 index 8d81f19..0000000 --- a/src/app/searchPages/dataProviders/entityRegistries.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import{ EntityRegistriesRoutingModule} from './entityRegistries-routing.module'; -import{OpenaireSearchEntityRegistriesComponent} from './entityRegistries.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; - -import {EntityRegistriesModule } from '../../openaireLibrary/searchPages/dataProviders/entityRegistries.module'; - -@NgModule({ - imports: [ - CommonModule, FormsModule, - EntityRegistriesModule, EntityRegistriesRoutingModule - - ], - declarations: [ - OpenaireSearchEntityRegistriesComponent - ], - providers:[FreeGuard, IsRouteEnabled], - exports: [ - OpenaireSearchEntityRegistriesComponent - ] -}) -export class LibEntityRegistriesModule { } diff --git a/src/app/searchPages/dataProviders/entityRegistriesTable-routing.module.ts b/src/app/searchPages/dataProviders/entityRegistriesTable-routing.module.ts deleted file mode 100644 index d0f2250..0000000 --- a/src/app/searchPages/dataProviders/entityRegistriesTable-routing.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import{OpenaireSearchEntityRegistriesTableComponent} from './entityRegistriesTable.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; - - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireSearchEntityRegistriesTableComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { - redirect: '/error', community : 'openaire' - }, canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class EntityRegistriesTableRoutingModule { } diff --git a/src/app/searchPages/dataProviders/entityRegistriesTable.component.ts b/src/app/searchPages/dataProviders/entityRegistriesTable.component.ts deleted file mode 100644 index 108c28d..0000000 --- a/src/app/searchPages/dataProviders/entityRegistriesTable.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {Component} from '@angular/core'; - - -@Component({ - selector: 'openaire-search-entity-registries-table', - template: ` - - - - - ` - -}) -export class OpenaireSearchEntityRegistriesTableComponent { - -} diff --git a/src/app/searchPages/dataProviders/entityRegistriesTable.module.ts b/src/app/searchPages/dataProviders/entityRegistriesTable.module.ts deleted file mode 100644 index 6cb5904..0000000 --- a/src/app/searchPages/dataProviders/entityRegistriesTable.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import{OpenaireSearchEntityRegistriesTableComponent} from './entityRegistriesTable.component'; - import {EntityRegistriesTableRoutingModule} from './entityRegistriesTable-routing.module'; -import { EntityRegistriesTableModule} from '../../openaireLibrary/searchPages/dataProviders/entityRegistriesTable.module'; - -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; - -@NgModule({ - imports: [ - CommonModule, FormsModule, - EntityRegistriesTableRoutingModule, - EntityRegistriesTableModule - - ], providers:[FreeGuard, IsRouteEnabled], - declarations: [ - OpenaireSearchEntityRegistriesTableComponent - ], - exports: [ - OpenaireSearchEntityRegistriesTableComponent - ] -}) -export class LibEntityRegistriesTableModule { } diff --git a/src/app/searchPages/dataProviders/journals-routing.module.ts b/src/app/searchPages/dataProviders/journals-routing.module.ts deleted file mode 100644 index 5c43325..0000000 --- a/src/app/searchPages/dataProviders/journals-routing.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import{OpenaireSearchJournalsComponent} from './journals.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; - - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireSearchJournalsComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { - redirect: '/error', community : 'openaire' - }, canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class JournalsRoutingModule { } diff --git a/src/app/searchPages/dataProviders/journals.component.ts b/src/app/searchPages/dataProviders/journals.component.ts deleted file mode 100644 index e54fae6..0000000 --- a/src/app/searchPages/dataProviders/journals.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import {Component, Input, ViewChild} from '@angular/core'; -import { ActivatedRoute} from '@angular/router'; - -@Component({ - selector: 'openaire-search-journals', - template: ` - - - - ` - -}) -export class OpenaireSearchJournalsComponent { -} diff --git a/src/app/searchPages/dataProviders/journals.module.ts b/src/app/searchPages/dataProviders/journals.module.ts deleted file mode 100644 index db4d595..0000000 --- a/src/app/searchPages/dataProviders/journals.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import{ JournalsRoutingModule} from './journals-routing.module'; -import{OpenaireSearchJournalsComponent} from './journals.component'; -import { JournalsModule} from '../../openaireLibrary/searchPages/dataProviders/journals.module'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; -@NgModule({ - imports: [ - CommonModule, FormsModule, JournalsRoutingModule, JournalsModule - - ], - declarations: [ - OpenaireSearchJournalsComponent - ], - providers:[FreeGuard, IsRouteEnabled], - exports: [ - OpenaireSearchJournalsComponent - ] -}) -export class LibJournalsModule { } diff --git a/src/app/searchPages/dataProviders/journalsTable-routing.module.ts b/src/app/searchPages/dataProviders/journalsTable-routing.module.ts deleted file mode 100644 index 6f3aaf7..0000000 --- a/src/app/searchPages/dataProviders/journalsTable-routing.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import{OpenaireSearchJournalsTableComponent} from './journalsTable.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; - - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireSearchJournalsTableComponent, canActivate: [FreeGuard, IsRouteEnabled], data: { - redirect: '/error', community : 'openaire' - } , canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class JournalsTableRoutingModule { } diff --git a/src/app/searchPages/dataProviders/journalsTable.component.ts b/src/app/searchPages/dataProviders/journalsTable.component.ts deleted file mode 100644 index 7d4f066..0000000 --- a/src/app/searchPages/dataProviders/journalsTable.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import {Component } from '@angular/core'; - - -@Component({ - selector: 'openaire-search-journals-table', - template: ` - - - - ` - -}) -export class OpenaireSearchJournalsTableComponent { - -} diff --git a/src/app/searchPages/dataProviders/journalsTable.module.ts b/src/app/searchPages/dataProviders/journalsTable.module.ts deleted file mode 100644 index c821bd2..0000000 --- a/src/app/searchPages/dataProviders/journalsTable.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { NgModule} from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import{OpenaireSearchJournalsTableComponent} from './journalsTable.component'; - -import {JournalsTableRoutingModule} from './journalsTable-routing.module'; - -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard'; -import { JournalsTableModule} from '../../openaireLibrary/searchPages/dataProviders/journalsTable.module'; - -@NgModule({ - imports: [ - CommonModule, FormsModule, - JournalsTableModule, JournalsTableRoutingModule - - ], providers:[FreeGuard, IsRouteEnabled], - declarations: [ - OpenaireSearchJournalsTableComponent - ], - exports: [ - OpenaireSearchJournalsTableComponent - ] -}) -export class LibJournalsTableModule { } diff --git a/src/app/searchPages/find/search.component.ts b/src/app/searchPages/find/search.component.ts index bfa55ac..92c7cd4 100644 --- a/src/app/searchPages/find/search.component.ts +++ b/src/app/searchPages/find/search.component.ts @@ -1,18 +1,44 @@ import {Component, ViewChild, ElementRef} from '@angular/core'; +import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; +import {ActivatedRoute} from "@angular/router"; @Component({ selector: 'openaire-search-find', template: ` - + `, }) export class OpenaireSearchComponent{ - constructor ( ) { + customFilter:SearchCustomFilter= new SearchCustomFilter(); + constructor ( private route: ActivatedRoute ) { + } ngOnInit() { + let id = this.route.snapshot.paramMap.get('id'); + if(id && id.length > 0){ + this.customFilter.set("Country", "country", id , ""); + }else{ + this.customFilter.set("Country", "country", "CA" , "Canada"); + } + this.route.data + .subscribe((data: { envSpecific: any }) => { + + // this.piwikSiteId = PiwikHelper.siteIDs[communityId]; + // if(communityId){ + // this.connectCommunityId = communityId + // }else{ + // this.route.queryParams.subscribe(data => { + // + // if(data['communityId'] && data['communityId']!=""){ + // this.connectCommunityId = data['communityId']; + // this.piwikSiteId = PiwikHelper.siteIDs[this.connectCommunityId]; + // } + // }); + // } + }); } diff --git a/src/app/searchPages/simple/searchDatasets.component.ts b/src/app/searchPages/simple/searchDatasets.component.ts index 8a0231f..02d1783 100644 --- a/src/app/searchPages/simple/searchDatasets.component.ts +++ b/src/app/searchPages/simple/searchDatasets.component.ts @@ -1,14 +1,23 @@ -import {Component, Input, ViewChild} from '@angular/core'; - -@Component({ - selector: 'openaire-search-datasets', - template: ` +import {Component} from '@angular/core'; +import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; - +@Component({ + selector: 'openaire-search-datasets', + template: ` + + - ` + ` }) export class OpenaireSearchDatasetsComponent { + customFilter: SearchCustomFilter = new SearchCustomFilter(); + constructor() { + this.customFilter.set("Country", "country", "CA", "Canada"); + } + + ngOnInit() { + + } } diff --git a/src/app/searchPages/simple/searchOrganizations.component.ts b/src/app/searchPages/simple/searchOrganizations.component.ts index a61a20d..336e27e 100644 --- a/src/app/searchPages/simple/searchOrganizations.component.ts +++ b/src/app/searchPages/simple/searchOrganizations.component.ts @@ -1,15 +1,22 @@ import {Component, Input, ViewChild} from '@angular/core'; +import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; @Component({ selector: 'openaire-search-organizations', template: ` - + ` }) export class OpenaireSearchOrganizationsComponent { + customFilter:SearchCustomFilter= new SearchCustomFilter(); + constructor () { + this.customFilter.set("Country", "country", "CA" , "Canada"); + } + ngOnInit() { + } } diff --git a/src/app/searchPages/simple/searchOrps.component.ts b/src/app/searchPages/simple/searchOrps.component.ts index f9a2111..bfde86d 100644 --- a/src/app/searchPages/simple/searchOrps.component.ts +++ b/src/app/searchPages/simple/searchOrps.component.ts @@ -1,14 +1,21 @@ import {Component, Input, ViewChild} from '@angular/core'; +import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; @Component({ selector: 'openaire-search-orps', template: ` - + ` }) export class OpenaireSearchOrpsComponent { + customFilter:SearchCustomFilter= new SearchCustomFilter(); + constructor () { + this.customFilter.set("Country", "country", "CA" , "Canada"); + } + ngOnInit() { + } } diff --git a/src/app/searchPages/simple/searchPublications.component.ts b/src/app/searchPages/simple/searchPublications.component.ts index d5051da..dac1cdb 100644 --- a/src/app/searchPages/simple/searchPublications.component.ts +++ b/src/app/searchPages/simple/searchPublications.component.ts @@ -1,10 +1,12 @@ import {Component, Input, ViewChild} from '@angular/core'; +import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; +import {ActivatedRoute} from "@angular/router"; @Component({ selector: 'openaire-search-publications', template: ` - + ` @@ -12,5 +14,18 @@ import {Component, Input, ViewChild} from '@angular/core'; }) export class OpenaireSearchPublicationsComponent { + customFilter:SearchCustomFilter= new SearchCustomFilter(); + constructor ( private route: ActivatedRoute ) { + + } + ngOnInit() { + let id = this.route.snapshot.paramMap.get('id'); + if(id && id.length > 0){ + this.customFilter.set("Country", "country", id , ""); + }else{ + this.customFilter.set("Country", "country", "CA" , "Canada"); + } + } + } diff --git a/src/app/searchPages/simple/searchSoftware.component.ts b/src/app/searchPages/simple/searchSoftware.component.ts index da673ff..ee05c8c 100644 --- a/src/app/searchPages/simple/searchSoftware.component.ts +++ b/src/app/searchPages/simple/searchSoftware.component.ts @@ -1,14 +1,22 @@ -import {Component, Input, ViewChild} from '@angular/core'; +import {Component} from '@angular/core'; +import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; @Component({ selector: 'openaire-search-software', template: ` - + ` }) export class OpenaireSearchSoftwareComponent { + customFilter:SearchCustomFilter= new SearchCustomFilter(); + constructor () { + this.customFilter.set("Country", "country", "CA" , "Canada"); + } + ngOnInit() { + + } } diff --git a/src/assets/env-properties.json b/src/assets/env-properties.json index dbe907d..8cc4834 100644 --- a/src/assets/env-properties.json +++ b/src/assets/env-properties.json @@ -33,7 +33,7 @@ "helpdesk" : "https://www.openaire.eu/support/helpdesk", "uploadService" : "http://scoobydoo.di.uoa.gr:8000/upload", - "vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/", + "vocabulariesAPI" :"https://dev-openaire.d4science.org/provision/mvc/vocabularies/", "piwikBaseUrl" :"https://analytics.openaire.eu/piwik.php?idsite=", "piwikSiteId" : "6", @@ -93,7 +93,7 @@ "searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders", "searchLinkToAdvancedOrganizations" : "/search/advanced/organizations", "lastIndexInformationLink" : "https://www.openaire.eu/aggregation-and-content-provision-workflows", - "showLastIndexInformationLink" : true, + "showLastIndexInformationLink" : false, "widgetLink" : "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", "claimsInformationLink": "https://www.openaire.eu/linking-beta" }