openaire-library/app-routing.module.ts

108 lines
9.4 KiB
TypeScript
Raw Normal View History

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 {PublicationComponent} from './landingPages/publication/publication.component';
import {DatasetComponent} from './landingPages/dataset/dataset.component';
import {SoftwareComponent} from './landingPages/software/software.component';
import {DataProviderComponent} from './landingPages/dataProvider/dataProvider.component';
import {ProjectComponent} from './landingPages/project/project.component';
import {OrganizationComponent} from './landingPages/organization/organization.component';
import {DepositDatasetsComponent} from './deposit/datasets/depositDatasets.component';
import {DepositDatasetsResultComponent} from './deposit/datasets/depositDatasetsResult.component';
import {DepositBySubjectResultComponent} from './deposit/datasets/depositBySubjectResult.component';
import {DepositPublicationsComponent} from './deposit/publications/depositPublications.component';
import {DepositPublicationsResultComponent} from './deposit/publications/depositPublicationsResult.component';
import {SearchDatasetsComponent} from './searchPages/simple/searchDatasets.component';
import {SearchPublicationsComponent} from './searchPages/simple/searchPublications.component';
import {SearchSoftwareComponent} from './searchPages/simple/searchSoftware.component';
import {SearchDataprovidersComponent} from './searchPages/simple/searchDataproviders.component';
import {SearchProjectsComponent} from './searchPages/simple/searchProjects.component';
import {SearchOrganizationsComponent} from './searchPages/simple/searchOrganizations.component';
import {AdvancedSearchPublicationsComponent} from './searchPages/advanced/advancedSearchPublications.component';
import {AdvancedSearchDatasetsComponent} from './searchPages/advanced/advancedSearchDatasets.component';
import {AdvancedSearchSoftwareComponent} from './searchPages/advanced/advancedSearchSoftware.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: PublicationComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/dataset', component: DatasetComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/software', component: SoftwareComponent, 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: 'participate/deposit-datasets', component: DepositDatasetsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'participate/deposit-datasets-result', component: DepositDatasetsResultComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'participate/deposit-subject-result', component: DepositBySubjectResultComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'participate/deposit-publications', component: DepositPublicationsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'participate/deposit-publications-result', component: DepositPublicationsResultComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/find', component: SearchComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/find/publications', component: SearchPublicationsComponent , resolve: { envSpecific: EnvironmentSpecificResolver }, canActivate: [ ] },
{ path: 'search/find/datasets', component:SearchDatasetsComponent, resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/find/software', component:SearchSoftwareComponent, 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: AdvancedSearchPublicationsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/advanced/datasets', component: AdvancedSearchDatasetsComponent , resolve: { envSpecific: EnvironmentSpecificResolver } },
{ path: 'search/advanced/software', component: AdvancedSearchSoftwareComponent , 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 { }