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