1
|
import { NgModule } from '@angular/core';
|
2
|
import { Routes, RouterModule } from '@angular/router';
|
3
|
|
4
|
import { EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver';
|
5
|
import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
|
6
|
|
7
|
import { OpenaireErrorPageComponent } from './error/errorPage.component';
|
8
|
import {PageURLResolverComponent} from "./openaireLibrary/utils/pageURLResolver.component";
|
9
|
import {IsCommunity} from "./openaireLibrary/connect/communityGuard/isCommunity.guard";
|
10
|
|
11
|
const routes: Routes = [
|
12
|
// Other Pages
|
13
|
{ path: '', loadChildren: './communitywrapper/communityWrapper.module#CommunityWrapperModule'},
|
14
|
|
15
|
{ path: 'about', redirectTo: 'about/learn-how', pathMatch: 'full'},
|
16
|
{ path: 'about/learn-how', loadChildren: './learn-how/learn-how.module#LearnHowModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
17
|
{ path: 'about/learn-in-depth', loadChildren: './learn-how/learnInDepth/learn-in-depth.module#LearnInDepthModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
18
|
{ path: 'about/faq', loadChildren: './learn-how/faqs/faqs.module#FaqsModule', resolve: { envSpecific: EnvironmentSpecificResolver }},
|
19
|
{ path: 'contact-us', loadChildren: './contact/contact.module#ContactModule'},
|
20
|
{ path: 'invite', loadChildren: './utils/subscribe/invite/invite.module#InviteModule'},
|
21
|
{ path: 'content', loadChildren: './content/contentPage.module#ContentPageModule', canActivate:[IsCommunity]},
|
22
|
{ path: 'organizations', loadChildren: './htmlPages/organizations/organizationsPage.module#OrganizationsPageModule', canActivate:[IsCommunity]},
|
23
|
{ path: 'publications', loadChildren: './htmlPages/publications/publications-page.module#PublicationsPageModule', canActivate:[IsCommunity]},
|
24
|
{ path: 'projects', loadChildren: './htmlPages/projects/projectsPage.module#ProjectsPageModule', canActivate:[IsCommunity]},
|
25
|
{ path: 'national-bulletins', loadChildren: './htmlPages/nationalBulletins/nationalBulletinsPage.module#NaionalBulletinPageModule', canActivate:[IsCommunity]},
|
26
|
{ path: 'curators', loadChildren: './curators/curators.module#CuratorsModule', canActivate:[IsCommunity]},
|
27
|
{ path: 'subjects', loadChildren: './subjects/subjects.module#SubjectsModule', canActivate:[IsCommunity]},
|
28
|
|
29
|
{ path: 'myCommunities', loadChildren: './my-communities/my-communities.module#MyCommunitiesModule'},
|
30
|
|
31
|
// Testing Page for help contents
|
32
|
{ path: 'helper-test', loadChildren: './helper-test/helper-test.module#HelperTestModule'},
|
33
|
|
34
|
// Landing Pages
|
35
|
{ path: 'search/result', loadChildren: './landingPages/result/libResult.module#LibResultModule', canActivate:[IsCommunity]},
|
36
|
{ path: 'search/publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule', canActivate:[IsCommunity]},
|
37
|
{ path: 'search/dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule', canActivate:[IsCommunity]},
|
38
|
{ path: 'search/software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule', canActivate:[IsCommunity]},
|
39
|
{ path: 'search/other', loadChildren: './landingPages/orp/libOrp.module#LibOrpModule', canActivate:[IsCommunity]},
|
40
|
{ path: 'search/project', loadChildren: './landingPages/project/libProject.module#LibProjectModule', canActivate:[IsCommunity]},
|
41
|
{ path: 'search/dataprovider', loadChildren: '././landingPages/dataProvider/libDataProvider.module#LibDataProviderModule', canActivate:[IsCommunity]},
|
42
|
{ path: 'search/organization', loadChildren: './landingPages/organization/libOrganization.module#LibOrganizationModule', canActivate:[IsCommunity]},
|
43
|
|
44
|
{ path: 'project-report', loadChildren: './landingPages/htmlProjectReport/libHtmlProjectReport.module#LibHtmlProjectReportModule'},
|
45
|
|
46
|
// Search Pages
|
47
|
{ path: 'search/find', redirectTo: 'search/find/research-outcomes', pathMatch: 'full'},
|
48
|
|
49
|
{ path: 'search/find/communities', loadChildren: './searchPages/communities/searchCommunities.module#SearchCommunitiesModule'},
|
50
|
{ path: 'search/find/research-outcomes', loadChildren: './searchPages/simple/searchResearchResults.module#OpenaireSearchResearchResultsModule', canActivate:[IsCommunity]},
|
51
|
{ path: 'search/find/publications', component: PageURLResolverComponent, canActivate:[IsCommunity]},
|
52
|
{ path: 'search/find/datasets', component: PageURLResolverComponent, canActivate:[IsCommunity]},
|
53
|
{ path: 'search/find/software', component: PageURLResolverComponent, canActivate:[IsCommunity]},
|
54
|
{ path: 'search/find/other', component: PageURLResolverComponent, canActivate:[IsCommunity]},
|
55
|
{ path: 'search/find/projects', loadChildren: './searchPages/simple/searchProjects.module#LibSearchProjectsModule', canActivate:[IsCommunity]},
|
56
|
{ path: 'search/find/dataproviders', loadChildren: './searchPages/simple/searchDataProviders.module#LibSearchDataProvidersModule', canActivate:[IsCommunity]},
|
57
|
|
58
|
// Advanced Search Pages
|
59
|
{ path: 'search/advanced/research-outcomes', loadChildren: './searchPages/advanced/searchResearchResults.module#OpenaireAdvancedSearchResearchResultsModule', canActivate:[IsCommunity]},
|
60
|
{ path: 'search/advanced/publications', component: PageURLResolverComponent, canActivate:[IsCommunity]},
|
61
|
{ path: 'search/advanced/datasets', component: PageURLResolverComponent, canActivate:[IsCommunity]},
|
62
|
{ path: 'search/advanced/software', component: PageURLResolverComponent, canActivate:[IsCommunity]},
|
63
|
{ path: 'search/advanced/other', component: PageURLResolverComponent, canActivate:[IsCommunity]},
|
64
|
{ path: 'search/advanced/organizations', loadChildren: './searchPages/advanced/advancedSearchOrganizations.module#LibAdvancedSearchOrganizationsModule', canActivate:[IsCommunity]},
|
65
|
{ path: 'search/advanced/dataproviders', loadChildren: './searchPages/advanced/advancedSearchDataProviders.module#LibAdvancedSearchDataProvidersModule', canActivate:[IsCommunity]},
|
66
|
{ path: 'search/advanced/projects', loadChildren: './searchPages/advanced/advancedSearchProjects.module#LibAdvancedSearchProjectsModule', canActivate:[IsCommunity]},
|
67
|
|
68
|
// Deposit Pages
|
69
|
{ path: 'participate/deposit-datasets', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full', canActivate:[IsCommunity]},
|
70
|
{ path: 'participate/deposit-datasets-result', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full', canActivate:[IsCommunity]},
|
71
|
{ path: 'participate/deposit-subject-result', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full', canActivate:[IsCommunity]},
|
72
|
{ path: 'participate/deposit-publications', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full', canActivate:[IsCommunity]},
|
73
|
{ path: 'participate/deposit-publications-result', redirectTo: 'participate/deposit/learn-how', pathMatch: 'full', canActivate:[IsCommunity]},
|
74
|
{ path: 'participate/share-zenodo', redirectTo: '/participate/deposit/zenodo', pathMatch: 'full', canActivate:[IsCommunity]},
|
75
|
|
76
|
{ path: 'participate/deposit/learn-how', loadChildren: './deposit/deposit.module#LibDepositModule', canActivate:[IsCommunity]},
|
77
|
{ path: 'participate/deposit/search', loadChildren: './deposit/searchDataprovidersToDeposit.module#LibSearchDataprovidersToDepositModule', canActivate:[IsCommunity]},
|
78
|
{ path: 'participate/deposit/zenodo', loadChildren: './deposit/zenodo/shareInZenodo.module#ShareInZenodoModule', canActivate:[IsCommunity]},
|
79
|
|
80
|
// Linking Pages
|
81
|
{ path: 'myclaims', loadChildren: './claims/myClaims/myClaims.module#LibMyClaimsModule', canActivate:[IsCommunity]},
|
82
|
{ path: 'participate/claim', loadChildren: './claims/linking/linkingGeneric.module#LibLinkingGenericModule', canActivate:[IsCommunity]},
|
83
|
{ path: 'participate/direct-claim', loadChildren: './claims/directLinking/directLinking.module#LibDirectLinkingModule', canActivate:[IsCommunity]},
|
84
|
|
85
|
|
86
|
// help pages - do not exist in Admin portal/api/db
|
87
|
{ path: 'reload', loadChildren: './reload/libReload.module#LibReloadModule'},
|
88
|
{ path: 'user-info', loadChildren: './login/libUser.module#LibUserModule'},
|
89
|
{ path: 'error', component: OpenaireErrorPageComponent},
|
90
|
{ path: 'theme', loadChildren: './openaireLibrary/utils/theme/theme.module#ThemeModule'},
|
91
|
{ path: '**',pathMatch: 'full',component: OpenaireErrorPageComponent}
|
92
|
];
|
93
|
|
94
|
@NgModule({
|
95
|
imports: [RouterModule.forRoot(routes)],
|
96
|
exports: [RouterModule],
|
97
|
providers: [EnvironmentSpecificResolver, EnvironmentSpecificService]
|
98
|
})
|
99
|
export class AppRoutingModule { }
|