1
|
import {NgModule} from '@angular/core';
|
2
|
import { RouterModule, Routes} from '@angular/router';
|
3
|
import {OpenaireErrorPageComponent} from './error/errorPage.component';
|
4
|
import {PageURLResolverComponent} from "./openaireLibrary/utils/pageURLResolver.component";
|
5
|
import {IsCommunity} from "./openaireLibrary/connect/communityGuard/isCommunity.guard";
|
6
|
|
7
|
const routes: Routes = [
|
8
|
// ORCID Pages
|
9
|
{path: 'orcid', loadChildren: './orcid/orcid.module#LibOrcidModule'},
|
10
|
{path: 'my-orcid-links', loadChildren: './orcid/my-orcid-links/myOrcidLinks.module#LibMyOrcidLinksModule'},
|
11
|
|
12
|
/** Other Pages */
|
13
|
{path: '', loadChildren: './communitywrapper/communityWrapper.module#CommunityWrapperModule'},
|
14
|
{path: 'about', redirectTo: 'about/learn-how', pathMatch: 'full'},
|
15
|
{path: 'about/learn-how', loadChildren: './learn-how/learn-how.module#LearnHowModule'},
|
16
|
{path: 'about/learn-in-depth', loadChildren: './learn-how/learnInDepth/learn-in-depth.module#LearnInDepthModule'},
|
17
|
{path: 'about/faq', loadChildren: './learn-how/faqs/faqs.module#FaqsModule'},
|
18
|
{path: 'contact-us', loadChildren: './contact/contact.module#ContactModule'},
|
19
|
{path: 'invite', loadChildren: './utils/subscribe/invite/invite.module#InviteModule'},
|
20
|
{path: 'content', loadChildren: './content/contentPage.module#ContentPageModule', canActivate: [IsCommunity]},
|
21
|
{
|
22
|
path: 'organizations',
|
23
|
loadChildren: './htmlPages/organizations/organizationsPage.module#OrganizationsPageModule',
|
24
|
canActivate: [IsCommunity]
|
25
|
},
|
26
|
{
|
27
|
path: 'publications',
|
28
|
loadChildren: './htmlPages/publications/publications-page.module#PublicationsPageModule',
|
29
|
canActivate: [IsCommunity]
|
30
|
},
|
31
|
{
|
32
|
path: 'projects',
|
33
|
loadChildren: './htmlPages/projects/projectsPage.module#ProjectsPageModule',
|
34
|
canActivate: [IsCommunity]
|
35
|
},
|
36
|
{
|
37
|
path: 'national-bulletins',
|
38
|
loadChildren: './htmlPages/nationalBulletins/nationalBulletinsPage.module#NaionalBulletinPageModule',
|
39
|
canActivate: [IsCommunity]
|
40
|
},
|
41
|
{path: 'curators', loadChildren: './curators/curators.module#CuratorsModule', canActivate: [IsCommunity]},
|
42
|
{path: 'subjects', loadChildren: './subjects/subjects.module#SubjectsModule', canActivate: [IsCommunity]},
|
43
|
{path: 'myCommunities', loadChildren: './my-communities/my-communities.module#MyCommunitiesModule'},
|
44
|
/** Testing Page for help contents */
|
45
|
{path: 'helper-test', loadChildren: './helper-test/helper-test.module#HelperTestModule'},
|
46
|
/** Landing Pages */
|
47
|
{
|
48
|
path: 'search/result',
|
49
|
loadChildren: './landingPages/result/libResult.module#LibResultModule',
|
50
|
canActivate: [IsCommunity]
|
51
|
},
|
52
|
{
|
53
|
path: 'search/publication',
|
54
|
loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule',
|
55
|
canActivate: [IsCommunity]
|
56
|
},
|
57
|
{
|
58
|
path: 'search/dataset',
|
59
|
loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule',
|
60
|
canActivate: [IsCommunity]
|
61
|
},
|
62
|
{
|
63
|
path: 'search/software',
|
64
|
loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule',
|
65
|
canActivate: [IsCommunity]
|
66
|
},
|
67
|
{path: 'search/other', loadChildren: './landingPages/orp/libOrp.module#LibOrpModule', canActivate: [IsCommunity]},
|
68
|
{
|
69
|
path: 'search/project',
|
70
|
loadChildren: './landingPages/project/libProject.module#LibProjectModule',
|
71
|
canActivate: [IsCommunity]
|
72
|
},
|
73
|
{
|
74
|
path: 'search/dataprovider',
|
75
|
loadChildren: '././landingPages/dataProvider/libDataProvider.module#LibDataProviderModule',
|
76
|
canActivate: [IsCommunity]
|
77
|
},
|
78
|
{
|
79
|
path: 'search/organization',
|
80
|
loadChildren: './landingPages/organization/libOrganization.module#LibOrganizationModule',
|
81
|
canActivate: [IsCommunity]
|
82
|
},
|
83
|
{
|
84
|
path: 'project-report',
|
85
|
loadChildren: './landingPages/htmlProjectReport/libHtmlProjectReport.module#LibHtmlProjectReportModule'
|
86
|
},
|
87
|
/** Search Pages */
|
88
|
{path: 'search/find', redirectTo: 'search/find/research-outcomes', pathMatch: 'full'},
|
89
|
|
90
|
{
|
91
|
path: 'search/find/communities',
|
92
|
loadChildren: './searchPages/communities/searchCommunities.module#SearchCommunitiesModule'
|
93
|
},
|
94
|
{
|
95
|
path: 'search/find/research-outcomes',
|
96
|
loadChildren: './searchPages/simple/searchResearchResults.module#OpenaireSearchResearchResultsModule',
|
97
|
canActivate: [IsCommunity]
|
98
|
},
|
99
|
{path: 'search/find/publications', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
100
|
{path: 'search/find/datasets', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
101
|
{path: 'search/find/software', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
102
|
{path: 'search/find/other', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
103
|
{
|
104
|
path: 'search/find/projects',
|
105
|
loadChildren: './searchPages/simple/searchProjects.module#LibSearchProjectsModule',
|
106
|
canActivate: [IsCommunity]
|
107
|
},
|
108
|
{
|
109
|
path: 'search/find/dataproviders',
|
110
|
loadChildren: './searchPages/simple/searchDataProviders.module#LibSearchDataProvidersModule',
|
111
|
canActivate: [IsCommunity]
|
112
|
},
|
113
|
/** Advanced Search Pages */
|
114
|
{
|
115
|
path: 'search/advanced/research-outcomes',
|
116
|
loadChildren: './searchPages/advanced/searchResearchResults.module#OpenaireAdvancedSearchResearchResultsModule',
|
117
|
canActivate: [IsCommunity]
|
118
|
},
|
119
|
{path: 'search/advanced/publications', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
120
|
{path: 'search/advanced/datasets', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
121
|
{path: 'search/advanced/software', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
122
|
{path: 'search/advanced/other', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
123
|
{
|
124
|
path: 'search/advanced/organizations',
|
125
|
loadChildren: './searchPages/advanced/advancedSearchOrganizations.module#LibAdvancedSearchOrganizationsModule',
|
126
|
canActivate: [IsCommunity]
|
127
|
},
|
128
|
{
|
129
|
path: 'search/advanced/dataproviders',
|
130
|
loadChildren: './searchPages/advanced/advancedSearchDataProviders.module#LibAdvancedSearchDataProvidersModule',
|
131
|
canActivate: [IsCommunity]
|
132
|
},
|
133
|
{
|
134
|
path: 'search/advanced/projects',
|
135
|
loadChildren: './searchPages/advanced/advancedSearchProjects.module#LibAdvancedSearchProjectsModule',
|
136
|
canActivate: [IsCommunity]
|
137
|
},
|
138
|
/** Deposit Pages */
|
139
|
{
|
140
|
path: 'participate/deposit-datasets',
|
141
|
redirectTo: 'participate/deposit/learn-how',
|
142
|
pathMatch: 'full',
|
143
|
canActivate: [IsCommunity]
|
144
|
},
|
145
|
{
|
146
|
path: 'participate/deposit-datasets-result',
|
147
|
redirectTo: 'participate/deposit/learn-how',
|
148
|
pathMatch: 'full',
|
149
|
canActivate: [IsCommunity]
|
150
|
},
|
151
|
{
|
152
|
path: 'participate/deposit-subject-result',
|
153
|
redirectTo: 'participate/deposit/learn-how',
|
154
|
pathMatch: 'full',
|
155
|
canActivate: [IsCommunity]
|
156
|
},
|
157
|
{
|
158
|
path: 'participate/deposit-publications',
|
159
|
redirectTo: 'participate/deposit/learn-how',
|
160
|
pathMatch: 'full',
|
161
|
canActivate: [IsCommunity]
|
162
|
},
|
163
|
{
|
164
|
path: 'participate/deposit-publications-result',
|
165
|
redirectTo: 'participate/deposit/learn-how',
|
166
|
pathMatch: 'full',
|
167
|
canActivate: [IsCommunity]
|
168
|
},
|
169
|
{
|
170
|
path: 'participate/share-zenodo',
|
171
|
redirectTo: '/participate/deposit/zenodo',
|
172
|
pathMatch: 'full',
|
173
|
canActivate: [IsCommunity]
|
174
|
},
|
175
|
{
|
176
|
path: 'participate/deposit/learn-how',
|
177
|
loadChildren: './deposit/deposit.module#LibDepositModule',
|
178
|
canActivate: [IsCommunity]
|
179
|
},
|
180
|
{
|
181
|
path: 'participate/deposit/search',
|
182
|
loadChildren: './deposit/searchDataprovidersToDeposit.module#LibSearchDataprovidersToDepositModule',
|
183
|
canActivate: [IsCommunity]
|
184
|
},
|
185
|
{
|
186
|
path: 'participate/deposit/zenodo',
|
187
|
loadChildren: './deposit/zenodo/shareInZenodo.module#ShareInZenodoModule',
|
188
|
canActivate: [IsCommunity]
|
189
|
},
|
190
|
/** Linking Pages */
|
191
|
{path: 'myclaims', loadChildren: './claims/myClaims/myClaims.module#LibMyClaimsModule', canActivate: [IsCommunity]},
|
192
|
{
|
193
|
path: 'participate/claim',
|
194
|
loadChildren: './claims/linking/linkingGeneric.module#LibLinkingGenericModule',
|
195
|
canActivate: [IsCommunity]
|
196
|
},
|
197
|
{
|
198
|
path: 'participate/direct-claim',
|
199
|
loadChildren: './claims/directLinking/directLinking.module#LibDirectLinkingModule',
|
200
|
canActivate: [IsCommunity]
|
201
|
},
|
202
|
{
|
203
|
path: 'preview',
|
204
|
loadChildren: './demo/demo.module#DemoModule',
|
205
|
canActivate: [IsCommunity]
|
206
|
},
|
207
|
/** help pages - do not exist in Admin portal/api/db */
|
208
|
{path: 'reload', loadChildren: './reload/libReload.module#LibReloadModule'},
|
209
|
{path: 'user-info', loadChildren: './login/libUser.module#LibUserModule'},
|
210
|
{path: 'error', component: OpenaireErrorPageComponent},
|
211
|
{path: 'theme', loadChildren: './openaireLibrary/utils/theme/theme.module#ThemeModule'},
|
212
|
{path: '**', pathMatch: 'full', component: OpenaireErrorPageComponent}
|
213
|
];
|
214
|
|
215
|
@NgModule({
|
216
|
imports: [RouterModule.forRoot(routes, {
|
217
|
onSameUrlNavigation: "reload",
|
218
|
relativeLinkResolution: 'corrected'
|
219
|
})],
|
220
|
exports: [RouterModule]
|
221
|
})
|
222
|
export class AppRoutingModule {
|
223
|
}
|