2021-04-01 16:25:15 +02:00
|
|
|
import {NgModule} from '@angular/core';
|
|
|
|
import {RouterModule, Routes} from '@angular/router';
|
|
|
|
import {OpenaireErrorPageComponent} from './error/errorPage.component';
|
2020-04-03 18:02:40 +02:00
|
|
|
import {PageURLResolverComponent} from "./openaireLibrary/utils/pageURLResolver.component";
|
2020-12-02 18:41:53 +01:00
|
|
|
import {IsCommunity} from "./openaireLibrary/connect/communityGuard/isCommunity.guard";
|
2018-02-12 12:41:40 +01:00
|
|
|
|
|
|
|
const routes: Routes = [
|
2021-04-01 16:25:15 +02:00
|
|
|
/** Other Pages */
|
|
|
|
{path: '', loadChildren: './communitywrapper/communityWrapper.module#CommunityWrapperModule'},
|
|
|
|
{path: 'about', redirectTo: 'about/learn-how', pathMatch: 'full'},
|
|
|
|
{path: 'about/learn-how', loadChildren: './learn-how/learn-how.module#LearnHowModule'},
|
|
|
|
{path: 'about/learn-in-depth', loadChildren: './learn-how/learnInDepth/learn-in-depth.module#LearnInDepthModule'},
|
|
|
|
{path: 'about/faq', loadChildren: './learn-how/faqs/faqs.module#FaqsModule'},
|
|
|
|
{path: 'contact-us', loadChildren: './contact/contact.module#ContactModule'},
|
|
|
|
{path: 'invite', loadChildren: './utils/subscribe/invite/invite.module#InviteModule'},
|
|
|
|
{path: 'content', loadChildren: './content/contentPage.module#ContentPageModule', canActivate: [IsCommunity]},
|
|
|
|
{
|
|
|
|
path: 'organizations',
|
|
|
|
loadChildren: './htmlPages/organizations/organizationsPage.module#OrganizationsPageModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'publications',
|
|
|
|
loadChildren: './htmlPages/publications/publications-page.module#PublicationsPageModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'projects',
|
|
|
|
loadChildren: './htmlPages/projects/projectsPage.module#ProjectsPageModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'national-bulletins',
|
|
|
|
loadChildren: './htmlPages/nationalBulletins/nationalBulletinsPage.module#NaionalBulletinPageModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{path: 'curators', loadChildren: './curators/curators.module#CuratorsModule', canActivate: [IsCommunity]},
|
|
|
|
{path: 'subjects', loadChildren: './subjects/subjects.module#SubjectsModule', canActivate: [IsCommunity]},
|
|
|
|
{path: 'myCommunities', loadChildren: './my-communities/my-communities.module#MyCommunitiesModule'},
|
|
|
|
/** Testing Page for help contents */
|
|
|
|
{path: 'helper-test', loadChildren: './helper-test/helper-test.module#HelperTestModule'},
|
|
|
|
/** Landing Pages */
|
|
|
|
{
|
|
|
|
path: 'search/result',
|
|
|
|
loadChildren: './landingPages/result/libResult.module#LibResultModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'search/publication',
|
|
|
|
loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'search/dataset',
|
|
|
|
loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'search/software',
|
|
|
|
loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{path: 'search/other', loadChildren: './landingPages/orp/libOrp.module#LibOrpModule', canActivate: [IsCommunity]},
|
|
|
|
{
|
|
|
|
path: 'search/project',
|
|
|
|
loadChildren: './landingPages/project/libProject.module#LibProjectModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'search/dataprovider',
|
|
|
|
loadChildren: '././landingPages/dataProvider/libDataProvider.module#LibDataProviderModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'search/organization',
|
|
|
|
loadChildren: './landingPages/organization/libOrganization.module#LibOrganizationModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'project-report',
|
|
|
|
loadChildren: './landingPages/htmlProjectReport/libHtmlProjectReport.module#LibHtmlProjectReportModule'
|
|
|
|
},
|
|
|
|
/** Search Pages */
|
|
|
|
{path: 'search/find', redirectTo: 'search/find/research-outcomes', pathMatch: 'full'},
|
|
|
|
|
|
|
|
{
|
|
|
|
path: 'search/find/communities',
|
|
|
|
loadChildren: './searchPages/communities/searchCommunities.module#SearchCommunitiesModule'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'search/find/research-outcomes',
|
|
|
|
loadChildren: './searchPages/simple/searchResearchResults.module#OpenaireSearchResearchResultsModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{path: 'search/find/publications', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
|
|
|
{path: 'search/find/datasets', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
|
|
|
{path: 'search/find/software', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
|
|
|
{path: 'search/find/other', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
|
|
|
{
|
|
|
|
path: 'search/find/projects',
|
|
|
|
loadChildren: './searchPages/simple/searchProjects.module#LibSearchProjectsModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'search/find/dataproviders',
|
|
|
|
loadChildren: './searchPages/simple/searchDataProviders.module#LibSearchDataProvidersModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
/** Advanced Search Pages */
|
|
|
|
{
|
|
|
|
path: 'search/advanced/research-outcomes',
|
|
|
|
loadChildren: './searchPages/advanced/searchResearchResults.module#OpenaireAdvancedSearchResearchResultsModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{path: 'search/advanced/publications', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
|
|
|
{path: 'search/advanced/datasets', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
|
|
|
{path: 'search/advanced/software', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
|
|
|
{path: 'search/advanced/other', component: PageURLResolverComponent, canActivate: [IsCommunity]},
|
|
|
|
{
|
|
|
|
path: 'search/advanced/organizations',
|
|
|
|
loadChildren: './searchPages/advanced/advancedSearchOrganizations.module#LibAdvancedSearchOrganizationsModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'search/advanced/dataproviders',
|
|
|
|
loadChildren: './searchPages/advanced/advancedSearchDataProviders.module#LibAdvancedSearchDataProvidersModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'search/advanced/projects',
|
|
|
|
loadChildren: './searchPages/advanced/advancedSearchProjects.module#LibAdvancedSearchProjectsModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
/** Deposit Pages */
|
|
|
|
{
|
|
|
|
path: 'participate/deposit-datasets',
|
|
|
|
redirectTo: 'participate/deposit/learn-how',
|
|
|
|
pathMatch: 'full',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'participate/deposit-datasets-result',
|
|
|
|
redirectTo: 'participate/deposit/learn-how',
|
|
|
|
pathMatch: 'full',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'participate/deposit-subject-result',
|
|
|
|
redirectTo: 'participate/deposit/learn-how',
|
|
|
|
pathMatch: 'full',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'participate/deposit-publications',
|
|
|
|
redirectTo: 'participate/deposit/learn-how',
|
|
|
|
pathMatch: 'full',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'participate/deposit-publications-result',
|
|
|
|
redirectTo: 'participate/deposit/learn-how',
|
|
|
|
pathMatch: 'full',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'participate/share-zenodo',
|
|
|
|
redirectTo: '/participate/deposit/zenodo',
|
|
|
|
pathMatch: 'full',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'participate/deposit/learn-how',
|
|
|
|
loadChildren: './deposit/deposit.module#LibDepositModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'participate/deposit/search',
|
|
|
|
loadChildren: './deposit/searchDataprovidersToDeposit.module#LibSearchDataprovidersToDepositModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'participate/deposit/zenodo',
|
|
|
|
loadChildren: './deposit/zenodo/shareInZenodo.module#ShareInZenodoModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
/** Linking Pages */
|
|
|
|
{path: 'myclaims', loadChildren: './claims/myClaims/myClaims.module#LibMyClaimsModule', canActivate: [IsCommunity]},
|
|
|
|
{
|
|
|
|
path: 'participate/claim',
|
|
|
|
loadChildren: './claims/linking/linkingGeneric.module#LibLinkingGenericModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'participate/direct-claim',
|
|
|
|
loadChildren: './claims/directLinking/directLinking.module#LibDirectLinkingModule',
|
|
|
|
canActivate: [IsCommunity]
|
|
|
|
},
|
|
|
|
/** help pages - do not exist in Admin portal/api/db */
|
|
|
|
{path: 'reload', loadChildren: './reload/libReload.module#LibReloadModule'},
|
|
|
|
{path: 'user-info', loadChildren: './login/libUser.module#LibUserModule'},
|
|
|
|
{path: 'error', component: OpenaireErrorPageComponent},
|
|
|
|
{path: 'theme', loadChildren: './openaireLibrary/utils/theme/theme.module#ThemeModule'},
|
|
|
|
{path: '**', pathMatch: 'full', component: OpenaireErrorPageComponent}
|
2018-02-12 12:41:40 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
imports: [RouterModule.forRoot(routes)],
|
2021-04-01 16:25:15 +02:00
|
|
|
exports: [RouterModule]
|
2018-02-12 12:41:40 +01:00
|
|
|
})
|
2021-04-01 16:25:15 +02:00
|
|
|
export class AppRoutingModule {
|
|
|
|
}
|