Revision 60693
Added by Konstantinos Triantafyllou about 3 years ago
app.routing.ts | ||
---|---|---|
1 |
/** |
|
2 |
* Created by stefania on 9/16/16. |
|
3 |
*/ |
|
4 | 1 |
import {NgModule} from '@angular/core'; |
5 | 2 |
import {PreloadAllModules, RouterModule, Routes} from '@angular/router'; |
6 | 3 |
import {IsCommunity} from './openaireLibrary/connect/communityGuard/isCommunity.guard'; |
7 | 4 |
import {ConnectAdminLoginGuard} from './openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; |
8 |
import {ConnectRIGuard} from './openaireLibrary/connect/communityGuard/connectRIGuard.guard'; |
|
9 |
|
|
10 |
import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver'; |
|
11 |
|
|
12 |
import {CommunityErrorPageComponent} from './openaireLibrary/connect/communityGuard/communityErrorPage.component'; |
|
13 | 5 |
import {AdminErrorPageComponent} from './pages/error/errorPage.component'; |
14 | 6 |
import {AdminLoginGuard} from "./openaireLibrary/login/adminLoginGuard.guard"; |
15 | 7 |
import {LoginGuard} from "./openaireLibrary/login/loginGuard.guard"; |
16 | 8 |
|
17 |
const oldRoutes: Routes = [ |
|
18 |
{ |
|
19 |
path: '', |
|
20 |
loadChildren: './pages/wellcome/wellcome.module#WellcomeModule', |
|
21 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
22 |
}, |
|
23 |
{ |
|
24 |
path: 'dashboard', |
|
25 |
loadChildren: './pages/dashboard/dashboard.module#DashboardModule', |
|
26 |
resolve: {envSpecific: EnvironmentSpecificResolver} |
|
27 |
}, |
|
28 |
{ |
|
29 |
path: 'manage-user-notifications', |
|
30 |
loadChildren: './pages/usernotifications/manage-user-notifications.module#ManageUserNotificationsModule', |
|
31 |
resolve: {envSpecific: EnvironmentSpecificResolver} |
|
32 |
}, |
|
33 |
{ |
|
34 |
path: 'personal', |
|
35 |
loadChildren: './pages/curator/curator.module#CuratorModule', |
|
36 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
37 |
}, |
|
38 |
{ |
|
39 |
path: 'organizations', |
|
40 |
loadChildren: './pages/affiliations/affiliations.module#AffiliationsModule', |
|
41 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
42 |
}, |
|
43 |
{ |
|
44 |
path: 'communities', |
|
45 |
loadChildren: './pages/community/communities.module#CommunitiesModule', |
|
46 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
47 |
}, |
|
48 |
{ |
|
49 |
path: 'community-edit-form', |
|
50 |
loadChildren: './pages/community/community-edit-form/community-edit-form.module#CommunityEditFormModule', |
|
51 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
52 |
}, |
|
53 |
{ |
|
54 |
path: 'manage-zenodo-communities', |
|
55 |
loadChildren: './pages/zenodo-communities/zenodo-communities.module#ZenodoCommunitiesModule', |
|
56 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
57 |
}, |
|
58 |
{ |
|
59 |
path: 'manage-subscribers', |
|
60 |
loadChildren: './pages/subscribers/manage-subscribers.module#ManageSubscribersModule', |
|
61 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
62 |
}, |
|
63 |
{ |
|
64 |
path: 'manage-subjects', |
|
65 |
loadChildren: './pages/subjects/subjects-edit-form/subjects-edit-form.module#SubjectsEditFormModule', |
|
66 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
67 |
}, |
|
68 |
// { |
|
69 |
// path: 'entities', |
|
70 |
// loadChildren: './pages/entity/entities.module#EntitiesModule', |
|
71 |
// resolve: { envSpecific: EnvironmentSpecificResolver } |
|
72 |
// }, |
|
73 |
{ |
|
74 |
path: 'classes', |
|
75 |
loadChildren: './pages/divId/divIds.module#DivIdsModule', |
|
76 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
77 |
}, |
|
78 |
// { |
|
79 |
// path: 'pages', |
|
80 |
// loadChildren: './pages/page/pages.module#PagesModule', |
|
81 |
// resolve: { envSpecific: EnvironmentSpecificResolver } |
|
82 |
// }, |
|
83 |
// { |
|
84 |
// path: 'pageContents', |
|
85 |
// loadChildren: './pages/helpcontent/page-help-contents.module#PageHelpContentsModule', |
|
86 |
// resolve: { envSpecific: EnvironmentSpecificResolver } |
|
87 |
// }, |
|
88 |
// { |
|
89 |
// path: 'pageContents/new', |
|
90 |
// loadChildren: './pages/helpcontent/new-page-help-content.module#NewPageHelpContentModule', |
|
91 |
// resolve: { envSpecific: EnvironmentSpecificResolver } |
|
92 |
// }, |
|
93 |
// { |
|
94 |
// path: 'pageContents/edit', |
|
95 |
// loadChildren: './pages/helpcontent/edit-page-help-content.module#EditPageHelpContentModule', |
|
96 |
// resolve: { envSpecific: EnvironmentSpecificResolver } |
|
97 |
// }, |
|
98 |
{ |
|
99 |
path: 'classContents', |
|
100 |
loadChildren: './pages/divhelpcontent/div-help-contents.module#DivHelpContentsModule', |
|
101 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
102 |
}, |
|
103 |
{ |
|
104 |
path: 'classContents/new', |
|
105 |
loadChildren: './pages/divhelpcontent/new-div-help-content.module#NewDivHelpContentModule', |
|
106 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
107 |
}, |
|
108 |
{ |
|
109 |
path: 'classContents/edit', |
|
110 |
loadChildren: './pages/divhelpcontent/edit-div-help-content.module#EditDivHelpContentModule', |
|
111 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
112 |
}, |
|
113 |
{ |
|
114 |
path: 'htmlPageContent/edit', |
|
115 |
loadChildren: './pages/htmlpagecontent/edit-html-page-content.module#EditHtmlPageContentModule', |
|
116 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
117 |
}, |
|
118 |
{ |
|
119 |
path: 'claims', |
|
120 |
loadChildren: './pages/claims/claims.module#ClaimsModule', |
|
121 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
122 |
}, |
|
123 |
{ |
|
124 |
path: 'reload', |
|
125 |
loadChildren: './reload/libReload.module#LibReloadModule', |
|
126 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
127 |
}, |
|
128 |
{ |
|
129 |
path: 'user-info', |
|
130 |
loadChildren: './login/libUser.module#LibUserModule', |
|
131 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
132 |
}, |
|
133 |
{ |
|
134 |
path: 'stats', |
|
135 |
loadChildren: './pages/stats/stats.module#StatsModule', |
|
136 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
137 |
}, |
|
138 |
{ |
|
139 |
path: 'manage-projects', |
|
140 |
loadChildren: './pages/community/projects/communityProjects.module#CommunityProjectsModule', |
|
141 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
142 |
}, |
|
143 |
{ |
|
144 |
path: 'manage-content-providers', |
|
145 |
loadChildren: './pages/community/content-providers/communityContentProviders.module#CommunityContentProvidersModule', |
|
146 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
147 |
}, |
|
148 |
/*{ |
|
149 |
path: 'customize-layout', |
|
150 |
loadChildren: './pages/customization/customization.module#CustomizationModule', |
|
151 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
152 |
},*/ |
|
153 |
{ |
|
154 |
path: 'manage-content-providers/criteria', |
|
155 |
loadChildren: './pages/community/content-providers/criteria/criteria.module#CriteriaModule', |
|
156 |
resolve: { envSpecific: EnvironmentSpecificResolver } |
|
157 |
}, |
|
158 |
{ |
|
159 |
path: 'mining', |
|
160 |
loadChildren: './pages/mining/mining.module#MiningModule', |
|
161 |
canLoad: [IsCommunity, ConnectAdminLoginGuard, ConnectRIGuard] |
|
162 |
}, |
|
163 |
{ |
|
164 |
path: 'errorcommunity', |
|
165 |
component: CommunityErrorPageComponent |
|
166 |
}, |
|
167 |
{ path: '**', |
|
168 |
pathMatch: 'full', |
|
169 |
component: AdminErrorPageComponent |
|
170 |
} |
|
171 |
|
|
172 |
]; |
|
173 |
|
|
174 | 9 |
const routes: Routes = [ |
175 | 10 |
{ |
176 | 11 |
path: '', |
... | ... | |
204 | 39 |
canActivateChild: [AdminLoginGuard], |
205 | 40 |
data: {portal: 'openaire'} |
206 | 41 |
}, |
207 |
/*{ path: 'icons', |
|
208 |
pathMatch: 'full', |
|
209 |
loadChildren: './openaireLibrary/utils/icons/icons-preview/icons-preview.module#IconsPreviewModule', |
|
210 |
data: {hasSidebar: false, hasHeader: false} |
|
211 |
},*/ |
|
212 | 42 |
{ |
213 | 43 |
path: 'admin-tools', |
214 | 44 |
loadChildren: './pages/admin-tools/portal-admin-tools-routing.module#PortalAdminToolsRoutingModule', |
... | ... | |
220 | 50 |
{ |
221 | 51 |
path: ':community', |
222 | 52 |
loadChildren: './pages/community-routing.module#CommunityRoutingModule', |
223 |
canActivateChild: [ConnectAdminLoginGuard] |
|
53 |
canActivateChild: [IsCommunity, ConnectAdminLoginGuard]
|
|
224 | 54 |
}, |
225 | 55 |
{ path: '**', |
226 | 56 |
pathMatch: 'full', |
Also available in: Unified diff
[Admin | NewUI]: Remove some unusage files. Fix zenodo loaing paddings. Fix mining title