diff --git a/angular.json b/angular.json index dd429b3..9fb4c4d 100644 --- a/angular.json +++ b/angular.json @@ -31,6 +31,9 @@ "node_modules/datatables.net-dt/css/jquery.dataTables.css" ], "scripts": [ + "src/assets/common-assets/common/jquery.js", + "src/assets/common-assets/common/uikit.min.js", + "src/assets/common-assets/common/uikit-icons.min.js", "node_modules/jquery/dist/jquery.js", "node_modules/datatables.net/js/jquery.dataTables.js" ] @@ -80,6 +83,9 @@ "polyfills": "src/polyfills.ts", "tsConfig": "src/tsconfig.spec.json", "scripts": [ + "src/assets/common-assets/common/jquery.js", + "src/assets/common-assets/common/uikit.min.js", + "src/assets/common-assets/common/uikit-icons.min.js", "node_modules/jquery/dist/jquery.js", "node_modules/datatables.net/js/jquery.dataTables.js" ], diff --git a/package.json b/package.json index eb07739..117e74b 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "datatables.net": "^1.10.19", "datatables.net-dt": "^1.10.19", "jquery": "^3.4.1", + "ng-recaptcha": "^3.0.5", "ngx-json-ld": "0.1.6", "prom-client": "^11.3.0", "ts-md5": "^1.2.0", diff --git a/src/app/aggregator/aggregator-routing.module.ts b/src/app/aggregator/aggregator-routing.module.ts index 887c47b..24e4551 100644 --- a/src/app/aggregator/aggregator-routing.module.ts +++ b/src/app/aggregator/aggregator-routing.module.ts @@ -1,131 +1,81 @@ import {NgModule} from '@angular/core'; import {RouterModule, Routes} from '@angular/router'; -import {EnvironmentSpecificResolver} from "../openaireLibrary/utils/properties/environmentSpecificResolver"; -import {EnvironmentSpecificService} from "../openaireLibrary/utils/properties/environment-specific.service"; const routes: Routes = [ - {path: '', loadChildren: '../home/home.module#HomeModule', resolve: {envSpecific: EnvironmentSpecificResolver}}, + {path: '', loadChildren: '../home/home.module#HomeModule'}, + { path: 'search/result', + loadChildren: '../landingPages/result/libResult.module#LibResultModule' + }, { path: 'search/publication', - loadChildren: '../landingPages/publication/libPublication.module#LibPublicationModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../landingPages/publication/libPublication.module#LibPublicationModule' }, { path: 'search/dataset', - loadChildren: '../landingPages/dataset/libDataset.module#LibDatasetModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../landingPages/dataset/libDataset.module#LibDatasetModule' }, { path: 'search/software', - loadChildren: '../landingPages/software/libSoftware.module#LibSoftwareModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../landingPages/software/libSoftware.module#LibSoftwareModule' }, { path: 'search/other', - loadChildren: '../landingPages/orp/libOrp.module#LibOrpModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../landingPages/orp/libOrp.module#LibOrpModule' }, { path: 'search/project', - loadChildren: '../landingPages/project/libProject.module#LibProjectModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../landingPages/project/libProject.module#LibProjectModule' }, { path: 'search/dataprovider', - loadChildren: '../landingPages/dataProvider/libDataProvider.module#LibDataProviderModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../landingPages/dataProvider/libDataProvider.module#LibDataProviderModule' }, { path: 'search/organization', - loadChildren: '../landingPages/organization/libOrganization.module#LibOrganizationModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../landingPages/organization/libOrganization.module#LibOrganizationModule' }, { path: 'search/find', - loadChildren: '../searchPages/find/libSearch.module#LibMainSearchModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../searchPages/find/libSearch.module#LibMainSearchModule' }, - { - 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} - }, - { - path: 'search/find/other', - loadChildren: '../searchPages/simple/searchOrps.module#LibSearchOrpsModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + { path: 'search/find/research-outcomes', loadChildren: '../searchPages/simple/searchResearchResults.module#OpenaireSearchResearchResultsModule' }, { path: 'search/find/projects', - loadChildren: '../searchPages/simple/searchProjects.module#LibSearchProjectsModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../searchPages/simple/searchProjects.module#LibSearchProjectsModule' }, { path: 'search/find/dataproviders', - loadChildren: '../searchPages/simple/searchDataProviders.module#LibSearchDataProvidersModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../searchPages/simple/searchDataProviders.module#LibSearchDataProvidersModule' }, { path: 'search/find/organizations', - loadChildren: '../searchPages/simple/searchOrganizations.module#LibSearchOrganizationsModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../searchPages/simple/searchOrganizations.module#LibSearchOrganizationsModule' }, - { - path: 'search/advanced/publications', - loadChildren: '../searchPages/advanced/advancedSearchPublications.module#LibAdvancedSearchPublicationsModule', - resolve: {envSpecific: EnvironmentSpecificResolver} - }, - { - path: 'search/advanced/datasets', - loadChildren: '../searchPages/advanced/advancedSearchDatasets.module#LibAdvancedSearchDatasetsModule', - resolve: {envSpecific: EnvironmentSpecificResolver} - }, - { - path: 'search/advanced/software', - loadChildren: '../searchPages/advanced/advancedSearchSoftware.module#LibAdvancedSearchSoftwareModule', - resolve: {envSpecific: EnvironmentSpecificResolver} - }, - { - path: 'search/advanced/other', - loadChildren: '../searchPages/advanced/advancedSearchOrps.module#LibAdvancedSearchOrpsModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + { path: 'search/advanced/research-outcomes', + loadChildren: '../searchPages/advanced/searchResearchResults.module#OpenaireAdvancedSearchResearchResultsModule' }, { path: 'search/advanced/organizations', - loadChildren: '../searchPages/advanced/advancedSearchOrganizations.module#LibAdvancedSearchOrganizationsModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../searchPages/advanced/advancedSearchOrganizations.module#LibAdvancedSearchOrganizationsModule' }, { path: 'search/advanced/dataproviders', - loadChildren: '../searchPages/advanced/advancedSearchDataProviders.module#LibAdvancedSearchDataProvidersModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../searchPages/advanced/advancedSearchDataProviders.module#LibAdvancedSearchDataProvidersModule' }, { path: 'search/advanced/projects', - loadChildren: '../searchPages/advanced/advancedSearchProjects.module#LibAdvancedSearchProjectsModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../searchPages/advanced/advancedSearchProjects.module#LibAdvancedSearchProjectsModule' }, { path: 'project-report', - loadChildren: '../landingPages/htmlProjectReport/libHtmlProjectReport.module#LibHtmlProjectReportModule', - resolve: {envSpecific: EnvironmentSpecificResolver} + loadChildren: '../landingPages/htmlProjectReport/libHtmlProjectReport.module#LibHtmlProjectReportModule' }, ]; @NgModule({ imports: [RouterModule.forChild(routes)], exports: [RouterModule], - providers: [EnvironmentSpecificResolver, EnvironmentSpecificService] }) export class AggregatorRoutingModule { } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 5c1b087..c3d3c69 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -8,10 +8,10 @@ import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/en import { OpenaireErrorPageComponent } from './error/errorPage.component'; const routes: Routes = [ - { path: '', loadChildren: './aggregator/aggregator.module#AggregatorModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, - { path: ':id', loadChildren: './aggregator/aggregator.module#AggregatorModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, - { path: 'error', component: OpenaireErrorPageComponent, resolve: { envSpecific: EnvironmentSpecificResolver }}, - { path: '**',pathMatch: 'full',component: OpenaireErrorPageComponent, resolve: { envSpecific: EnvironmentSpecificResolver }} + { path: '', loadChildren: './aggregator/aggregator.module#AggregatorModule'}, + { path: ':id', loadChildren: './aggregator/aggregator.module#AggregatorModule'}, + { path: 'error', component: OpenaireErrorPageComponent}, + { path: '**',pathMatch: 'full',component: OpenaireErrorPageComponent} ]; @NgModule({ diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ea9992c..6b58744 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -8,6 +8,8 @@ import {HelperFunctions} from "./openaireLibrary/utils/HelperFunctions.class"; import {FilterInfo, PortalAggregators} from "./utils/aggregators"; import {UserManagementService} from "./openaireLibrary/services/user-management.service"; import {User} from "./openaireLibrary/login/utils/helper.class"; +import {Header} from "./openaireLibrary/sharedComponents/navigationBar.component"; +import {portalProperties} from "../environments/environment-aggregator"; @Component({ //changeDetection: ChangeDetectionStrategy.Default, @@ -17,9 +19,9 @@ import {User} from "./openaireLibrary/login/utils/helper.class"; `], template: ` - + [userMenu]="true" [header]="header">
@@ -46,10 +48,7 @@ export class AppComponent { {rootItem: new MenuItem("home", "Home", "", "/", false, [], null, {}), items: []}, { rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], null, {}), - items: [new MenuItem("", "Publications", "", "/search/find/publications", false, [], [], {}), - new MenuItem("", "Research Data", "", "/search/find/datasets", false, [], [], {}), - new MenuItem("", "Software", "", "/search/find/software", false, [], [], {}), - new MenuItem("", "Other Research Products", "", "/search/find/other", false, [], [], {}), + items: [new MenuItem("", "Research outcomes", "", "/search/find/research-outcomes", false, [], [], {}), new MenuItem("", "Projects", "", "/search/find/projects/", false, [], [], {}), new MenuItem("", "Content Providers", "", "/search/find/dataproviders", false, [], [], {}), new MenuItem("", "Organizations", "", "/search/find/organizations/", false, [], [], {}) @@ -63,7 +62,8 @@ export class AppComponent { properties: EnvProperties; user: User; loginCheck: boolean = false; - + footer=portalProperties.sectionFooter; + header:Header; constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, private router: Router, private userManagementService: UserManagementService) { @@ -81,7 +81,16 @@ export class AppComponent { this.id = params['id']; let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(this.id); if (agg) { - this.community = {id: agg.menuId, name: agg.title, logoUrl: agg.logoUrl}; + this.header = { + route: '/', + url: null, + title: agg.title, + logoUrl: agg.logoUrl, + logoSmallUrl: agg.logoUrl, + position: 'left', + badge: true + }; + } if (this.id) { this.buildMenu(); @@ -101,16 +110,29 @@ export class AppComponent { {rootItem: new MenuItem("home", "Home", "", "/" + this.id, false, [], null, {}), items: []}, { rootItem: new MenuItem("search", "Search", "", "/" + this.id + "/search/find", false, [], null, {}), - items: [new MenuItem("", "Publications", "", "/" + this.id + "/search/find/publications", false, [], [], {}), - new MenuItem("", "Research Data", "", "/" + this.id + "/search/find/datasets", false, [], [], {}), - new MenuItem("", "Software", "", "/" + this.id + "/search/find/software", false, [], [], {}), - new MenuItem("", "Other Research Products", "", "/" + this.id + "/search/find/other", false, [], [], {}), - new MenuItem("", "Projects", "", "/" + this.id + "/search/find/projects/", false, [], [], {}), - new MenuItem("", "Content Providers", "", "/" + this.id + "/search/find/dataproviders", false, [], [], {}), - new MenuItem("", "Organizations", "", "/" + this.id + "/search/find/organizations/", false, [], [], {}) - ] + items: [] } ]; + if((portalProperties.entities.publication.isEnabled && portalProperties.entities.publication.simpleSearchPage) || + (portalProperties.entities.dataset.isEnabled && portalProperties.entities.dataset.simpleSearchPage) || + (portalProperties.entities.software.isEnabled && portalProperties.entities.software.simpleSearchPage) || + portalProperties.entities.other.isEnabled && portalProperties.entities.other.simpleSearchPage){ + + this.menuItems[1].items.push(new MenuItem("", "Research outcomes", "", "/" + this.id + "/search/find/research-outcomes", false, [], [], {})) + } + + if(portalProperties.entities.project.isEnabled && portalProperties.entities.project.simpleSearchPage){ + this.menuItems[1].items.push(new MenuItem("", "Projects", "", "/" + this.id + "/search/find/projects/", false, [], [], {})) + } + if(portalProperties.entities.datasource.isEnabled && portalProperties.entities.datasource.simpleSearchPage){ + this.menuItems[1].items.push(new MenuItem("", "Content Providers", "", "/" + this.id + "/search/find/dataproviders", false, [], [], {})) + } + if(portalProperties.entities.organization.isEnabled && portalProperties.entities.organization.simpleSearchPage){ + this.menuItems[1].items.push(new MenuItem("", "Organizations", "", "/" + this.id + "/search/find/organizations/", false, [], [], {})) + } + + + } ngOnInit() { @@ -126,7 +148,7 @@ export class AppComponent { .then(es => { this.propertiesService.setEnvProperties(es); this.properties = this.propertiesService.envSpecific; - this.userManagementService.getUserInfo(this.properties.userInfoUrl).subscribe(user => { + this.userManagementService.getUserInfo().subscribe(user => { this.user = user; this.loginCheck = true; }); diff --git a/src/app/error/errorPage.component.ts b/src/app/error/errorPage.component.ts index e96d3dc..52073bc 100644 --- a/src/app/error/errorPage.component.ts +++ b/src/app/error/errorPage.component.ts @@ -1,6 +1,5 @@ -import { Component, Input } from '@angular/core'; -import { Location } from '@angular/common'; - +import { Component } from '@angular/core'; + @Component({ selector: 'openaire-error', template: ` diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts index e372e73..89a7faa 100644 --- a/src/app/home/home-routing.module.ts +++ b/src/app/home/home-routing.module.ts @@ -2,12 +2,11 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import{HomeComponent} from './home.component'; -import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: HomeComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] } + { path: '', component: HomeComponent,canDeactivate: [PreviousRouteRecorder] } ]) ] diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index 5f349fb..f055a32 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -1,366 +1,354 @@ - -
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
- -
- Search for more than - - - {{publicationsSize.number|number}}{{publicationsSize.size}} - {{((showDatasets || showSoftware || showOrp) ? " publications, " - : " publications ")}} - - - {{datasetsSize.number|number}}{{datasetsSize.size}} - {{((showSoftware || showOrp) ? " research data, " : " research data ")}} - - - {{otherSize.number|number}}{{otherSize.size}} - {{((showSoftware) ? " other research products, " : " other research products ")}} - - - {{softwareSize.number|number}}{{softwareSize.size}} - software - - -
- - from - {{organizationsSize.number|number}}{{organizationsSize.size}} - organizations - - - {{((showOrganizations && showOrganizations) ? " and " : " from ")}} - {{datasourcesSize.number|number}}{{datasourcesSize.size}} - content providers - - - {{((showDataProviders && datasourcesSize) ? " and " : " from ")}} - {{fundersSize.number|number}}{{fundersSize.size}} - funders - - - linked together for an integrated discovery of scientific output +
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + +
+
+ + +
+
+
-
- - +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+
+
+
+
+
Extracted Metadata Combined.
+ +

The OpenAIRE Research Graph is one of the largest open scholarly record collections worldwide, key in fostering Open Science and establishing its practices in the daily research activities. Conceived as a public and transparent good, populated out of data sources trusted by scientists, the Graph aims at bringing discovery, monitoring, and assessment of science back in the hands of the scientific community.
+
+ Imagine a vast collection of research products all linked together, contextualised and openly available. For the past ten years OpenAIRE has been working to gather this valuable record. OpenAIRE is pleased to announce the release of its Research Graph, a massive collection of metadata and links between scientific products such as articles, datasets, software, and other research products, entities like organisations, funders, funding streams, projects, communities, and data sources.
+
+ As of today, the OpenAIRE Research Graph aggregates around 450Mi metadata records with links collecting from 10,000 data sources trusted by scientists! After cleaning, deduplication, and fine-grained classification processes, they narrow down to ~100Mi publications, ~8Mi datasets, ~200K software research products, 8Mi other products linked together with semantic relations.
+
+ More than 10Mi full-texts of Open Access publications are mined by algorithms to enrich metadata records with additional properties and links among research products, funders, projects, communities, and organizations. Thanks to the mining algorithm, the graph is completed with 480Mi semantic relations.

+ +
+
+ Read more +
+
+ Read less +
+
+
+
+ +
+
+ +
+
+
+
+
+ + + + + +
+
+
+
+
+
+
+
Share
+ +
Deposit your research
+ +
+
Deposit in a repository of your choice.
+ Select an OpenAIRE compatible
+ repository (2.0 +) so that your research is linked to your funding information. Use Zenodo, a catch-all repository hosted by CERN to deposit all your research results (publications, data, software, etc.)
+
+ Deposit
+
+ +
+
+
Share
+ +
Link your work
+ +
+
Connect all your research.
+ If you can't find your research results in OpenAIRE, don't worry! Use our Link Out service , that reaches out to many
+ external sources via APIs, to connect
+ your research results and claim them to your project.
+
+ Link
+
+
+
- - - - - - - - - +
+
+ + + + + + + + diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index d5204e3..3dbf610 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -1,208 +1,230 @@ import {Component} from '@angular/core'; +import {Subscription} from 'rxjs'; import {ActivatedRoute, Router} from '@angular/router'; import {Location} from '@angular/common'; import "rxjs/add/observable/zip"; -import {Meta, Title} from '@angular/platform-browser'; +import {Title, Meta} from '@angular/platform-browser'; import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service'; -import {FetchDataproviders} from '../openaireLibrary/utils/fetchEntitiesClasses/fetchDataproviders.class'; -import {SearchDataprovidersService} from '../openaireLibrary/services/searchDataproviders.service'; -import {SearchProjectsService} from '../openaireLibrary/services/searchProjects.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 { SearchDataprovidersService} from '../openaireLibrary/services/searchDataproviders.service'; +import { SearchProjectsService} from '../openaireLibrary/services/searchProjects.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 {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; -import {StringUtils} from "../openaireLibrary/utils/string-utils.class"; +import { SEOService } from '../openaireLibrary/sharedComponents/SEO/SEO.service'; import {SearchResearchResultsService} from "../openaireLibrary/services/searchResearchResults.service"; - +import {HelperService} from "../openaireLibrary/utils/helper/helper.service"; +import {Filter} from "../openaireLibrary/searchPages/searchUtils/searchHelperClasses.class"; import {FilterInfo, PortalAggregators} from "../utils/aggregators"; +import {SearchCustomFilter} from "../openaireLibrary/searchPages/searchUtils/searchUtils.class"; +import {properties} from "../../environments/environment"; +import {portalProperties} from "../../environments/environment-aggregator"; +import {StringUtils} from "../openaireLibrary/utils/string-utils.class"; @Component({ selector: 'home', templateUrl: 'home.component.html', }) export class HomeComponent { - public piwiksub: any; - public subfunders: any; - public pageTitle = "OpenAIRE" - public keyword: string = ""; - public searchFields: SearchFields = new SearchFields(); - public errorCodes: ErrorCodes = new ErrorCodes(); - public routerHelper: RouterHelper = new RouterHelper(); + // public pageTitle = "OpenAIRE - Explore |" ; + public keyword:string = ""; - public publicationsSize: any = null; - public datasetsSize: any = null; + public searchFields:SearchFields = new SearchFields(); + public errorCodes:ErrorCodes = new ErrorCodes(); + public routerHelper:RouterHelper = new RouterHelper(); + + public publicationsSize:any = null; + public datasetsSize:any = null; + public datasetsLinkedSize:any = null; + public softwareLinkedSize: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; + public fundersSize:any = null; + public projectsSize:any = null; + public datasourcesSize:any = null; - public fetchDataproviders: FetchDataproviders; - - showPublications: boolean = false; - showDatasets: boolean = false; - showSoftware: boolean = false; - showOrp: boolean = false; - showOrganizations: boolean = false; - showProjects: boolean = false; - showDataProviders: boolean = false; + showPublications: boolean = portalProperties.entities.publication.isEnabled; + showDatasets: boolean = portalProperties.entities.dataset.isEnabled; + showSoftware: boolean = portalProperties.entities.software.isEnabled; + showOrp: boolean = portalProperties.entities.other.isEnabled; + showOrganizations: boolean = portalProperties.entities.organization.isEnabled; + showProjects: boolean = portalProperties.entities.project.isEnabled; + showDataProviders: boolean = portalProperties.entities.datasource.isEnabled; properties: EnvProperties; - public subPub; - public subSoft; - public subOrp; - public subData; - public subProjects; - public subOrg; - public subDataPr; - customFilter:SearchCustomFilter= null; + public readMore: boolean = false; - constructor( + subs: Subscription[] = []; + + resultsQuickFilter: { filter: Filter, selected: boolean, filterId: string, value: string } = { + filter: null, + selected: true, + filterId: "resultbestaccessright", + value: "Open Access" + }; + selectedEntity = "all"; + selectedEntitySimpleUrl; + selectedEntityAdvancedUrl; + resultTypes:Filter = {values:[],filterId:"type", countSelectedValues: 0, filterType: 'checkbox', originalFilterId: "", valueIsExact: true, title: "Result Types",filterOperator:"or"}; + public pageContents = null; + customFilter:SearchCustomFilter= null; + aggregatorId; + aggregator:FilterInfo; + constructor ( private route: ActivatedRoute, private _router: Router, private _searchResearchResultsService: SearchResearchResultsService, private _searchDataprovidersService: SearchDataprovidersService, private _searchProjectsService: SearchProjectsService, 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 _refineFieldResultsService:RefineFieldResultsService, + private location: Location, private _piwikService:PiwikService, + private config: ConfigurationService, private _meta: Meta, private _title: Title, private seoService: SEOService, + private helper: HelperService ) { - let id = this.route.snapshot.paramMap.get('id'); - console.log(id); - let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); - this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); - let description = "openAIRE, open access, publications, research results, European commission, search"; - - let title = "OpenAIRE | "+agg.title; + this.aggregatorId = this.route.snapshot.paramMap.get('id'); + this.aggregator = PortalAggregators.getFilterInfoByMenuId(this.aggregatorId); + this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(this.aggregator); + let description = "OpenAIRE Explore: Over 100M of research deduplicated, 170K research software, 11M research data. One of the largest open scholarly records collection worldwide."; + let title = "OpenAIRE - Explore| " +this.aggregator.title; 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._meta.updateTag({content:description},"name='description'"); + this._meta.updateTag({content:description},"property='og:description'"); + this._meta.updateTag({content:title},"property='og:title'"); - // this.customFilter.setValues("Country", "country", "CA" , "Canada"); + + } + + private getPageContents() { + this.subs.push(this.helper.getPageHelpContents(this.properties, 'openaire', this._router.url).subscribe(contents => { + this.pageContents = contents; + })); + } + + public getKeys(obj: {}) { + return Object.keys(obj); + } + + createRange(number){ + var items: number[] = []; + for(var i = 1; i <= number; i++){ + items.push(i); + } + return items; + } + + public ceil(num: number) { + return Math.ceil(num); } public ngOnInit() { + this.properties = properties; + this.seoService.createLinkForCanonicalURL(this.properties.domain + this.properties.baseLink+this._router.url, false); + this.getPageContents(); - this.route.data - .subscribe((data: { envSpecific: EnvProperties }) => { - this.properties = data.envSpecific; - 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 = true; - this.showDataProviders = true; - this.getNumbers(); + if(this.properties!=null){ + var url = this.properties.domain + this.properties.baseLink+this._router.url; + this._meta.updateTag({content:url},"property='og:url'"); + if(this.properties.enablePiwikTrack && (typeof document !== 'undefined')){ + this.subs.push(this._piwikService.trackView(this.properties, "OpenAIRE").subscribe()); + } - /* this.config.getCommunityInformation(this.properties.adminToolsAPIURL, this.properties.adminToolsCommunity).subscribe(data => { - let showEntity = {}; - for (let i = 0; i < data['entities'].length; i++) { + //this.config.getCommunityInformation(this.properties, this.properties.adminToolsCommunity ).subscribe(data => { + /* this.subs.push(this.config.communityInformationState.subscribe(data => { + if(data) { + var showEntity = {}; + for (var 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.showSoftware = showEntity["software"]; + this.showOrp = showEntity["orp"]; + this.showProjects = showEntity["project"]; + this.showDataProviders = showEntity["datasource"]; + this.showOrganizations = showEntity["organization"];*/ + if(this.showPublications){ + this.resultTypes.values.push({name: "Publications" , id:"publications",selected:true, number:0}); + } + if(this.showDatasets){ + this.resultTypes.values.push({name: "Research data" , id:"datasets",selected:true, number:0}); + } + if(this.showSoftware){ + this.resultTypes.values.push({name: "Software" , id:"software",selected:true, number:0}); + } + if(this.showOrp){ + this.resultTypes.values.push({name: "Other research products" , id:"other",selected:true, number:0}); + } + this.getNumbers(); + /* } + }, + error => { + this.handleError("Error getting community information", error); + } + ));*/ + } } - public ngOnDestroy() { - if (this.piwiksub) { - this.piwiksub.unsubscribe(); + for (let sub of this.subs) { + sub.unsubscribe(); } - if (this.subfunders) { - this.subfunders.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() { - let refineQuery = null; + 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._searchResearchResultsService.numOfSearchResults("publication","", this.properties,refineQuery).subscribe( + if(this.showPublications){ + this.subs.push(this._searchResearchResultsService.numOfSearchResults("publication", "", this.properties, refineQuery).subscribe( data => { - if (data && data > 0) { + if(data && data != null && data > 0 ){ this.publicationsSize = NumberUtils.roundNumber(data); - }else{ - this.showPublications = false; + } }, err => { + //console.log(err); this.handleError("Error getting number of publications", err); } - ); + )); } - if (this.showDatasets) { - this.subData = this._searchResearchResultsService.numOfSearchResults("dataset","", this.properties,refineQuery).subscribe( + if(this.showDatasets){ + this.subs.push(this._searchResearchResultsService.numOfSearchResults("dataset", "", this.properties, refineQuery).subscribe( data => { - if (data && data > 0) { + if(data && data != null && data > 0 ){ this.datasetsSize = NumberUtils.roundNumber(data); - }else{ - this.showDatasets = false; } }, err => { + //console.log(err); this.handleError("Error getting number of research data", err); } - ); + )); + /*this.subs.push(this._searchResearchResultsService.numOfSearchResultsLinkedToPub("dataset", this.properties, refineQuery).subscribe( + data => { + if(data && data != null && data > 0 ){ + this.datasetsLinkedSize = NumberUtils.roundNumber(data); + } + }, + err => { + //console.log(err); + this.handleError("Error getting number of linkedresearch data", err); + } + ));*/ + } if (this.showSoftware) { - this.subSoft = this._searchResearchResultsService.numOfSearchResults("software","", this.properties,refineQuery).subscribe( + this.subs.push(this._searchResearchResultsService.numOfSearchResults("software", "", this.properties, refineQuery).subscribe( data => { if (data && data > 0) { this.softwareSize = NumberUtils.roundNumber(data); @@ -213,10 +235,21 @@ export class HomeComponent { err => { this.handleError("Error getting number of software data", err); } - ); + )); + /* this.subs.push(this._searchResearchResultsService.numOfSearchResultsLinkedToPub("software", this.properties, refineQuery).subscribe( + data => { + if(data && data != null && data > 0 ){ + this.softwareLinkedSize = NumberUtils.roundNumber(data); + } + }, + err => { + //console.log(err); + this.handleError("Error getting number of linked software", err); + } + ));*/ } if (this.showOrp) { - this.subOrp = this._searchResearchResultsService.numOfSearchResults("other","", this.properties,refineQuery).subscribe( + this.subs.push(this._searchResearchResultsService.numOfSearchResults("other", "", this.properties, refineQuery).subscribe( data => { if (data && data > 0) { this.otherSize = NumberUtils.roundNumber(data); @@ -227,54 +260,79 @@ export class HomeComponent { err => { this.handleError("Error getting number of software data", err); } - ); + )); } - if (this.showProjects) { - this.subfunders = this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"], "project", this.properties, refineQuery).subscribe( + if(this.showProjects){ + this.subs.push(this._refineFieldResultsService.getRefineFieldsResultsByEntityName(["funder"],"project", this.properties, refineQuery).subscribe( data => { - if (data[0] && data[0] > 0) { + + + 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) { + 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); - }); + })); } - if (this.showDataProviders) { - this.subDataPr = this._searchDataprovidersService.numOfSearchDataproviders("", this.properties, refineQuery).subscribe( + if(this.showDataProviders){ + this.subs.push(this._searchDataprovidersService.numOfSearchDataproviders("", this.properties, refineQuery).subscribe( data => { - if (data && data > 0) { + if(data && data != null && data > 0 ){ this.datasourcesSize = NumberUtils.roundNumber(data); - }else{ - this.showDataProviders = false; } + }, err => { + //console.log(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); - } - ); + )); } } private handleError(message: string, error) { - console.error("Home Page: " + message, error); + console.error("Home Page: "+message, error); + } + entityChanged($event){ + this.selectedEntity = $event.entity; + this.selectedEntitySimpleUrl = $event.simpleUrl; + this.selectedEntityAdvancedUrl = $event.advancedUrl; + } + goTo(simple:boolean){ + let url = (simple)?this.selectedEntitySimpleUrl:this.selectedEntityAdvancedUrl; + let parameterNames = []; + let parameterValues = []; + if (this.selectedEntity == "result") { + if (this.resultTypes) { + let values = []; + for(let value of this.resultTypes.values){ + if (value.selected) { + values.push(value.id); + } + } + if (values.length > 0 && values.length !=4) { + parameterNames.push("type"); + parameterValues.push(values.join(",")); + } + if (this.resultsQuickFilter) { + parameterNames.push("qf"); + parameterValues.push("" + this.resultsQuickFilter.selected); + } + } + } + if(this.keyword.length > 0) { + parameterNames.push("fv0"); + parameterValues.push(this.keyword); + parameterNames.push("f0"); + parameterValues.push("q"); + } + console.log( this.routerHelper.createQueryParams(parameterNames, parameterValues)) + this._router.navigate([url], {queryParams: this.routerHelper.createQueryParams(parameterNames, parameterValues)}); } } diff --git a/src/app/home/home.module.ts b/src/app/home/home.module.ts index 5b3084d..90b37b1 100644 --- a/src/app/home/home.module.ts +++ b/src/app/home/home.module.ts @@ -3,52 +3,54 @@ import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; -import{HomeRoutingModule} from './home-routing.module'; -import{HomeComponent} from './home.component'; +import {HomeRoutingModule} from './home-routing.module'; +import {HomeComponent} from './home.component'; -import { DataProvidersServiceModule} from '../openaireLibrary/services/dataProvidersService.module'; +import { DataProvidersServiceModule} from '../openaireLibrary/services/dataProvidersService.module'; import { SearchResearchResultsServiceModule} from '../openaireLibrary/services/searchResearchResultsService.module'; -import { ProjectsServiceModule} from '../openaireLibrary/services/projectsService.module'; -// import { PublicationsServiceModule} from '../openaireLibrary/services/publicationsService.module'; -import { OrganizationsServiceModule} from '../openaireLibrary/services/organizationsService.module'; +import { ProjectsServiceModule} from '../openaireLibrary/services/projectsService.module'; +import { OrganizationsServiceModule} from '../openaireLibrary/services/organizationsService.module'; import { SearchFormModule} from '../openaireLibrary/searchPages/searchUtils/searchForm.module'; -import {PiwikServiceModule} from '../openaireLibrary/utils/piwik/piwikService.module'; +import { PiwikServiceModule} from '../openaireLibrary/utils/piwik/piwikService.module'; import {HelperModule} from '../openaireLibrary/utils/helper/helper.module'; import {RefineFieldResultsServiceModule} from '../openaireLibrary/services/refineFieldResultsService.module'; -import {ConfigurationService} from '../openaireLibrary/utils/configuration/configuration.service'; -import {FreeGuard} from '../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {Schema2jsonldModule} from '../openaireLibrary/sharedComponents/schema2jsonld/schema2jsonld.module'; 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"; -// import {AggregatorNavBarComponent} from "../utils/aggregatorNavBar.component"; +import {EntitiesSelectionModule} from "../openaireLibrary/searchPages/searchUtils/entitiesSelection.module"; +import {QuickSelectionsModule} from "../openaireLibrary/searchPages/searchUtils/quick-selections.module"; +import {IconsModule} from "../openaireLibrary/utils/icons/icons.module"; +import {IconsService} from "../openaireLibrary/utils/icons/icons.service"; +import {arrow_right} from "../openaireLibrary/utils/icons/icons"; - @NgModule({ +@NgModule({ imports: [ CommonModule, FormsModule, RouterModule, - RefineFieldResultsServiceModule, - DataProvidersServiceModule, SearchResearchResultsServiceModule, ProjectsServiceModule, - OrganizationsServiceModule, - SearchFormModule, - PiwikServiceModule, - HomeRoutingModule, - HelperModule, - ErrorMessagesModule, - Schema2jsonldModule, SEOServiceModule, + RefineFieldResultsServiceModule, + DataProvidersServiceModule, SearchResearchResultsServiceModule, + ProjectsServiceModule, OrganizationsServiceModule, + SearchFormModule, + PiwikServiceModule, + HomeRoutingModule, + HelperModule, + ErrorMessagesModule, + SEOServiceModule, EntitiesSelectionModule, QuickSelectionsModule, IconsModule ], declarations: [ - HomeComponent//, AggregatorNavBarComponent - ], + HomeComponent + ], providers:[ - FreeGuard, PreviousRouteRecorder, ConfigurationService - ], + PreviousRouteRecorder + ], exports: [ - HomeComponent//, AggregatorNavBarComponent - ] + HomeComponent + ] }) -export class HomeModule { } +export class HomeModule { + constructor(private iconsService: IconsService) { + this.iconsService.registerIcons([arrow_right]); + } +} diff --git a/src/app/landingPages/result/libResult.module.ts b/src/app/landingPages/result/libResult.module.ts new file mode 100644 index 0000000..39be478 --- /dev/null +++ b/src/app/landingPages/result/libResult.module.ts @@ -0,0 +1,13 @@ +import {NgModule} from '@angular/core'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {OpenaireResultComponent} from './result.component'; +import {ResultRoutingModule} from './result-routing.module'; +import {ResultLandingModule} from "../../openaireLibrary/landingPages/result/resultLanding.module"; + +@NgModule({ + imports: [ResultRoutingModule, ResultLandingModule], + declarations:[OpenaireResultComponent], + providers:[PreviousRouteRecorder], + exports:[OpenaireResultComponent] +}) +export class LibResultModule { } diff --git a/src/app/landingPages/result/result-routing.module.ts b/src/app/landingPages/result/result-routing.module.ts new file mode 100644 index 0000000..9b72a94 --- /dev/null +++ b/src/app/landingPages/result/result-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; + +import {OpenaireResultComponent } from './result.component'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; + + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireResultComponent, data: { + redirect: '/error', community : 'openaire' + },canDeactivate: [PreviousRouteRecorder] } + ]) +] +}) +export class ResultRoutingModule { } diff --git a/src/app/landingPages/result/result.component.ts b/src/app/landingPages/result/result.component.ts new file mode 100644 index 0000000..860e401 --- /dev/null +++ b/src/app/landingPages/result/result.component.ts @@ -0,0 +1,7 @@ +import {Component} from '@angular/core'; + +@Component({ + selector: 'openaire-publication', + template: ``, + }) +export class OpenaireResultComponent{} diff --git a/src/app/searchPages/advanced/advancedSearchDataProviders-routing.module.ts b/src/app/searchPages/advanced/advancedSearchDataProviders-routing.module.ts index 533fe9b..d842ed5 100644 --- a/src/app/searchPages/advanced/advancedSearchDataProviders-routing.module.ts +++ b/src/app/searchPages/advanced/advancedSearchDataProviders-routing.module.ts @@ -1,14 +1,13 @@ import {NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; import {OpenaireAdvancedSearchDataProvidersComponent} from './advancedSearchDataProviders.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireAdvancedSearchDataProvidersComponent, canActivate: [FreeGuard], data: { + { path: '', component: OpenaireAdvancedSearchDataProvidersComponent, data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts b/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts index 30b62dd..1a56713 100644 --- a/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts +++ b/src/app/searchPages/advanced/advancedSearchDataProviders.component.ts @@ -7,8 +7,8 @@ import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; @Component({ selector: 'openaire-advanced-search-dataprovider', template: ` - - + + ` }) diff --git a/src/app/searchPages/advanced/advancedSearchDataProviders.module.ts b/src/app/searchPages/advanced/advancedSearchDataProviders.module.ts index 1ea91f3..cae770e 100644 --- a/src/app/searchPages/advanced/advancedSearchDataProviders.module.ts +++ b/src/app/searchPages/advanced/advancedSearchDataProviders.module.ts @@ -4,21 +4,20 @@ import {FormsModule} from '@angular/forms'; import {AdvancedSearchDataProvidersRoutingModule} from './advancedSearchDataProviders-routing.module'; import {OpenaireAdvancedSearchDataProvidersComponent} from './advancedSearchDataProviders.component'; -import {AdvancedSearchDataProvidersModule} from '../../openaireLibrary/searchPages/advanced/advancedSearchDataProviders.module'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; +import {SearchDataProvidersModule} from "../../openaireLibrary/searchPages/searchDataProviders.module"; @NgModule({ imports: [ CommonModule, FormsModule, AdvancedSearchDataProvidersRoutingModule, - AdvancedSearchDataProvidersModule + SearchDataProvidersModule ], declarations: [ OpenaireAdvancedSearchDataProvidersComponent ], - providers:[FreeGuard], + providers:[], exports: [ OpenaireAdvancedSearchDataProvidersComponent ] diff --git a/src/app/searchPages/advanced/advancedSearchDatasets-routing.module.ts b/src/app/searchPages/advanced/advancedSearchDatasets-routing.module.ts deleted file mode 100644 index 0c2f540..0000000 --- a/src/app/searchPages/advanced/advancedSearchDatasets-routing.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {NgModule} from '@angular/core'; -import {RouterModule} from '@angular/router'; - -import {OpenaireAdvancedSearchDatasetsComponent} from './advancedSearchDatasets.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireAdvancedSearchDatasetsComponent, canActivate: [FreeGuard], data: { - redirect: '/error' - }, canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class AdvancedSearchDatasetsRoutingModule { } diff --git a/src/app/searchPages/advanced/advancedSearchDatasets.component.ts b/src/app/searchPages/advanced/advancedSearchDatasets.component.ts deleted file mode 100644 index 73fe09c..0000000 --- a/src/app/searchPages/advanced/advancedSearchDatasets.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {Component} from '@angular/core'; -import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; -import {ActivatedRoute} from "@angular/router"; -import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; - - -@Component({ - selector: 'openaire-advanced-search-datasets', - template: ` - - - ` -}) - -export class OpenaireAdvancedSearchDatasetsComponent { - customFilter:SearchCustomFilter= null; - constructor(private route: ActivatedRoute) { - - } - - ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); - let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); - this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); - } - -} diff --git a/src/app/searchPages/advanced/advancedSearchDatasets.module.ts b/src/app/searchPages/advanced/advancedSearchDatasets.module.ts deleted file mode 100644 index 00e1eeb..0000000 --- a/src/app/searchPages/advanced/advancedSearchDatasets.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule} from '@angular/forms'; -import {AdvancedSearchDatasetsRoutingModule} from './advancedSearchDatasets-routing.module'; -import {OpenaireAdvancedSearchDatasetsComponent} from './advancedSearchDatasets.component'; -import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchPages/advanced/advancedSearchResearchResults.module"; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; - -@NgModule({ - imports: [ - CommonModule, FormsModule, - AdvancedSearchResearchResultsModule, - AdvancedSearchDatasetsRoutingModule - - ], - declarations: [ - OpenaireAdvancedSearchDatasetsComponent - ], - providers:[FreeGuard], - exports: [ - OpenaireAdvancedSearchDatasetsComponent - ] -}) -export class LibAdvancedSearchDatasetsModule { } diff --git a/src/app/searchPages/advanced/advancedSearchOrganizations-routing.module.ts b/src/app/searchPages/advanced/advancedSearchOrganizations-routing.module.ts index 14d2db2..15e0c8a 100644 --- a/src/app/searchPages/advanced/advancedSearchOrganizations-routing.module.ts +++ b/src/app/searchPages/advanced/advancedSearchOrganizations-routing.module.ts @@ -2,14 +2,13 @@ import {NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; import {OpenaireAdvancedSearchOrganizationsComponent} from './advancedSearchOrganizations.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireAdvancedSearchOrganizationsComponent , canActivate: [FreeGuard], data: { + { path: '', component: OpenaireAdvancedSearchOrganizationsComponent , data: { redirect: '/error' },canDeactivate: [PreviousRouteRecorder]} diff --git a/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts b/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts index 4ad24a5..202eb8a 100644 --- a/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts +++ b/src/app/searchPages/advanced/advancedSearchOrganizations.component.ts @@ -7,8 +7,8 @@ import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; @Component({ selector: 'openaire-advanced-search-organizations', template: ` - - + + ` }) diff --git a/src/app/searchPages/advanced/advancedSearchOrganizations.module.ts b/src/app/searchPages/advanced/advancedSearchOrganizations.module.ts index 562cc56..6999c82 100644 --- a/src/app/searchPages/advanced/advancedSearchOrganizations.module.ts +++ b/src/app/searchPages/advanced/advancedSearchOrganizations.module.ts @@ -3,20 +3,19 @@ import {CommonModule} from '@angular/common'; import {FormsModule} from '@angular/forms'; import {AdvancedSearchOrganizationsRoutingModule} from './advancedSearchOrganizations-routing.module'; import {OpenaireAdvancedSearchOrganizationsComponent} from './advancedSearchOrganizations.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {AdvancedSearchOrganizationsModule} from '../../openaireLibrary/searchPages/advanced/advancedSearchOrganizations.module'; +import {SearchOrganizationsModule} from "../../openaireLibrary/searchPages/searchOrganizations.module"; @NgModule({ imports: [ CommonModule, FormsModule, - AdvancedSearchOrganizationsModule, + SearchOrganizationsModule, AdvancedSearchOrganizationsRoutingModule ], declarations: [ OpenaireAdvancedSearchOrganizationsComponent ], - providers:[FreeGuard], + providers:[], exports: [ OpenaireAdvancedSearchOrganizationsComponent ] diff --git a/src/app/searchPages/advanced/advancedSearchOrps-routing.module.ts b/src/app/searchPages/advanced/advancedSearchOrps-routing.module.ts deleted file mode 100644 index 59be22e..0000000 --- a/src/app/searchPages/advanced/advancedSearchOrps-routing.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {NgModule} from '@angular/core'; -import {RouterModule} from '@angular/router'; - -import {OpenaireAdvancedSearchOrpsComponent} from './advancedSearchOrps.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireAdvancedSearchOrpsComponent, canActivate: [FreeGuard], data: { - redirect: '/error' - }, canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class AdvancedSearchOrpsRoutingModule { } diff --git a/src/app/searchPages/advanced/advancedSearchOrps.component.ts b/src/app/searchPages/advanced/advancedSearchOrps.component.ts deleted file mode 100644 index 7512aca..0000000 --- a/src/app/searchPages/advanced/advancedSearchOrps.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {Component} from '@angular/core'; -import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; -import {ActivatedRoute} from "@angular/router"; -import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; - - -@Component({ - selector: 'openaire-advanced-search-orps', - template: ` - - - ` - }) - -export class OpenaireAdvancedSearchOrpsComponent { - customFilter:SearchCustomFilter= null; - constructor(private route: ActivatedRoute) { - - } - - ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); - let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); - this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); - } - -} diff --git a/src/app/searchPages/advanced/advancedSearchOrps.module.ts b/src/app/searchPages/advanced/advancedSearchOrps.module.ts deleted file mode 100644 index e9dda23..0000000 --- a/src/app/searchPages/advanced/advancedSearchOrps.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule} from '@angular/forms'; -import {AdvancedSearchOrpsRoutingModule} from './advancedSearchOrps-routing.module'; -import {OpenaireAdvancedSearchOrpsComponent} from './advancedSearchOrps.component'; -import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchPages/advanced/advancedSearchResearchResults.module"; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; - -@NgModule({ - imports: [ - CommonModule, FormsModule, - AdvancedSearchResearchResultsModule, - AdvancedSearchOrpsRoutingModule - - ], - declarations: [ - OpenaireAdvancedSearchOrpsComponent - ], - providers:[FreeGuard], - exports: [ - OpenaireAdvancedSearchOrpsComponent - ] -}) -export class LibAdvancedSearchOrpsModule { } diff --git a/src/app/searchPages/advanced/advancedSearchProjects-routing.module.ts b/src/app/searchPages/advanced/advancedSearchProjects-routing.module.ts index 00a1ef6..c5cd7a9 100644 --- a/src/app/searchPages/advanced/advancedSearchProjects-routing.module.ts +++ b/src/app/searchPages/advanced/advancedSearchProjects-routing.module.ts @@ -2,13 +2,12 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import{OpenaireAdvancedSearchProjectsComponent} from './advancedSearchProjects.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireAdvancedSearchProjectsComponent, canActivate: [FreeGuard], data: { + { path: '', component: OpenaireAdvancedSearchProjectsComponent, data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/advanced/advancedSearchProjects.component.ts b/src/app/searchPages/advanced/advancedSearchProjects.component.ts index 4a54691..71cdb5e 100644 --- a/src/app/searchPages/advanced/advancedSearchProjects.component.ts +++ b/src/app/searchPages/advanced/advancedSearchProjects.component.ts @@ -6,8 +6,8 @@ import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; @Component({ selector: 'openaire-advanced-search-projects', template: ` - - + + ` }) diff --git a/src/app/searchPages/advanced/advancedSearchProjects.module.ts b/src/app/searchPages/advanced/advancedSearchProjects.module.ts index 8b10d2f..11b0e61 100644 --- a/src/app/searchPages/advanced/advancedSearchProjects.module.ts +++ b/src/app/searchPages/advanced/advancedSearchProjects.module.ts @@ -3,20 +3,19 @@ import {CommonModule} from '@angular/common'; import {FormsModule} from '@angular/forms'; import {AdvancedSearchProjectsRoutingModule} from './advancedSearchProjects-routing.module'; import {OpenaireAdvancedSearchProjectsComponent} from './advancedSearchProjects.component'; -import {AdvancedSearchProjectsModule} from '../../openaireLibrary/searchPages/advanced/advancedSearchProjects.module'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; +import {SearchProjectsModule} from "../../openaireLibrary/searchPages/searchProjects.module"; @NgModule({ imports: [ CommonModule, FormsModule, - AdvancedSearchProjectsModule, + SearchProjectsModule, AdvancedSearchProjectsRoutingModule ], declarations: [ OpenaireAdvancedSearchProjectsComponent ], - providers:[FreeGuard], + providers:[], exports: [ OpenaireAdvancedSearchProjectsComponent ] diff --git a/src/app/searchPages/advanced/advancedSearchPublications-routing.module.ts b/src/app/searchPages/advanced/advancedSearchPublications-routing.module.ts deleted file mode 100644 index 54dc255..0000000 --- a/src/app/searchPages/advanced/advancedSearchPublications-routing.module.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {NgModule} from '@angular/core'; -import {RouterModule} from '@angular/router'; -import {OpenaireAdvancedSearchPublicationsComponent} from './advancedSearchPublications.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireAdvancedSearchPublicationsComponent, canActivate: [FreeGuard], data: { - redirect: '/error' - }, canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class AdvancedSearchPublicationsRoutingModule { } diff --git a/src/app/searchPages/advanced/advancedSearchPublications.component.ts b/src/app/searchPages/advanced/advancedSearchPublications.component.ts deleted file mode 100644 index 26fa98f..0000000 --- a/src/app/searchPages/advanced/advancedSearchPublications.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import {Component} from '@angular/core'; -import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; -import {ActivatedRoute} from "@angular/router"; -import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; - - -@Component({ - selector: 'openaire-advanced-search-publications', - template: ` - - ` - }) - -export class OpenaireAdvancedSearchPublicationsComponent { - customFilter:SearchCustomFilter= null; - constructor(private route: ActivatedRoute) { - - } - - ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); - let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); - this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); - } -} diff --git a/src/app/searchPages/advanced/advancedSearchPublications.module.ts b/src/app/searchPages/advanced/advancedSearchPublications.module.ts deleted file mode 100644 index 1e4eab0..0000000 --- a/src/app/searchPages/advanced/advancedSearchPublications.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule} from '@angular/forms'; - -import {AdvancedSearchPublicationsRoutingModule} from './advancedSearchPublications-routing.module'; -import {OpenaireAdvancedSearchPublicationsComponent} from './advancedSearchPublications.component'; - - -import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchPages/advanced/advancedSearchResearchResults.module"; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; - -@NgModule({ - imports: [ - CommonModule, FormsModule, - AdvancedSearchResearchResultsModule, - AdvancedSearchPublicationsRoutingModule - - ], - declarations: [ - OpenaireAdvancedSearchPublicationsComponent - ], - providers:[FreeGuard], - exports: [ - OpenaireAdvancedSearchPublicationsComponent - ] -}) -export class LibAdvancedSearchPublicationsModule { } diff --git a/src/app/searchPages/advanced/advancedSearchSoftware-routing.module.ts b/src/app/searchPages/advanced/advancedSearchSoftware-routing.module.ts deleted file mode 100644 index 738fac8..0000000 --- a/src/app/searchPages/advanced/advancedSearchSoftware-routing.module.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import{OpenaireAdvancedSearchSoftwareComponent} from './advancedSearchSoftware.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireAdvancedSearchSoftwareComponent, canActivate: [FreeGuard],canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class AdvancedSearchSoftwareRoutingModule { } diff --git a/src/app/searchPages/advanced/advancedSearchSoftware.component.ts b/src/app/searchPages/advanced/advancedSearchSoftware.component.ts deleted file mode 100644 index 8f26316..0000000 --- a/src/app/searchPages/advanced/advancedSearchSoftware.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import {Component} from '@angular/core'; -import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; -import {ActivatedRoute} from "@angular/router"; -import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; - -@Component({ - selector: 'openaire-advanced-search-software', - template: ` - - - ` -}) - -export class OpenaireAdvancedSearchSoftwareComponent { - - customFilter:SearchCustomFilter= null; - constructor(private route: ActivatedRoute) { - - } - - ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); - let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); - this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); - } -} diff --git a/src/app/searchPages/advanced/advancedSearchSoftware.module.ts b/src/app/searchPages/advanced/advancedSearchSoftware.module.ts deleted file mode 100644 index 961984d..0000000 --- a/src/app/searchPages/advanced/advancedSearchSoftware.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule} from '@angular/forms'; - -import {AdvancedSearchSoftwareRoutingModule} from './advancedSearchSoftware-routing.module'; -import {OpenaireAdvancedSearchSoftwareComponent} from './advancedSearchSoftware.component'; -import {AdvancedSearchResearchResultsModule} from "../../openaireLibrary/searchPages/advanced/advancedSearchResearchResults.module"; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; - - -@NgModule({ - imports: [ - CommonModule, FormsModule, - AdvancedSearchResearchResultsModule, - AdvancedSearchSoftwareRoutingModule - - ], - declarations: [ - OpenaireAdvancedSearchSoftwareComponent - ], - providers:[FreeGuard - ], - exports: [ - OpenaireAdvancedSearchSoftwareComponent - ] -}) -export class LibAdvancedSearchSoftwareModule { } diff --git a/src/app/searchPages/advanced/searchResearchResults-routing.module.ts b/src/app/searchPages/advanced/searchResearchResults-routing.module.ts new file mode 100644 index 0000000..de0ce51 --- /dev/null +++ b/src/app/searchPages/advanced/searchResearchResults-routing.module.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; + +import{OpenaireSearchResearchResultsComponent} from './searchResearchResults.component'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; + + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireSearchResearchResultsComponent, data: { + redirect: '/error', community : 'openaire' + }, canDeactivate: [PreviousRouteRecorder] } + + ]) + ] +}) +export class SearchResearchResultsRoutingModule { } diff --git a/src/app/searchPages/simple/searchOrps.component.ts b/src/app/searchPages/advanced/searchResearchResults.component.ts similarity index 61% rename from src/app/searchPages/simple/searchOrps.component.ts rename to src/app/searchPages/advanced/searchResearchResults.component.ts index 04221dc..694155e 100644 --- a/src/app/searchPages/simple/searchOrps.component.ts +++ b/src/app/searchPages/advanced/searchResearchResults.component.ts @@ -1,22 +1,20 @@ -import {Component} from '@angular/core'; +import {Component, Input} from '@angular/core'; +import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; -import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; @Component({ - selector: 'openaire-search-orps', + selector: 'openaire-search-results', template: ` - + ` + }) - -export class OpenaireSearchOrpsComponent { - customFilter: SearchCustomFilter = null; - +export class OpenaireSearchResearchResultsComponent { + @Input() searchLink: string = "/search/advanced/research-results"; + customFilter:SearchCustomFilter= null; constructor(private route: ActivatedRoute) { - } - ngOnInit() { let id = this.route.snapshot.paramMap.get('id'); let agg: FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); diff --git a/src/app/searchPages/advanced/searchResearchResults.module.ts b/src/app/searchPages/advanced/searchResearchResults.module.ts new file mode 100644 index 0000000..9462486 --- /dev/null +++ b/src/app/searchPages/advanced/searchResearchResults.module.ts @@ -0,0 +1,25 @@ +import { NgModule} from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import{ SearchResearchResultsRoutingModule} from './searchResearchResults-routing.module'; +import{OpenaireSearchResearchResultsComponent} from './searchResearchResults.component'; + +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/searchResearchResults.module"; + +@NgModule({ + imports: [ + CommonModule, FormsModule, + SearchResearchResultsRoutingModule, SearchResearchResultsModule + + ], + declarations: [ + OpenaireSearchResearchResultsComponent + ], + providers:[PreviousRouteRecorder], + exports: [ + OpenaireSearchResearchResultsComponent + ] +}) +export class OpenaireAdvancedSearchResearchResultsModule { } diff --git a/src/app/searchPages/find/libSearch.module.ts b/src/app/searchPages/find/libSearch.module.ts index 77099fd..77216de 100644 --- a/src/app/searchPages/find/libSearch.module.ts +++ b/src/app/searchPages/find/libSearch.module.ts @@ -1,15 +1,14 @@ import {NgModule} from '@angular/core'; -import {MainSearchModule} from '../../openaireLibrary/searchPages/find/mainSearch.module'; import {OpenaireSearchComponent} from './search.component'; import {MainSearchRoutingModule} from './mainSearch-routing.module'; -import {FreeGuard} from "../../openaireLibrary/login/freeGuard.guard"; import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; +import {SearchAllModule} from "../../openaireLibrary/searchPages/find/searchAll.module"; @NgModule({ - imports: [ MainSearchRoutingModule, MainSearchModule], + imports: [ MainSearchRoutingModule, SearchAllModule], declarations:[OpenaireSearchComponent], exports:[OpenaireSearchComponent], - providers: [FreeGuard, PreviousRouteRecorder] + providers: [ PreviousRouteRecorder] }) export class LibMainSearchModule { } diff --git a/src/app/searchPages/find/mainSearch-routing.module.ts b/src/app/searchPages/find/mainSearch-routing.module.ts index 7803231..82cc678 100644 --- a/src/app/searchPages/find/mainSearch-routing.module.ts +++ b/src/app/searchPages/find/mainSearch-routing.module.ts @@ -2,14 +2,13 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import{OpenaireSearchComponent} from './search.component'; -import {FreeGuard} from "../../openaireLibrary/login/freeGuard.guard"; import {PreviousRouteRecorder} from "../../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] } + { path: '', component: OpenaireSearchComponent,canDeactivate: [PreviousRouteRecorder] } ]) ] diff --git a/src/app/searchPages/find/search.component.ts b/src/app/searchPages/find/search.component.ts index e041967..696176d 100644 --- a/src/app/searchPages/find/search.component.ts +++ b/src/app/searchPages/find/search.component.ts @@ -6,7 +6,7 @@ import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; @Component({ selector: 'openaire-search-find', template: ` - + `, }) @@ -21,10 +21,7 @@ export class OpenaireSearchComponent{ let id = this.route.snapshot.paramMap.get('id'); let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); - this.route.data - .subscribe((data: { envSpecific: any }) => { - }); } diff --git a/src/app/searchPages/simple/searchDataProviders-routing.module.ts b/src/app/searchPages/simple/searchDataProviders-routing.module.ts index f2f3912..1cd462f 100644 --- a/src/app/searchPages/simple/searchDataProviders-routing.module.ts +++ b/src/app/searchPages/simple/searchDataProviders-routing.module.ts @@ -9,7 +9,7 @@ import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousR @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchDataprovidersComponent, canActivate: [FreeGuard], data: { + { path: '', component: OpenaireSearchDataprovidersComponent,data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/simple/searchDataProviders.module.ts b/src/app/searchPages/simple/searchDataProviders.module.ts index 333de4d..6b13ace 100644 --- a/src/app/searchPages/simple/searchDataProviders.module.ts +++ b/src/app/searchPages/simple/searchDataProviders.module.ts @@ -3,9 +3,8 @@ import {CommonModule} from '@angular/common'; import {FormsModule} from '@angular/forms'; import {OpenaireSearchDataprovidersComponent} from './searchDataproviders.component'; import {SearchDataProvidersRoutingModule} from './searchDataProviders-routing.module'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {SearchDataProvidersModule} from '../../openaireLibrary/searchPages/simple/searchDataProviders.module'; +import {SearchDataProvidersModule} from "../../openaireLibrary/searchPages/searchDataProviders.module"; @NgModule({ imports: [ @@ -16,7 +15,7 @@ SearchDataProvidersModule, SearchDataProvidersRoutingModule declarations: [ OpenaireSearchDataprovidersComponent ], - providers:[FreeGuard,PreviousRouteRecorder], + providers:[PreviousRouteRecorder], exports: [ OpenaireSearchDataprovidersComponent ] diff --git a/src/app/searchPages/simple/searchDatasets-routing.module.ts b/src/app/searchPages/simple/searchDatasets-routing.module.ts deleted file mode 100644 index be5b36b..0000000 --- a/src/app/searchPages/simple/searchDatasets-routing.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import {NgModule} from '@angular/core'; -import {RouterModule} from '@angular/router'; - -import {OpenaireSearchDatasetsComponent} from './searchDatasets.component'; -import {EnvironmentSpecificResolver} from '../../openaireLibrary/utils/properties/environmentSpecificResolver'; - -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireSearchDatasetsComponent, canActivate: [FreeGuard], data: { - redirect: '/error' - }, canDeactivate: [PreviousRouteRecorder] , resolve: { envSpecific: EnvironmentSpecificResolver }}, - - ]) - ] -}) -export class SearchDatasetsRoutingModule { } diff --git a/src/app/searchPages/simple/searchDatasets.module.ts b/src/app/searchPages/simple/searchDatasets.module.ts deleted file mode 100644 index 2fa5023..0000000 --- a/src/app/searchPages/simple/searchDatasets.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule} from '@angular/forms'; - -import {SearchDatasetsRoutingModule} from './searchDatasets-routing.module'; -import {OpenaireSearchDatasetsComponent} from './searchDatasets.component'; - -import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/simple/searchResearchResults.module"; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - - -@NgModule({ - imports: [ - CommonModule, FormsModule, - SearchResearchResultsModule , SearchDatasetsRoutingModule - - ], - declarations: [ - OpenaireSearchDatasetsComponent - ], - providers:[FreeGuard,PreviousRouteRecorder], - exports: [ - OpenaireSearchDatasetsComponent - ] -}) -export class LibSearchDatasetsModule { } diff --git a/src/app/searchPages/simple/searchOrganizations-routing.module.ts b/src/app/searchPages/simple/searchOrganizations-routing.module.ts index 6090ac5..171a5cc 100644 --- a/src/app/searchPages/simple/searchOrganizations-routing.module.ts +++ b/src/app/searchPages/simple/searchOrganizations-routing.module.ts @@ -1,14 +1,13 @@ import {NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; import {OpenaireSearchOrganizationsComponent} from './searchOrganizations.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchOrganizationsComponent, canActivate: [FreeGuard], data: { + { path: '', component: OpenaireSearchOrganizationsComponent, data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/simple/searchOrganizations.module.ts b/src/app/searchPages/simple/searchOrganizations.module.ts index 2b0f0d2..6c6dc7a 100644 --- a/src/app/searchPages/simple/searchOrganizations.module.ts +++ b/src/app/searchPages/simple/searchOrganizations.module.ts @@ -5,10 +5,9 @@ import {FormsModule} from '@angular/forms'; import {SearchOrganizationsRoutingModule} from './searchOrganizations-routing.module'; import {OpenaireSearchOrganizationsComponent} from './searchOrganizations.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {SearchOrganizationsModule} from "../../openaireLibrary/searchPages/searchOrganizations.module"; -import {SearchOrganizationsModule} from '../../openaireLibrary/searchPages/simple/searchOrganizations.module'; @NgModule({ imports: [ @@ -19,7 +18,7 @@ import {SearchOrganizationsModule} from '../../openaireLibrary/searchPages/simpl declarations: [ OpenaireSearchOrganizationsComponent ], - providers:[FreeGuard,PreviousRouteRecorder], + providers:[PreviousRouteRecorder], exports: [ OpenaireSearchOrganizationsComponent ] diff --git a/src/app/searchPages/simple/searchOrps-routing.module.ts b/src/app/searchPages/simple/searchOrps-routing.module.ts deleted file mode 100644 index 42b826e..0000000 --- a/src/app/searchPages/simple/searchOrps-routing.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import {NgModule} from '@angular/core'; -import {RouterModule} from '@angular/router'; - -import {OpenaireSearchOrpsComponent} from './searchOrps.component'; -import {EnvironmentSpecificResolver} from '../../openaireLibrary/utils/properties/environmentSpecificResolver'; - -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireSearchOrpsComponent, canActivate: [FreeGuard], data: { - redirect: '/error' - }, canDeactivate: [PreviousRouteRecorder] , resolve: { envSpecific: EnvironmentSpecificResolver }}, - - ]) - ] -}) -export class SearchOrpsRoutingModule { } diff --git a/src/app/searchPages/simple/searchOrps.module.ts b/src/app/searchPages/simple/searchOrps.module.ts deleted file mode 100644 index 07c4427..0000000 --- a/src/app/searchPages/simple/searchOrps.module.ts +++ /dev/null @@ -1,25 +0,0 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule} from '@angular/forms'; -import {SearchOrpsRoutingModule} from './searchOrps-routing.module'; -import {OpenaireSearchOrpsComponent} from './searchOrps.component'; -import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/simple/searchResearchResults.module"; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - - -@NgModule({ - imports: [ - CommonModule, FormsModule, - SearchResearchResultsModule , SearchOrpsRoutingModule - - ], - declarations: [ - OpenaireSearchOrpsComponent - ], - providers:[FreeGuard,PreviousRouteRecorder], - exports: [ - OpenaireSearchOrpsComponent - ] -}) -export class LibSearchOrpsModule { } diff --git a/src/app/searchPages/simple/searchProjects-routing.module.ts b/src/app/searchPages/simple/searchProjects-routing.module.ts index e0c54ef..5c74a25 100644 --- a/src/app/searchPages/simple/searchProjects-routing.module.ts +++ b/src/app/searchPages/simple/searchProjects-routing.module.ts @@ -2,14 +2,13 @@ import {NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; import {OpenaireSearchProjectsComponent} from './searchProjects.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; @NgModule({ imports: [ RouterModule.forChild([ - { path: '', component: OpenaireSearchProjectsComponent, canActivate: [FreeGuard], data: { + { path: '', component: OpenaireSearchProjectsComponent, data: { redirect: '/error' }, canDeactivate: [PreviousRouteRecorder] } diff --git a/src/app/searchPages/simple/searchProjects.component.ts b/src/app/searchPages/simple/searchProjects.component.ts index bbedf2e..1a719cd 100644 --- a/src/app/searchPages/simple/searchProjects.component.ts +++ b/src/app/searchPages/simple/searchProjects.component.ts @@ -1,4 +1,4 @@ -import {Component, Input, ViewChild} from '@angular/core'; +import {Component} from '@angular/core'; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; diff --git a/src/app/searchPages/simple/searchProjects.module.ts b/src/app/searchPages/simple/searchProjects.module.ts index c841500..8c7fa82 100644 --- a/src/app/searchPages/simple/searchProjects.module.ts +++ b/src/app/searchPages/simple/searchProjects.module.ts @@ -5,9 +5,8 @@ import {FormsModule} from '@angular/forms'; import {SearchProjectsRoutingModule} from './searchProjects-routing.module'; import {OpenaireSearchProjectsComponent} from './searchProjects.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {SearchProjectsModule} from '../../openaireLibrary/searchPages/simple/searchProjects.module'; +import {SearchProjectsModule} from "../../openaireLibrary/searchPages/searchProjects.module"; @NgModule({ imports: [ @@ -17,7 +16,7 @@ import {SearchProjectsModule} from '../../openaireLibrary/searchPages/simple/sea declarations: [ OpenaireSearchProjectsComponent ], - providers:[FreeGuard,PreviousRouteRecorder], + providers:[PreviousRouteRecorder], exports: [ OpenaireSearchProjectsComponent ] diff --git a/src/app/searchPages/simple/searchPublications-routing.module.ts b/src/app/searchPages/simple/searchPublications-routing.module.ts deleted file mode 100644 index f61ad3a..0000000 --- a/src/app/searchPages/simple/searchPublications-routing.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {NgModule} from '@angular/core'; -import {RouterModule} from '@angular/router'; - -import {OpenaireSearchPublicationsComponent} from './searchPublications.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireSearchPublicationsComponent, canActivate: [FreeGuard], data: { - redirect: '/error' - }, canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class SearchPublicationsRoutingModule { } diff --git a/src/app/searchPages/simple/searchPublications.component.ts b/src/app/searchPages/simple/searchPublications.component.ts deleted file mode 100644 index 72f524a..0000000 --- a/src/app/searchPages/simple/searchPublications.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import {Component} from '@angular/core'; -import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; -import {ActivatedRoute} from "@angular/router"; -import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; - -@Component({ - selector: 'openaire-search-publications', - template: ` - - ` - -}) -export class OpenaireSearchPublicationsComponent { - customFilter:SearchCustomFilter= null; - constructor ( private route: ActivatedRoute ) { - - } - ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); - let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); - this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); - } -} diff --git a/src/app/searchPages/simple/searchPublications.module.ts b/src/app/searchPages/simple/searchPublications.module.ts deleted file mode 100644 index 557fddf..0000000 --- a/src/app/searchPages/simple/searchPublications.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule} from '@angular/forms'; - -import {SearchPublicationsRoutingModule} from './searchPublications-routing.module'; -import {OpenaireSearchPublicationsComponent} from './searchPublications.component'; - -import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/simple/searchResearchResults.module"; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - -@NgModule({ - imports: [ - CommonModule, FormsModule, SearchResearchResultsModule, - - SearchPublicationsRoutingModule - - ], - declarations: [ - OpenaireSearchPublicationsComponent - ], - providers:[FreeGuard,PreviousRouteRecorder], - exports: [ - OpenaireSearchPublicationsComponent - ] -}) -export class LibSearchPublicationsModule { } diff --git a/src/app/searchPages/simple/searchResearchResults-routing.module.ts b/src/app/searchPages/simple/searchResearchResults-routing.module.ts new file mode 100644 index 0000000..bac0a53 --- /dev/null +++ b/src/app/searchPages/simple/searchResearchResults-routing.module.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; + +import{OpenaireSearchResearchResultsComponent} from './searchResearchResults.component'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; + + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireSearchResearchResultsComponent, data: { + redirect: '/error', community : 'openaire' + }, canDeactivate: [PreviousRouteRecorder] } + + ]) + ] +}) +export class SearchResearchResultsRoutingModule { } diff --git a/src/app/searchPages/simple/searchDatasets.component.ts b/src/app/searchPages/simple/searchResearchResults.component.ts similarity index 56% rename from src/app/searchPages/simple/searchDatasets.component.ts rename to src/app/searchPages/simple/searchResearchResults.component.ts index be313e6..95ac0a9 100644 --- a/src/app/searchPages/simple/searchDatasets.component.ts +++ b/src/app/searchPages/simple/searchResearchResults.component.ts @@ -1,18 +1,18 @@ -import {Component} from '@angular/core'; +import {Component, Input} from '@angular/core'; import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; import {ActivatedRoute} from "@angular/router"; import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; @Component({ - selector: 'openaire-search-datasets', - template: ` - - ` + selector: 'openaire-search-results', + template: ` + + ` + }) - -export class OpenaireSearchDatasetsComponent { - customFilter: SearchCustomFilter = null; - +export class OpenaireSearchResearchResultsComponent { + @Input() searchLink: string = "/search/research-results"; + customFilter:SearchCustomFilter= null; constructor ( private route: ActivatedRoute ) { } diff --git a/src/app/searchPages/simple/searchResearchResults.module.ts b/src/app/searchPages/simple/searchResearchResults.module.ts new file mode 100644 index 0000000..b1d52c7 --- /dev/null +++ b/src/app/searchPages/simple/searchResearchResults.module.ts @@ -0,0 +1,25 @@ +import { NgModule} from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import{ SearchResearchResultsRoutingModule} from './searchResearchResults-routing.module'; +import{OpenaireSearchResearchResultsComponent} from './searchResearchResults.component'; + +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/searchResearchResults.module"; + +@NgModule({ + imports: [ + CommonModule, FormsModule, + SearchResearchResultsRoutingModule, SearchResearchResultsModule + + ], + declarations: [ + OpenaireSearchResearchResultsComponent + ], + providers:[PreviousRouteRecorder], + exports: [ + OpenaireSearchResearchResultsComponent + ] +}) +export class OpenaireSearchResearchResultsModule { } diff --git a/src/app/searchPages/simple/searchSoftware-routing.module.ts b/src/app/searchPages/simple/searchSoftware-routing.module.ts deleted file mode 100644 index 6344bf2..0000000 --- a/src/app/searchPages/simple/searchSoftware-routing.module.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {NgModule} from '@angular/core'; -import {RouterModule} from '@angular/router'; - -import {OpenaireSearchSoftwareComponent} from './searchSoftware.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; - -@NgModule({ - imports: [ - RouterModule.forChild([ - { path: '', component: OpenaireSearchSoftwareComponent, canActivate: [FreeGuard], canDeactivate: [PreviousRouteRecorder] } - - ]) - ] -}) -export class SearchSoftwareRoutingModule { } diff --git a/src/app/searchPages/simple/searchSoftware.component.ts b/src/app/searchPages/simple/searchSoftware.component.ts deleted file mode 100644 index c98b21a..0000000 --- a/src/app/searchPages/simple/searchSoftware.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import {Component} from '@angular/core'; -import {SearchCustomFilter} from "../../openaireLibrary/searchPages/searchUtils/searchUtils.class"; -import {FilterInfo, PortalAggregators} from "../../utils/aggregators"; -import {ActivatedRoute} from "@angular/router"; - -@Component({ - selector: 'openaire-search-software', - template: ` - - ` -}) - -export class OpenaireSearchSoftwareComponent { - customFilter:SearchCustomFilter= null; - constructor ( private route: ActivatedRoute ) { - - } - ngOnInit() { - let id = this.route.snapshot.paramMap.get('id'); - let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); - this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); - } - -} diff --git a/src/app/searchPages/simple/searchSoftware.module.ts b/src/app/searchPages/simple/searchSoftware.module.ts deleted file mode 100644 index 393aafd..0000000 --- a/src/app/searchPages/simple/searchSoftware.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import {NgModule} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule} from '@angular/forms'; - -import {SearchSoftwareRoutingModule} from './searchSoftware-routing.module'; -import {OpenaireSearchSoftwareComponent} from './searchSoftware.component'; -import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; -import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; -import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/simple/searchResearchResults.module"; - -@NgModule({ - imports: [ - CommonModule, FormsModule, SearchResearchResultsModule, SearchSoftwareRoutingModule - ], - declarations: [ - OpenaireSearchSoftwareComponent - ], - providers:[FreeGuard,PreviousRouteRecorder - ], - exports: [ - OpenaireSearchSoftwareComponent - ] -}) -export class LibSearchSoftwareModule { } diff --git a/src/app/utils/aggregatorNavBar.component.ts b/src/app/utils/aggregatorNavBar.component.ts deleted file mode 100644 index fa65315..0000000 --- a/src/app/utils/aggregatorNavBar.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -// import {Component} from '@angular/core'; -// import {ActivatedRoute} from '@angular/router'; -// import "rxjs/add/observable/zip"; -// import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties'; -// import {FilterInfo, PortalAggregators} from "../utils/aggregators"; -// import {MenuItem, RootMenuItem} from "../openaireLibrary/sharedComponents/menu"; -// -// @Component({ -// selector: 'aggNavbar', -// templateUrl: ` -// -// `, -// }) -// export class AggregatorNavBarComponent { -// -// properties: EnvProperties; -// menuItems: RootMenuItem [] = [ -// {rootItem: new MenuItem("home", "Home", "", "/", false, [], null, {}), items: []}, -// { -// rootItem: new MenuItem("search", "Search", "", "/search/find", false, [], ["/search/find"], {}), -// items: [new MenuItem("", "Publications", "", "/search/find/publications", false, ["publication"], ["/search/find/publications"], {}), -// 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("", "Organizations", "", "/search/find/organizations/", false, ["organization"], ["/search/find/organizations"], {}) -// ] -// } -// ]; -// community = {id: "CA", name: "Canada Aggregator", logoUrl:"assets/common-assets/logo-small-aggregator.png"}; -// -// -// constructor( -// private route: ActivatedRoute, -// -// ) { -// let id = this.route.snapshot.paramMap.get('id'); -// console.log(id); -// let agg:FilterInfo = PortalAggregators.getFilterInfoByMenuId(id); -// // this.customFilter = PortalAggregators.getSearchCustomFilterByAggregator(agg); -// // console.log(this.customFilter); -// -// -// -// } -// -// public ngOnInit() { -// -// this.route.data -// .subscribe((data: { envSpecific: EnvProperties }) => { -// this.properties = data.envSpecific; -// -// -// -// }); -// -// } -// -// } diff --git a/src/app/utils/aggregators.ts b/src/app/utils/aggregators.ts index ddbdd04..8150e3f 100644 --- a/src/app/utils/aggregators.ts +++ b/src/app/utils/aggregators.ts @@ -22,7 +22,7 @@ export class FilterInfo { export class PortalAggregators { static list: FilterInfo[] = [ - new FilterInfo("canada", "Canadian Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "CA", "Canada"), + new FilterInfo("canada", "Canadian Aggregator", "assets/canada-logo.png", "Country", "country", "CA", "Canada"), new FilterInfo("italy", "Italian Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "IT", "Italy"), new FilterInfo("greece", "Greek Aggregator", "assets/common-assets/logo-small-aggregator.png", "Country", "country", "GR", "Greece"), @@ -46,6 +46,8 @@ export class PortalAggregators { let filter:SearchCustomFilter = null; if(agg) { filter = new SearchCustomFilter(agg.fieldName, agg.queryFieldName, agg.valueId, agg.valueName); + filter.promptToAddFilter = true; + filter.isHiddenFilter = false; } return filter; } diff --git a/src/assets/canada-background.svg b/src/assets/canada-background.svg new file mode 100644 index 0000000..e8b4990 --- /dev/null +++ b/src/assets/canada-background.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/assets/canada-logo.png b/src/assets/canada-logo.png new file mode 100644 index 0000000..d11538b Binary files /dev/null and b/src/assets/canada-logo.png differ diff --git a/src/assets/env-properties.json b/src/assets/env-properties.json index b73955b..a3c5fc8 100644 --- a/src/assets/env-properties.json +++ b/src/assets/env-properties.json @@ -1,5 +1,5 @@ { - "environment" : "development", + "environment" : "production", "enablePiwikTrack" : false, "enableHelper" : true, "useCache" : false, diff --git a/src/assets/graph.svg b/src/assets/graph.svg new file mode 100644 index 0000000..d94ad1a --- /dev/null +++ b/src/assets/graph.svg @@ -0,0 +1 @@ +graph \ No newline at end of file diff --git a/src/assets/link.svg b/src/assets/link.svg index b88f9df..d8e54c3 100644 --- a/src/assets/link.svg +++ b/src/assets/link.svg @@ -1 +1 @@ - \ No newline at end of file +Asset 82 \ No newline at end of file diff --git a/src/assets/portal-custom.css b/src/assets/portal-custom.css new file mode 100644 index 0000000..8fe4950 --- /dev/null +++ b/src/assets/portal-custom.css @@ -0,0 +1,45 @@ +:root { + --portal-main-color: #E80000; + --portal-main-contrast: white; + --portal-dark-color: #ad0000; + --openaire-main-color: #313179; +} + +.graph-background { + background-size: cover !important; + padding-bottom: 100px; + background: #FAFAFA url('/assets/canada-background.svg') no-repeat bottom; +} +.mainPageSearchForm{ + background-color: white !important; + background-image: none !important; + margin-bottom: 100px; +} + +.searchForm, .generalSearchForm, +.publicationsSearchForm, +.projectsSearchForm, .projectsTableSearchForm, +.organizationsSearchForm, +.datasetsSearchForm, +.softwareSearchForm, +.orpsSearchForm, +.datasourcesSearchForm, .compatibleDatasourcesSearchForm, .compatibleDatasourcesTableSearchForm, .datasourcesTableSearchForm, + .journalsSearchForm, .journalsTableSearchForm, +.entityRegistriesSearchForm, .entityRegistriesTableSearchForm { + + background-color: white !important; + background-image: none !important; +} + + +.emphasis { + color: #000; + font-size: 17px; + font-weight: bold; +} + +.portal-color.emphasis { + color: #37C7E9; + font-size: 40px; + font-weight: bold; +} diff --git a/src/assets/share.svg b/src/assets/share.svg index 3e22c5a..f6c165b 100644 --- a/src/assets/share.svg +++ b/src/assets/share.svg @@ -1 +1 @@ - \ No newline at end of file +Asset 83 \ No newline at end of file diff --git a/src/environments/environment-aggregator.beta.ts b/src/environments/environment-aggregator.beta.ts new file mode 100644 index 0000000..8ff0c0f --- /dev/null +++ b/src/environments/environment-aggregator.beta.ts @@ -0,0 +1,8 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The list of which env maps to which file can be found in `.angular-cli.json`. + +export const portalProperties = { + production: true +}; diff --git a/src/environments/environment-aggregator.prod.ts b/src/environments/environment-aggregator.prod.ts new file mode 100644 index 0000000..3e778e9 --- /dev/null +++ b/src/environments/environment-aggregator.prod.ts @@ -0,0 +1,3 @@ +export const portalProperties = { + production: true +}; diff --git a/src/environments/environment-aggregator.ts b/src/environments/environment-aggregator.ts new file mode 100644 index 0000000..be9a407 --- /dev/null +++ b/src/environments/environment-aggregator.ts @@ -0,0 +1,69 @@ +// The file contents for the current environment will overwrite these during build. +// The build system defaults to the dev environment which uses `environment.ts`, but if you do +// `ng build --env=prod` then `environment.prod.ts` will be used instead. +// The list of which env maps to which file can be found in `.angular-cli.json`. + +export const portalProperties = { + production: false, + aggregator: "canada", + title: "{Title}", + logoPath: "assets/logo.png", + sectionFooter: +` +
+
+
{This is Footer section}
+
+
+
+
+ + + + + + + + +   + + + + + + + + + + +  Unless otherwise indicated, all materials created by OpenAIRE are licenced under CC ATTRIBUTION 4.0 INTERNATIONAL LICENSE.
+
+
+ +
+
+
+
+`, + showNumbersInHhomePage:false, + searchFormSection: `
{Search Form Section}
`, + homeSectionOne: `
{This is section One}
`, + homeSectionTwo: `
{This is section Two}
`, + entities:{ + publication:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + dataset:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + software:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + other:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + datasource:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + organization:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}, + project:{isEnabled:true,simpleSearchPage:true,advancedSearchPage:true}}, + searchServiceUrl:"" + +}; diff --git a/src/environments/environment.beta.ts b/src/environments/environment.beta.ts new file mode 100644 index 0000000..74b7b14 --- /dev/null +++ b/src/environments/environment.beta.ts @@ -0,0 +1,120 @@ +import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; + +export let properties: EnvProperties = { + environment: "beta", + adminToolsPortalType: "aggregator", + dashboard: "explore", + enablePiwikTrack: true, + useCache: false, + useLongCache: true, + showAddThis: true, + metricsAPIURL: "https://beta.services.openaire.eu/usagestats/", + framesAPIURL: "https://beta.openaire.eu/stats3/", + statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", + statisticsFrameAPIURL: "https://beta.openaire.eu/stats/", + statisticsFrameNewAPIURL: "https://stats.madgik.di.uoa.gr/stats-api/", + useNewStatistisTool: true, + claimsAPIURL: "https://beta.services.openaire.eu/claims/rest/claimsService/", + searchAPIURLLAst: "https://beta.services.openaire.eu/search/v2/api/", + searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources", + openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=", + csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports", + searchCrossrefAPIURL: "https://api.crossref.org/works", + searchDataciteAPIURL: "https://api.datacite.org/works", + searchOrcidURL: "https://pub.orcid.org/v2.1/", + orcidURL: "https://orcid.org/", + doiURL: "https://dx.doi.org/", + pmcURL: "http://europepmc.org/articles/", + pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/", + handleURL: "http://hdl.handle.net/", + cordisURL: "http://cordis.europa.eu/projects/", + openDoarURL: "http://v2.sherpa.ac.uk/id/repository/", + r3DataURL: "http://service.re3data.org/repository/", + sherpaURL: "http://sherpa.ac.uk/romeo/issn/", + sherpaURLSuffix: "/", + zenodo: "https://zenodo.org/", + openAccess: "https://www.openaire.eu/support/faq#article-id-234", + openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310", + fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme", + h2020Guidlines: "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020", + ercGuidlines: "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf", + helpdesk: "https://www.openaire.eu/support/helpdesk", + helpdeskEmail: "helpdesk@openaire.eu", + utilsService: "https://demo.openaire.eu/utils-service", + + vocabulariesAPI: "https://beta.services.openaire.eu/provision/mvc/vocabularies/", + + piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=", + piwikSiteId: "6", + loginUrl: "https://beta.services.openaire.eu/uoa-user-management/openid_connect_login", + + userInfoUrl: "https://beta.services.openaire.eu/uoa-user-management/api/users/getUserInfo?accessToken=", + + logoutUrl: "https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=", + + cookieDomain: ".openaire.eu", + + feedbackmail: "feedback@openaire.eu", + + cacheUrl: "https://demo.openaire.eu/cache/get?url=", + + datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/search/", + + adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/", + + adminToolsCommunity: "openaire", + contextsAPI: "https://beta.services.openaire.eu/openaire/context", + communityAPI: "https://beta.services.openaire.eu/openaire/community/", + + csvLimit: 2000, + pagingLimit: 20, + resultsPerPage: 10, + + "baseLink" : "/", + "domain":"https://beta.explore.openaire.eu", + + searchLinkToResult: "/search/result?id=", + searchLinkToPublication: "/search/publication?articleId=", + searchLinkToProject: "/search/project?projectId=", + searchLinkToDataProvider: "/search/dataprovider?datasourceId=", + searchLinkToDataset: "/search/dataset?datasetId=", + searchLinkToSoftwareLanding: "/search/software?softwareId=", + searchLinkToOrp: "/search/other?orpId=", + searchLinkToOrganization: "/search/organization?organizationId=", + + searchLinkToPublications: "/search/find/publications", + searchLinkToDataProviders: "/search/find/dataproviders", + searchLinkToProjects: "/search/find/projects", + searchLinkToDatasets: "/search/find/datasets", + searchLinkToSoftware: "/search/find/software", + searchLinkToOrps: "/search/find/other", + searchLinkToOrganizations: "/search/find/organizations", + searchLinkToCompatibleDataProviders: "/search/content-providers", + searchLinkToEntityRegistriesDataProviders: "/search/entity-registries", + searchLinkToEntityRegistriesDataProvidersTable: "/search/entity-registries-table", + searchLinkToJournals: "/search/journals", + searchLinkToJournalsTable: "/search/journals-table", + searchLinkToResults: "/search/find/research-outcomes", + + searchLinkToAdvancedPublications: "/search/advanced/publications", + searchLinkToAdvancedProjects: "/search/advanced/projects", + searchLinkToAdvancedDatasets: "/search/advanced/datasets", + searchLinkToAdvancedSoftware: "/search/advanced/software", + searchLinkToAdvancedOrps: "/search/advanced/other", + searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders", + searchLinkToAdvancedOrganizations: "/search/advanced/organizations", + searchLinkToAdvancedResults: "/search/advanced/research-outcomes", + + lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows", + showLastIndexInformationLink: false, + widgetLink: "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", + claimsInformationLink: "https://beta.openaire.eu/linking", + lastIndexUpdate: "2020-05-11", + indexInfoAPI: "https://beta.services.openaire.eu/openaire/info/", + + depositLearnHowPage: "/participate/deposit/learn-how", + depositSearchPage: "/participate/deposit/search", + altMetricsAPIURL: "https://api.altmetric.com/v1/doi/", + reCaptchaSiteKey: "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P", + b2noteAPIURL: "http://b2note-dev.bsc.es/" +}; diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 3612073..6320911 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,3 +1,121 @@ -export const environment = { - production: true +import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; + +export let properties: EnvProperties = { + environment: "production", + adminToolsPortalType: "aggregator", + dashboard: "explore", + enablePiwikTrack: true, + useCache: false, + useLongCache: true, + showAddThis: true, + metricsAPIURL: "https://services.openaire.eu/usagestats/", + framesAPIURL: "https://www.openaire.eu/stats3/", + statisticsAPIURL: "https://beta.services.openaire.eu/stats-api/", + statisticsFrameAPIURL: "https://www.openaire.eu/stats/", + statisticsFrameNewAPIURL: "https://services.openaire.eu/stats/", + useNewStatistisTool: false, + claimsAPIURL: "https://services.openaire.eu/claims/rest/claimsService/", + searchAPIURLLAst: "https://services.openaire.eu/search/v2/api/", + searchResourcesAPIURL: "https://services.openaire.eu/search/v2/api/resources", + openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=", + csvAPIURL: "https://services.openaire.eu/search/v2/api/reports", + searchCrossrefAPIURL: "https://api.crossref.org/works", + searchDataciteAPIURL: "https://api.datacite.org/works", + searchOrcidURL: "https://pub.orcid.org/v2.1/", + orcidURL: "https://orcid.org/", + doiURL: "https://dx.doi.org/", + pmcURL: "http://europepmc.org/articles/", + pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/", + handleURL: "http://hdl.handle.net/", + cordisURL: "http://cordis.europa.eu/projects/", + openDoarURL: "http://v2.sherpa.ac.uk/id/repository/", + r3DataURL: "http://service.re3data.org/repository/", + sherpaURL: "http://sherpa.ac.uk/romeo/issn/", + sherpaURLSuffix: "/", + zenodo: "https://zenodo.org/", + openAccess: "https://www.openaire.eu/support/faq#article-id-234", + openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310", + fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme", + h2020Guidlines: "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020", + ercGuidlines: "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf", + helpdesk: "https://www.openaire.eu/support/helpdesk", + helpdeskEmail: "helpdesk@openaire.eu", + utilsService: "https://explore.openaire.eu/utils-service", + + vocabulariesAPI: "https://services.openaire.eu/provision/mvc/vocabularies/", + + piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=", + piwikSiteId: "109", + loginUrl: "https://services.openaire.eu/uoa-user-management/openid_connect_login", + + userInfoUrl: " https://services.openaire.eu/uoa-user-management/api/users/getUserInfo?accessToken=", + + logoutUrl: "https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=", + + cookieDomain: ".openaire.eu", + + feedbackmail: "feedback@openaire.eu", + + cacheUrl: "https://explore.openaire.eu/cache/get?url=", + + datasourcesAPI: "https://services.openaire.eu/openaire/ds/search/", + + adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/", + + adminToolsCommunity: "openaire", + contextsAPI: "https://services.openaire.eu/openaire/context", + + communityAPI: "https://services.openaire.eu/openaire/community/", + + csvLimit: 2000, + pagingLimit: 20, + resultsPerPage: 10, + + "baseLink" : "/", + "domain": "https://explore.openaire.eu", + + searchLinkToResult: "/search/result?id=", + searchLinkToPublication: "/search/publication?articleId=", + searchLinkToProject: "/search/project?projectId=", + searchLinkToDataProvider: "/search/dataprovider?datasourceId=", + searchLinkToDataset: "/search/dataset?datasetId=", + searchLinkToSoftwareLanding: "/search/software?softwareId=", + searchLinkToOrp: "/search/other?orpId=", + searchLinkToOrganization: "/search/organization?organizationId=", + + searchLinkToPublications: "/search/find/publications", + searchLinkToDataProviders: "/search/find/dataproviders", + searchLinkToProjects: "/search/find/projects", + searchLinkToDatasets: "/search/find/datasets", + searchLinkToSoftware: "/search/find/software", + searchLinkToOrps: "/search/find/other", + searchLinkToOrganizations: "/search/find/organizations", + searchLinkToCompatibleDataProviders: "/search/content-providers", + searchLinkToEntityRegistriesDataProviders: "/search/entity-registries", + searchLinkToEntityRegistriesDataProvidersTable: "/search/entity-registries-table", + searchLinkToJournals: "/search/journals", + searchLinkToJournalsTable: "/search/journals-table", + searchLinkToResults: "/search/find/research-outcomes", + + searchLinkToAdvancedPublications: "/search/advanced/publications", + searchLinkToAdvancedProjects: "/search/advanced/projects", + searchLinkToAdvancedDatasets: "/search/advanced/datasets", + searchLinkToAdvancedSoftware: "/search/advanced/software", + searchLinkToAdvancedOrps: "/search/advanced/other", + searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders", + searchLinkToAdvancedOrganizations: "/search/advanced/organizations", + searchLinkToAdvancedResults: "/search/advanced/research-outcomes", + + lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows", + showLastIndexInformationLink: true, + widgetLink: "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", + claimsInformationLink: "https://www.openaire.eu/linking", + lastIndexUpdate: "2020-06-15", + indexInfoAPI: "https://services.openaire.eu/openaire/info/", + + depositLearnHowPage: "/participate/deposit/learn-how", + depositSearchPage: "/participate/deposit/search", + altMetricsAPIURL: "https://api.altmetric.com/v1/doi/", + reCaptchaSiteKey: "6LezhVIUAAAAAOb4nHDd87sckLhMXFDcHuKyS76P", + b2noteAPIURL: "http://b2note-dev.bsc.es/" }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index b7f639a..6eafdff 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -3,6 +3,122 @@ // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be found in `.angular-cli.json`. -export const environment = { - production: false +import {EnvProperties} from "../app/openaireLibrary/utils/properties/env-properties"; + +export let properties: EnvProperties = { + environment: "development", + adminToolsPortalType: "aggregator", + dashboard: "explore", + enablePiwikTrack: false, + useCache: true, + useLongCache: true, + showAddThis: true, + metricsAPIURL: "https://beta.services.openaire.eu/usagestats/", + framesAPIURL: "https://beta.openaire.eu/stats3/", + statisticsAPIURL: "http://vatopedi.di.uoa.gr:8080/stats/", + statisticsFrameAPIURL: "https://beta.openaire.eu/stats/", + statisticsFrameNewAPIURL: "https://stats.madgik.di.uoa.gr/stats-api/", + useNewStatistisTool: true, + claimsAPIURL: "http://dl170.madgik.di.uoa.gr:8180/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/", + searchAPIURLLAst: "http://beta.services.openaire.eu/search/v2/api/", + searchResourcesAPIURL: "https://beta.services.openaire.eu/search/v2/api/resources", + openCitationsAPIURL: "https://services.openaire.eu/opencitations/getCitations?id=", + csvAPIURL: "https://beta.services.openaire.eu/search/v2/api/reports", + searchCrossrefAPIURL: "https://api.crossref.org/works", + searchDataciteAPIURL: "https://api.datacite.org/works", + searchOrcidURL: "https://pub.orcid.org/v2.1/", + orcidURL: "https://orcid.org/", + doiURL: "https://dx.doi.org/", + pmcURL: "http://europepmc.org/articles/", + pmidURL: "https://www.ncbi.nlm.nih.gov/pubmed/", + handleURL: "http://hdl.handle.net/", + cordisURL: "http://cordis.europa.eu/projects/", + openDoarURL: "http://v2.sherpa.ac.uk/id/repository/", + r3DataURL: "http://service.re3data.org/repository/", + sherpaURL: "http://sherpa.ac.uk/romeo/issn/", + sherpaURLSuffix: "/", + zenodo: "https://zenodo.org/", + openAccess: "https://www.openaire.eu/support/faq#article-id-234", + openAccessRepo: "https://www.openaire.eu/support/faq#article-id-310", + fp7Guidlines: "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme", + h2020Guidlines: "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020", + ercGuidlines: "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf", + helpdesk: "https://www.openaire.eu/support/helpdesk", + helpdeskEmail: "helpdesk@openaire.eu", + utilsService: "http://dl170.madgik.di.uoa.gr:8000", + + vocabulariesAPI: "https://dev-openaire.d4science.org/provision/mvc/vocabularies/", + + piwikBaseUrl: "https://analytics.openaire.eu/piwik.php?idsite=", + piwikSiteId: "6", + loginUrl: "http://dl170.madgik.di.uoa.gr:8180/dnet-login/openid_connect_login", + + userInfoUrl: "http://dl170.madgik.di.uoa.gr:8180/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=", + + logoutUrl: "https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=", + + cookieDomain: ".di.uoa.gr", + + feedbackmail: "kostis30fylloy@gmail.com", + + cacheUrl: "http://dl170.madgik.di.uoa.gr:3000/get?url=", + + adminToolsAPIURL: "http://duffy.di.uoa.gr:8080/uoa-admin-tools/", + + adminToolsCommunity: "openaire", + datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/search/", + contextsAPI: "https://dev-openaire.d4science.org/openaire/context", + communityAPI: "https://dev-openaire.d4science.org/openaire/community/", + + csvLimit: 2000, + pagingLimit: 20, + resultsPerPage: 10, + + "baseLink" : "", + "domain": "https://beta.explore.openaire.eu", + + searchLinkToResult: "/search/result?id=", + searchLinkToPublication: "/search/publication?articleId=", + searchLinkToProject: "/search/project?projectId=", + searchLinkToDataProvider: "/search/dataprovider?datasourceId=", + searchLinkToDataset: "/search/dataset?datasetId=", + searchLinkToSoftwareLanding: "/search/software?softwareId=", + searchLinkToOrp: "/search/other?orpId=", + searchLinkToOrganization: "/search/organization?organizationId=", + + searchLinkToPublications: "/search/find/publications", + searchLinkToDataProviders: "/search/find/dataproviders", + searchLinkToProjects: "/search/find/projects", + searchLinkToDatasets: "/search/find/datasets", + searchLinkToSoftware: "/search/find/software", + searchLinkToOrps: "/search/find/other", + searchLinkToOrganizations: "/search/find/organizations", + searchLinkToCompatibleDataProviders: "/search/content-providers", + searchLinkToEntityRegistriesDataProviders: "/search/entity-registries", + searchLinkToEntityRegistriesDataProvidersTable: "/search/entity-registries-table", + searchLinkToJournals: "/search/journals", + searchLinkToJournalsTable: "/search/journals-table", + searchLinkToResults: "/search/find/research-outcomes", + + searchLinkToAdvancedPublications: "/search/advanced/publications", + searchLinkToAdvancedProjects: "/search/advanced/projects", + searchLinkToAdvancedDatasets: "/search/advanced/datasets", + searchLinkToAdvancedSoftware: "/search/advanced/software", + searchLinkToAdvancedOrps: "/search/advanced/other", + searchLinkToAdvancedDataProviders: "/search/advanced/dataproviders", + searchLinkToAdvancedOrganizations: "/search/advanced/organizations", + searchLinkToAdvancedResults: "/search/advanced/research-outcomes", + + lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows", + showLastIndexInformationLink: true, + widgetLink: "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=", + claimsInformationLink: "https://www.openaire.eu/linking-beta", + lastIndexUpdate: "2019-11-01", + indexInfoAPI: "https://beta.services.openaire.eu/openaire/info/", + + depositLearnHowPage: "/participate/deposit/learn-how", + depositSearchPage: "/participate/deposit/search", + altMetricsAPIURL: "https://api.altmetric.com/v1/doi/", + reCaptchaSiteKey: "6LcVtFIUAAAAAB2ac6xYivHxYXKoUvYRPi-6_rLu", + b2noteAPIURL: "http://b2note-dev.bsc.es/" }; diff --git a/src/index.html b/src/index.html index 1839007..ce4c1a4 100644 --- a/src/index.html +++ b/src/index.html @@ -1,5 +1,5 @@ - + @@ -20,10 +20,7 @@ - - - - + @@ -44,52 +41,6 @@ Search OpenAIRE - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -106,9 +57,5 @@ $(document).ready(function(){ }; - - - - diff --git a/src/main.ts b/src/main.ts index 9e8c381..1054b60 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,9 +2,9 @@ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; +import {portalProperties} from "./environments/environment-aggregator"; -if (environment.production) { +if (portalProperties.production) { enableProdMode(); } diff --git a/src/styles.css b/src/styles.css index 1927393..403d0a9 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,2 +1,8 @@ /* You can add global styles to this file, and also import other style files */ @import '~@angular/material/prebuilt-themes/indigo-pink.css'; + + +@import "assets/common-assets/common/theme.css"; +@import "assets/common-assets/common/custom.css"; +@import "assets/common-assets/library.css"; +@import "assets/portal-custom.css";