openaire-library/app-routing.module.ts

94 lines
8.1 KiB
TypeScript

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {IsRouteEnabled} from './error/isRouteEnabled.guard';
import {EnvironmentSpecificResolver} from './utils/properties/environmentSpecificResolver';
import { EnvironmentSpecificService } from './utils/properties/environment-specific.service';
import { ErrorPageComponent } from './error/errorPage.component';
import {SearchComponent} from './searchPages/find/search.component';
import {ResultLandingComponent} from "./landingPages/result/resultLanding.component";
import {DataProviderComponent} from './landingPages/dataProvider/dataProvider.component';
import {ProjectComponent} from './landingPages/project/project.component';
import {OrganizationComponent} from './landingPages/organization/organization.component';
import {SearchResearchResultsComponent} from './searchPages/simple/searchResearchResults.component';
import {SearchDataprovidersComponent} from './searchPages/simple/searchDataproviders.component';
import {SearchProjectsComponent} from './searchPages/simple/searchProjects.component';
import {SearchOrganizationsComponent} from './searchPages/simple/searchOrganizations.component';
import {AdvancedSearchResearchResultsComponent} from './searchPages/advanced/advancedSearchResearchResults.component';
import {AdvancedSearchDataProvidersComponent} from './searchPages/advanced/advancedSearchDataProviders.component';
import {AdvancedSearchProjectsComponent} from './searchPages/advanced/advancedSearchProjects.component';
import {AdvancedSearchOrganizationsComponent} from './searchPages/advanced/advancedSearchOrganizations.component';
import {SearchEntityRegistriesComponent} from './searchPages/dataProviders/entityRegistries.component';
import {SearchEntityRegistriesTableComponent} from './searchPages/dataProviders/entityRegistriesTable.component';
import {SearchJournalsTableComponent} from './searchPages/dataProviders/journalsTable.component';
import {SearchJournalsComponent} from './searchPages/dataProviders/journals.component';
import {SearchCompatibleDataprovidersComponent} from './searchPages/dataProviders/compatibleDataProviders.component';
import {SearchCompatibleDataprovidersTableComponent} from './searchPages/dataProviders/compatibleDataProvidersTable.component';
import {ClaimsAdminComponent} from './claims/claimsAdmin/claimsAdmin.component';
import {MyClaimsComponent} from './claims/myClaims/myClaims.component';
import {ClaimsByTokenComponent} from './claims/claimsByToken/claimsByToken.component';
import {DirectLinkingComponent} from './claims/directLinking/directLinking.component';
import {LinkingGenericComponent} from './claims/linking/linkingGeneric.component';
import{ HtmlProjectReportComponent} from './landingPages/htmlProjectReport/htmlProjectReport.component';
const routes: Routes = [
{ path: '', component: SearchComponent, resolve: { envSpecific: EnvironmentSpecificResolver }, canActivate: [ ]},
{ path: 'home', component: SearchComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/publication', component: ResultLandingComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/dataset', component: ResultLandingComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/software', component: ResultLandingComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/other', component: ResultLandingComponent, resolve: { envSpecific: EnvironmentSpecificResolver }},
{ path: 'search/project', component: ProjectComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/dataprovider', component: DataProviderComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/organization', component: OrganizationComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/find', component: SearchComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/find/publications', component: SearchResearchResultsComponent , resolve: { envSpecific: EnvironmentSpecificResolver }, canActivate: [ ] },
{ path: 'search/find/datasets', component:SearchResearchResultsComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/find/software', component:SearchResearchResultsComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/find/other', component:SearchResearchResultsComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/find/projects', component:SearchProjectsComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/find/dataproviders', component:SearchDataprovidersComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/find/organizations', component:SearchOrganizationsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/content-providers', component: SearchCompatibleDataprovidersComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/content-providers-table', component: SearchCompatibleDataprovidersTableComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/entity-registries',component: SearchEntityRegistriesComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/entity-registries-table', component: SearchEntityRegistriesTableComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/journals', component: SearchJournalsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/journals-table', component: SearchJournalsTableComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/advanced/publications', component: AdvancedSearchResearchResultsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/advanced/datasets', component: AdvancedSearchResearchResultsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/advanced/software', component: AdvancedSearchResearchResultsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/advanced/other', component: AdvancedSearchResearchResultsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/advanced/organizations',component: AdvancedSearchOrganizationsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/advanced/dataproviders', component: AdvancedSearchDataProvidersComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/advanced/projects', component: AdvancedSearchProjectsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'project-report', component: HtmlProjectReportComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'myclaims',component: MyClaimsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'claims', component: ClaimsAdminComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'participate/claim', component: LinkingGenericComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'participate/direct-claim',component: DirectLinkingComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'claims-project-manager', component: ClaimsByTokenComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'reload', loadChildren: './reload/reload.module#ReloadModule' , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'user-info', loadChildren: './login/user.module#UserModule' , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'error', component: ErrorPageComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: '**',pathMatch: 'full',component: ErrorPageComponent }
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
providers: [EnvironmentSpecificResolver, EnvironmentSpecificService, IsRouteEnabled]
})
export class AppRoutingModule { }