diff --git a/explore/src/app/app-routing.module.ts b/explore/src/app/app-routing.module.ts index a477d550..0256c2db 100644 --- a/explore/src/app/app-routing.module.ts +++ b/explore/src/app/app-routing.module.ts @@ -27,6 +27,7 @@ const routes: Routes = [ // Search Pages { path: 'search/find', loadChildren: './searchPages/find/libSearch.module#LibMainSearchModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + { path: 'search/find/research-results', loadChildren: './searchPages/simple/searchResearchResults.module#OpenaireSearchResearchResultsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/find/publications', loadChildren: './searchPages/simple/searchPublications.module#LibSearchPublicationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, { path: 'search/find/datasets', loadChildren: './searchPages/simple/searchDatasets.module#LibSearchDatasetsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, @@ -37,6 +38,8 @@ const routes: Routes = [ { path: 'search/find/organizations', loadChildren: './searchPages/simple/searchOrganizations.module#LibSearchOrganizationsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, // Advanced Search Pages + { path: 'search/advanced/research-results', loadChildren: './searchPages/advanced/searchResearchResults.module#OpenaireAdvancedSearchResearchResultsModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, + { 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 }}, diff --git a/explore/src/app/app.component.ts b/explore/src/app/app.component.ts index f1bf8aaa..9c2750d2 100644 --- a/explore/src/app/app.component.ts +++ b/explore/src/app/app.component.ts @@ -124,6 +124,9 @@ export class AppComponent { new MenuItem("", "Browse all", "", "/search/find/dataproviders", false, ["datasource"], ["/search/find/dataproviders"], {})] } ]; + if(this.properties.environment == "development"){ + this.menuItems[0].items.push(new MenuItem("", "Research outcomes", "", "/search/find/research-results", false, [], [], {})) + } if (Session.isPortalAdministrator(this.user)) { this.userMenuItems.push(new MenuItem("", "Manage all links", "", "/claims", false, [], ["/claims"], {})); this.userMenuItems.push(new MenuItem("", "Manage helptexts", diff --git a/explore/src/app/searchPages/advanced/searchResearchResults-routing.module.ts b/explore/src/app/searchPages/advanced/searchResearchResults-routing.module.ts new file mode 100644 index 00000000..5a75fc79 --- /dev/null +++ b/explore/src/app/searchPages/advanced/searchResearchResults-routing.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; + +import{OpenaireSearchResearchResultsComponent} from './searchResearchResults.component'; +import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' + + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireSearchResearchResultsComponent, canActivate: [FreeGuard], data: { + redirect: '/error', community : 'openaire' + }, canDeactivate: [PreviousRouteRecorder] } + + ]) + ] +}) +export class SearchResearchResultsRoutingModule { } diff --git a/explore/src/app/searchPages/advanced/searchResearchResults.component.ts b/explore/src/app/searchPages/advanced/searchResearchResults.component.ts new file mode 100644 index 00000000..abac4593 --- /dev/null +++ b/explore/src/app/searchPages/advanced/searchResearchResults.component.ts @@ -0,0 +1,13 @@ +import {Component, Input} from '@angular/core'; + +@Component({ + selector: 'openaire-search-results', + template: ` + + ` + +}) +export class OpenaireSearchResearchResultsComponent { + @Input() searchLink: string = "/search/advanced/research-results"; + +} diff --git a/explore/src/app/searchPages/advanced/searchResearchResults.module.ts b/explore/src/app/searchPages/advanced/searchResearchResults.module.ts new file mode 100644 index 00000000..f4953976 --- /dev/null +++ b/explore/src/app/searchPages/advanced/searchResearchResults.module.ts @@ -0,0 +1,27 @@ +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 {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' +import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/searchResearchResults.module"; + +@NgModule({ + imports: [ + CommonModule, FormsModule, + SearchResearchResultsRoutingModule, SearchResearchResultsModule + + ], + declarations: [ + OpenaireSearchResearchResultsComponent + ], + providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled], + exports: [ + OpenaireSearchResearchResultsComponent + ] +}) +export class OpenaireAdvancedSearchResearchResultsModule { } diff --git a/explore/src/app/searchPages/simple/searchResearchResults-routing.module.ts b/explore/src/app/searchPages/simple/searchResearchResults-routing.module.ts new file mode 100644 index 00000000..5a75fc79 --- /dev/null +++ b/explore/src/app/searchPages/simple/searchResearchResults-routing.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { RouterModule } from '@angular/router'; + +import{OpenaireSearchResearchResultsComponent} from './searchResearchResults.component'; +import {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' + + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', component: OpenaireSearchResearchResultsComponent, canActivate: [FreeGuard], data: { + redirect: '/error', community : 'openaire' + }, canDeactivate: [PreviousRouteRecorder] } + + ]) + ] +}) +export class SearchResearchResultsRoutingModule { } diff --git a/explore/src/app/searchPages/simple/searchResearchResults.component.ts b/explore/src/app/searchPages/simple/searchResearchResults.component.ts new file mode 100644 index 00000000..d230cefa --- /dev/null +++ b/explore/src/app/searchPages/simple/searchResearchResults.component.ts @@ -0,0 +1,13 @@ +import {Component, Input} from '@angular/core'; + +@Component({ + selector: 'openaire-search-results', + template: ` + + ` + +}) +export class OpenaireSearchResearchResultsComponent { + @Input() searchLink: string = "/search/research-results"; + +} diff --git a/explore/src/app/searchPages/simple/searchResearchResults.module.ts b/explore/src/app/searchPages/simple/searchResearchResults.module.ts new file mode 100644 index 00000000..41765a52 --- /dev/null +++ b/explore/src/app/searchPages/simple/searchResearchResults.module.ts @@ -0,0 +1,27 @@ +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 {FreeGuard} from '../../openaireLibrary/login/freeGuard.guard'; +import {PreviousRouteRecorder} from '../../openaireLibrary/utils/piwik/previousRouteRecorder.guard'; +import {IsRouteEnabled} from '../../openaireLibrary/error/isRouteEnabled.guard' +import {SearchResearchResultsModule} from "../../openaireLibrary/searchPages/searchResearchResults.module"; + +@NgModule({ + imports: [ + CommonModule, FormsModule, + SearchResearchResultsRoutingModule, SearchResearchResultsModule + + ], + declarations: [ + OpenaireSearchResearchResultsComponent + ], + providers:[FreeGuard,PreviousRouteRecorder, IsRouteEnabled], + exports: [ + OpenaireSearchResearchResultsComponent + ] +}) +export class OpenaireSearchResearchResultsModule { } diff --git a/explore/src/assets/env-properties.json b/explore/src/assets/env-properties.json index 0e26a217..ccdf0c37 100644 --- a/explore/src/assets/env-properties.json +++ b/explore/src/assets/env-properties.json @@ -78,6 +78,7 @@ "searchLinkToEntityRegistriesDataProvidersTable" : "/search/entity-registries-table", "searchLinkToJournals" : "/search/journals", "searchLinkToJournalsTable" : "/search/journals-table", + "searchLinkToResults" : "/search/find/research-results", "searchLinkToAdvancedPublications" : "/search/advanced/publications", "searchLinkToAdvancedProjects" : "/search/advanced/projects", @@ -86,6 +87,8 @@ "searchLinkToAdvancedOrps" : "/search/advanced/other", "searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders", "searchLinkToAdvancedOrganizations" : "/search/advanced/organizations", + "searchLinkToAdvancedResults" : "/search/advanced/research-results", + "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=",