From 8ad9d708347fed19716ca399ad6808d605c0b5f9 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Fri, 8 Mar 2019 13:10:29 +0000 Subject: [PATCH] [Trunk|Admin]: Lazy routing is Completed. Need to check communities and classes routes guards and query parameters git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@54967 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/app.module.ts | 61 ++------- src/app/app.routing.ts | 125 +++++++++--------- src/app/pages/claims/claims-routing.module.ts | 14 ++ src/app/pages/claims/claims.module.ts | 12 ++ ...ommunityContentProviders-routing.module.ts | 14 ++ .../communityContentProviders.module.ts | 19 +-- .../communityProjects-routing.module.ts | 14 ++ .../projects/communityProjects.module.ts | 19 +-- src/app/pages/divId/divIds-routing.module.ts | 14 ++ src/app/pages/divId/divIds.module.ts | 22 +++ .../div-help-contents-routing.module.ts | 14 ++ .../div-help-contents.module.ts | 24 ++++ .../edit-div-help-content-routing.module.ts | 14 ++ .../edit-div-help-content.module.ts | 27 ++++ .../new-div-help-content-routing.module.ts | 14 ++ .../new-div-help-content.module.ts | 27 ++++ .../pages/entity/entities-routing.module.ts | 14 ++ src/app/pages/entity/entities.module.ts | 22 +++ .../edit-page-help-content-routing.module.ts | 14 ++ .../edit-page-help-content.module.ts | 27 ++++ .../new-page-help-content-routing.module.ts | 14 ++ .../new-page-help-content.module.ts | 27 ++++ .../page-help-contents-routing.module.ts | 14 ++ .../helpcontent/page-help-contents.module.ts | 24 ++++ .../edit-html-page-content-routing.module.ts | 14 ++ ...le.ts => edit-html-page-content.module.ts} | 26 ++-- src/app/pages/page/pages-routing.module.ts | 14 ++ src/app/pages/page/pages.module.ts | 22 +++ src/app/pages/stats/stats-routing.module.ts | 14 ++ src/app/pages/stats/stats.component.ts | 1 - src/app/pages/stats/stats.module.ts | 17 +++ 31 files changed, 552 insertions(+), 146 deletions(-) create mode 100644 src/app/pages/claims/claims-routing.module.ts create mode 100644 src/app/pages/claims/claims.module.ts create mode 100644 src/app/pages/community/content-providers/communityContentProviders-routing.module.ts create mode 100644 src/app/pages/community/projects/communityProjects-routing.module.ts create mode 100644 src/app/pages/divId/divIds-routing.module.ts create mode 100644 src/app/pages/divId/divIds.module.ts create mode 100644 src/app/pages/divhelpcontent/div-help-contents-routing.module.ts create mode 100644 src/app/pages/divhelpcontent/div-help-contents.module.ts create mode 100644 src/app/pages/divhelpcontent/edit-div-help-content-routing.module.ts create mode 100644 src/app/pages/divhelpcontent/edit-div-help-content.module.ts create mode 100644 src/app/pages/divhelpcontent/new-div-help-content-routing.module.ts create mode 100644 src/app/pages/divhelpcontent/new-div-help-content.module.ts create mode 100644 src/app/pages/entity/entities-routing.module.ts create mode 100644 src/app/pages/entity/entities.module.ts create mode 100644 src/app/pages/helpcontent/edit-page-help-content-routing.module.ts create mode 100644 src/app/pages/helpcontent/edit-page-help-content.module.ts create mode 100644 src/app/pages/helpcontent/new-page-help-content-routing.module.ts create mode 100644 src/app/pages/helpcontent/new-page-help-content.module.ts create mode 100644 src/app/pages/helpcontent/page-help-contents-routing.module.ts create mode 100644 src/app/pages/helpcontent/page-help-contents.module.ts create mode 100644 src/app/pages/htmlpagecontent/edit-html-page-content-routing.module.ts rename src/app/pages/htmlpagecontent/{htmlpagecontent.module.ts => edit-html-page-content.module.ts} (53%) create mode 100644 src/app/pages/page/pages-routing.module.ts create mode 100644 src/app/pages/page/pages.module.ts create mode 100644 src/app/pages/stats/stats-routing.module.ts create mode 100644 src/app/pages/stats/stats.module.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5dcf05d..454f300 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -3,33 +3,16 @@ import { BrowserModule } from '@angular/platform-browser'; import { HttpModule, JsonpModule } from '@angular/http'; import { AppComponent } from './app.component'; import { AppRoutingModule} from './app.routing'; -import { TopicsComponent } from "./pages/faq/topics.components"; -import { QuestionsComponent } from "./pages/faq/questions.component"; +import { TopicsComponent } from './pages/faq/topics.components'; +import { QuestionsComponent } from './pages/faq/questions.component'; import { ModalModule } from 'ngx-bootstrap'; -import { TopicsFormComponent } from "./pages/faq/topics-form.component"; +import { TopicsFormComponent } from './pages/faq/topics-form.component'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { ModalFormComponent } from "./pages/modal-form.component"; -import { QuestionsFormComponent } from "./pages/faq/questions-form.component"; -import { DeleteConfirmationDialogComponent } from "./pages/delete-confirmation-dialog.component"; +import { ModalFormComponent } from './pages/modal-form.component'; +import { QuestionsFormComponent } from './pages/faq/questions-form.component'; +import { DeleteConfirmationDialogComponent } from './pages/delete-confirmation-dialog.component'; -import { PagesComponent } from "./pages/page/pages.component"; -import { HelpContentService } from "./services/help-content.service"; -import { PageFormComponent } from "./pages/page/page-form.component"; -import { PageHelpContentsComponent } from "./pages/helpcontent/page-help-contents.component"; -import { NewPageHelpContentComponent } from "./pages/helpcontent/new-page-help-content.component"; -import { CKEditorModule } from 'ng2-ckeditor'; -import { PageContentFormComponent } from "./pages/helpcontent/page-help-content-form.component"; -import { EditPageHelpContentComponent } from "./pages/helpcontent/edit-page-help-content.component"; -import { DivIdsComponent } from "./pages/divId/divIds.component"; -import { DivIdFormComponent } from "./pages/divId/divId-form.component"; -import { DivHelpContentsComponent } from "./pages/divhelpcontent/div-help-contents.component"; -import { NewDivHelpContentComponent } from "./pages/divhelpcontent/new-div-help-content.component"; -import { DivContentFormComponent } from "./pages/divhelpcontent/div-help-content-form.component"; -import { EditDivHelpContentComponent } from "./pages/divhelpcontent/edit-div-help-content.component"; - -import { HtmlPageContentModule } from "./pages/htmlpagecontent/htmlpagecontent.module"; - -import {ClaimsComponent} from './pages/claims/claims.component'; +import { HelpContentService } from './services/help-content.service'; import {NavigationBarModule} from './openaireLibrary/sharedComponents/navigationBar.module'; import { CookieLawModule } from './openaireLibrary/sharedComponents/cookie-law/cookie-law.module'; @@ -37,15 +20,8 @@ import { CookieLawModule } from './openaireLibrary/sharedComponents/cookie-law/c import {BottomModule} from './openaireLibrary/sharedComponents/bottom.module'; import {FeedbackModule} from './openaireLibrary/sharedComponents/feedback/feedback.module'; import { ConnectAdminLoginGuard} from './openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; -import {ConnectCommunityGuard} from './openaireLibrary/connect/communityGuard/connectCommunityGuard.guard'; import { EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver'; import { EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service'; -import {ClaimsAdminModule} from './openaireLibrary/claims/claimsAdmin/claimsAdmin.module'; -import {StatsComponent} from './pages/stats/stats.component'; -import { DataTablesModule } from 'angular-datatables'; - -import { CommunityProjectsModule } from './pages/community/projects/communityProjects.module'; -import { CommunityContentProvidersModule } from './pages/community/content-providers/communityContentProviders.module'; import {CommunitiesService} from './openaireLibrary/connect/communities/communities.service'; import {CommunityErrorPageComponent} from './openaireLibrary/connect/communityGuard/communityErrorPage.component'; @@ -72,14 +48,9 @@ import {ConnectRIGuard} from './openaireLibrary/connect/communityGuard/connectRI ModalModule.forRoot(), FormsModule, ReactiveFormsModule, - CKEditorModule, - BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule, ClaimsAdminModule, - CommunityProjectsModule, - CommunityContentProvidersModule, - DataTablesModule, + BottomModule, FeedbackModule, NavigationBarModule, CookieLawModule, ErrorModule, AlertModalModule, SafeHtmlPipeModule, FABModule, - HtmlPageContentModule, InteractiveMiningModule ], declarations: [ @@ -90,20 +61,6 @@ import {ConnectRIGuard} from './openaireLibrary/connect/communityGuard/connectRI ModalFormComponent, QuestionsFormComponent, DeleteConfirmationDialogComponent, - PagesComponent, - PageFormComponent, - PageHelpContentsComponent, - NewPageHelpContentComponent, - PageContentFormComponent, - EditPageHelpContentComponent, - DivIdsComponent, - DivIdFormComponent, - DivHelpContentsComponent, - NewDivHelpContentComponent, - EditDivHelpContentComponent, - DivContentFormComponent, - ClaimsComponent, - StatsComponent, CommunityErrorPageComponent, AdminErrorPageComponent ], @@ -112,7 +69,7 @@ import {ConnectRIGuard} from './openaireLibrary/connect/communityGuard/connectRI HelpContentService, CommunityService, SubscribeService, ConnectAdminLoginGuard, EnvironmentSpecificResolver, EnvironmentSpecificService, - IsCommunity, ConnectCommunityGuard, ConnectRIGuard, CommunitiesService, TitleCasePipe + IsCommunity, ConnectRIGuard, CommunitiesService, TitleCasePipe ], bootstrap: [ AppComponent ] diff --git a/src/app/app.routing.ts b/src/app/app.routing.ts index 24f6659..3ca3456 100644 --- a/src/app/app.routing.ts +++ b/src/app/app.routing.ts @@ -1,34 +1,17 @@ /** * Created by stefania on 9/16/16. */ -import {ModuleWithProviders, NgModule} from '@angular/core'; +import { NgModule} from '@angular/core'; import { Routes, RouterModule} from '@angular/router'; -import { EntitiesComponent } from "./pages/entity/entities.component"; -import { PagesComponent } from "./pages/page/pages.component"; -import { PageHelpContentsComponent } from "./pages/helpcontent/page-help-contents.component"; -import { NewPageHelpContentComponent } from "./pages/helpcontent/new-page-help-content.component"; -import { EditPageHelpContentComponent } from "./pages/helpcontent/edit-page-help-content.component"; -import { DivIdsComponent } from "./pages/divId/divIds.component"; -import { DivHelpContentsComponent } from "./pages/divhelpcontent/div-help-contents.component"; -import { NewDivHelpContentComponent } from "./pages/divhelpcontent/new-div-help-content.component"; -import { EditDivHelpContentComponent } from "./pages/divhelpcontent/edit-div-help-content.component"; -import { EditHtmlPageContentComponent } from "./pages/htmlpagecontent/edit-htmlpage-content.component"; -import {ClaimsComponent} from './pages/claims/claims.component'; import {IsCommunity} from './openaireLibrary/connect/communityGuard/isCommunity.guard'; -import { AdminLoginGuard} from './openaireLibrary/login/adminLoginGuard.guard'; -import { ConnectAdminLoginGuard} from './openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; -import {ConnectCommunityGuard} from './openaireLibrary/connect/communityGuard/connectCommunityGuard.guard'; +import {ConnectAdminLoginGuard} from './openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; import {ConnectRIGuard} from './openaireLibrary/connect/communityGuard/connectRIGuard.guard'; -import { EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver'; +import {EnvironmentSpecificResolver} from './openaireLibrary/utils/properties/environmentSpecificResolver'; -import {StatsComponent} from './pages/stats/stats.component'; -import{CommunityErrorPageComponent} from './openaireLibrary/connect/communityGuard/communityErrorPage.component'; +import {CommunityErrorPageComponent} from './openaireLibrary/connect/communityGuard/communityErrorPage.component'; import {AdminErrorPageComponent} from './pages/error/errorPage.component'; -import { ManageProjectsComponent } from './pages/community/projects/manage-projects.component'; -import { ManageContentProvidersComponent } from './pages/community/content-providers/manage-content-providers.component'; - const appRoutes: Routes = [ { path: '', @@ -76,69 +59,80 @@ const appRoutes: Routes = [ resolve: { envSpecific: EnvironmentSpecificResolver } }, { - path: 'classes', - component: DivIdsComponent, canActivate: [IsCommunity,ConnectAdminLoginGuard],resolve: { envSpecific: EnvironmentSpecificResolver } + path: 'classes', + loadChildren: './pages/divId/divIds.module#DivIdsModule', + resolve: { envSpecific: EnvironmentSpecificResolver } }, { path: 'pages', - component: PagesComponent, - canActivate: [IsCommunity,ConnectAdminLoginGuard],resolve: { envSpecific: EnvironmentSpecificResolver } + loadChildren: './pages/page/pages.module#PagesModule', + resolve: { envSpecific: EnvironmentSpecificResolver } }, { path: 'pageContents', - component: PageHelpContentsComponent, - canActivate: [IsCommunity,ConnectAdminLoginGuard],resolve: { envSpecific: EnvironmentSpecificResolver } + loadChildren: './pages/helpcontent/page-help-contents.module#PageHelpContentsModule', + resolve: { envSpecific: EnvironmentSpecificResolver } }, { path: 'pageContents/new', - component: NewPageHelpContentComponent, - canActivate: [IsCommunity,ConnectAdminLoginGuard],resolve: { envSpecific: EnvironmentSpecificResolver } + loadChildren: './pages/helpcontent/new-page-help-content.module#NewPageHelpContentModule', + resolve: { envSpecific: EnvironmentSpecificResolver } }, { - //path: 'pageContents/edit/:id', path: 'pageContents/edit', - component: EditPageHelpContentComponent, - canActivate: [IsCommunity,ConnectAdminLoginGuard],resolve: { envSpecific: EnvironmentSpecificResolver } + loadChildren: './pages/helpcontent/edit-page-help-content.module#EditPageHelpContentModule', + resolve: { envSpecific: EnvironmentSpecificResolver } }, { path: 'classContents', - component: DivHelpContentsComponent,canActivate: [IsCommunity,ConnectAdminLoginGuard],resolve: { envSpecific: EnvironmentSpecificResolver } - }, - { - path: 'classContents/new', - component: NewDivHelpContentComponent,canActivate: [IsCommunity,ConnectAdminLoginGuard],resolve: { envSpecific: EnvironmentSpecificResolver } - }, - { - path: 'classContents/edit', - component: EditDivHelpContentComponent,canActivate: [IsCommunity,ConnectAdminLoginGuard],resolve: { envSpecific: EnvironmentSpecificResolver } - }, - { - path: 'htmlPageContent/edit', - component: EditHtmlPageContentComponent, canActivate: [IsCommunity,ConnectAdminLoginGuard],resolve: { envSpecific: EnvironmentSpecificResolver } - }, - { - path: 'claims', - component: ClaimsComponent,canActivate: [IsCommunity,ConnectAdminLoginGuard],resolve: { envSpecific: EnvironmentSpecificResolver } - }, - { path: 'reload', loadChildren: './reload/libReload.module#LibReloadModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, - { path: 'user-info', loadChildren: './login/libUser.module#LibUserModule', resolve: { envSpecific: EnvironmentSpecificResolver }}, - - { - path: 'stats', - component: StatsComponent, - canActivate: [IsCommunity,ConnectAdminLoginGuard], + loadChildren: './pages/divhelpcontent/div-help-contents.module#DivHelpContentsModule', resolve: { envSpecific: EnvironmentSpecificResolver } }, { - path: 'manage-projects', - component: ManageProjectsComponent, - canActivate: [IsCommunity,ConnectAdminLoginGuard], resolve: { envSpecific: EnvironmentSpecificResolver } + path: 'classContents/new', + loadChildren: './pages/divhelpcontent/new-div-help-content.module#NewDivHelpContentModule', + resolve: { envSpecific: EnvironmentSpecificResolver } }, { - path: 'manage-content-providers', - component: ManageContentProvidersComponent, - canActivate: [IsCommunity,ConnectAdminLoginGuard], resolve: { envSpecific: EnvironmentSpecificResolver } + path: 'classContents/edit', + loadChildren: './pages/divhelpcontent/edit-div-help-content.module#EditDivHelpContentModule', + resolve: { envSpecific: EnvironmentSpecificResolver } + }, + { + path: 'htmlPageContent/edit', + loadChildren: './pages/htmlpagecontent/edit-html-page-content.module#EditHtmlPageContentModule', + resolve: { envSpecific: EnvironmentSpecificResolver } + }, + { + path: 'claims', + loadChildren: './pages/claims/claims.module#ClaimsModule', + resolve: { envSpecific: EnvironmentSpecificResolver } + }, + { + path: 'reload', + loadChildren: './reload/libReload.module#LibReloadModule', + resolve: { envSpecific: EnvironmentSpecificResolver } + }, + { + path: 'user-info', + loadChildren: './login/libUser.module#LibUserModule', + resolve: { envSpecific: EnvironmentSpecificResolver } + }, + { + path: 'stats', + loadChildren: './pages/stats/stats.module#StatsModule', + resolve: { envSpecific: EnvironmentSpecificResolver } + }, + { + path: 'manage-projects', + loadChildren: './pages/community/projects/communityProjects.module#CommunityProjectsModule', + resolve: { envSpecific: EnvironmentSpecificResolver } + }, + { + path: 'manage-content-providers', + loadChildren: './pages/community/content-providers/communityContentProviders.module#CommunityContentProvidersModule', + resolve: { envSpecific: EnvironmentSpecificResolver } }, { path: 'mining', @@ -149,7 +143,10 @@ const appRoutes: Routes = [ path: 'errorcommunity', component: CommunityErrorPageComponent }, - { path: '**', pathMatch: 'full', component: AdminErrorPageComponent } + { path: '**', + pathMatch: 'full', + component: AdminErrorPageComponent + } ]; diff --git a/src/app/pages/claims/claims-routing.module.ts b/src/app/pages/claims/claims-routing.module.ts new file mode 100644 index 0000000..78b46f5 --- /dev/null +++ b/src/app/pages/claims/claims-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {ClaimsComponent} from './claims.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: ClaimsComponent} + ]) + ] +}) +export class ClaimsRoutingModule { } diff --git a/src/app/pages/claims/claims.module.ts b/src/app/pages/claims/claims.module.ts new file mode 100644 index 0000000..42eafd7 --- /dev/null +++ b/src/app/pages/claims/claims.module.ts @@ -0,0 +1,12 @@ +import { NgModule } from '@angular/core'; +import {ClaimsAdminModule} from '../../openaireLibrary/claims/claimsAdmin/claimsAdmin.module'; +import {ClaimsComponent} from './claims.component'; +import {ClaimsRoutingModule} from './claims-routing.module'; +@NgModule({ + imports: [ + ClaimsAdminModule, ClaimsRoutingModule + ], + declarations: [ClaimsComponent], + exports: [ClaimsComponent] +}) +export class ClaimsModule { } diff --git a/src/app/pages/community/content-providers/communityContentProviders-routing.module.ts b/src/app/pages/community/content-providers/communityContentProviders-routing.module.ts new file mode 100644 index 0000000..9a16d8e --- /dev/null +++ b/src/app/pages/community/content-providers/communityContentProviders-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {ManageContentProvidersComponent} from './manage-content-providers.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: ManageContentProvidersComponent} + ]) + ] +}) +export class CommunityContentProvidersRoutingModule { } diff --git a/src/app/pages/community/content-providers/communityContentProviders.module.ts b/src/app/pages/community/content-providers/communityContentProviders.module.ts index f780c51..36b4008 100644 --- a/src/app/pages/community/content-providers/communityContentProviders.module.ts +++ b/src/app/pages/community/content-providers/communityContentProviders.module.ts @@ -1,5 +1,4 @@ import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; import { HttpModule, JsonpModule } from '@angular/http'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; @@ -9,22 +8,24 @@ import { EnvironmentSpecificService } from '../../../openaireLibrary/utils/prope import { DataTablesModule } from 'angular-datatables'; import { ManageContentProvidersComponent } from './manage-content-providers.component'; -import { ManageCommunityContentProvidersService } from "../../../services/manageContentProviders.service"; +import { ManageCommunityContentProvidersService } from '../../../services/manageContentProviders.service'; import {SearchDataprovidersServiceModule} from '../../../openaireLibrary/connect/contentProviders/searchDataprovidersService.module'; import { RemoveContentProvidersComponent } from './remove-content-providers.component'; import { AddContentProvidersComponent } from './add-content-providers.component'; -import { SearchDataprovidersService } from "../../../openaireLibrary/services/searchDataproviders.service"; +import { SearchDataprovidersService } from '../../../openaireLibrary/services/searchDataproviders.service'; import { PagingModule } from '../../../openaireLibrary/utils/paging.module'; import { SearchPagingModule } from '../../../openaireLibrary/searchPages/searchUtils/searchPaging.module'; -import {ErrorMessagesModule} from '../../../openaireLibrary/utils/errorMessages.module'; +import {ErrorMessagesModule} from '../../../openaireLibrary/utils/errorMessages.module'; import {AlertModalModule} from '../../../openaireLibrary/utils/modal/alertModal.module'; import {FABModule} from '../../../utils/fabModule.module'; +import {CommonModule} from '@angular/common'; +import {CommunityContentProvidersRoutingModule} from './communityContentProviders-routing.module'; @NgModule({ imports: [ - BrowserModule, + CommonModule, HttpModule, JsonpModule, FormsModule, @@ -35,7 +36,8 @@ import {FABModule} from '../../../utils/fabModule.module'; ErrorMessagesModule, AlertModalModule, SearchDataprovidersServiceModule, - FABModule + FABModule, + CommunityContentProvidersRoutingModule ], declarations: [ ManageContentProvidersComponent, @@ -45,8 +47,9 @@ import {FABModule} from '../../../utils/fabModule.module'; providers: [ ManageCommunityContentProvidersService, SearchDataprovidersService, - EnvironmentSpecificResolver,EnvironmentSpecificService - ] + EnvironmentSpecificResolver, EnvironmentSpecificService + ], + exports: [ManageContentProvidersComponent] }) export class CommunityContentProvidersModule { } diff --git a/src/app/pages/community/projects/communityProjects-routing.module.ts b/src/app/pages/community/projects/communityProjects-routing.module.ts new file mode 100644 index 0000000..7b2b04c --- /dev/null +++ b/src/app/pages/community/projects/communityProjects-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {ManageProjectsComponent} from './manage-projects.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: ManageProjectsComponent} + ]) + ] +}) +export class CommunityProjectsRoutingModule { } diff --git a/src/app/pages/community/projects/communityProjects.module.ts b/src/app/pages/community/projects/communityProjects.module.ts index a335548..353e9d3 100644 --- a/src/app/pages/community/projects/communityProjects.module.ts +++ b/src/app/pages/community/projects/communityProjects.module.ts @@ -1,5 +1,4 @@ import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; import { HttpModule, JsonpModule } from '@angular/http'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; @@ -10,22 +9,24 @@ import { EnvironmentSpecificService } from '../../../openaireLibrary/utils/prope import { DataTablesModule } from 'angular-datatables'; import { ManageProjectsComponent } from './manage-projects.component'; -import { ManageCommunityProjectsService } from "../../../services/manageProjects.service"; +import { ManageCommunityProjectsService } from '../../../services/manageProjects.service'; import { SearchProjectsServiceModule } from '../../../openaireLibrary/connect/projects/searchProjectsService.module'; import { RemoveProjectsComponent } from './remove-projects.component'; import { AddProjectsComponent } from './add-projects.component'; -import { SearchProjectsService } from "../../../openaireLibrary/services/searchProjects.service"; +import { SearchProjectsService } from '../../../openaireLibrary/services/searchProjects.service'; import { PagingModule } from '../../../openaireLibrary/utils/paging.module'; import { SearchPagingModule } from '../../../openaireLibrary/searchPages/searchUtils/searchPaging.module'; -import {ErrorMessagesModule} from '../../../openaireLibrary/utils/errorMessages.module'; +import {ErrorMessagesModule} from '../../../openaireLibrary/utils/errorMessages.module'; import {AlertModalModule} from '../../../openaireLibrary/utils/modal/alertModal.module'; import {FABModule} from '../../../utils/fabModule.module'; +import {CommonModule} from '@angular/common'; +import {CommunityProjectsRoutingModule} from './communityProjects-routing.module'; @NgModule({ imports: [ - BrowserModule, + CommonModule, HttpModule, JsonpModule, FormsModule, @@ -36,7 +37,8 @@ import {FABModule} from '../../../utils/fabModule.module'; ErrorMessagesModule, AlertModalModule, SearchProjectsServiceModule, - FABModule + FABModule, + CommunityProjectsRoutingModule ], declarations: [ ManageProjectsComponent, @@ -46,8 +48,9 @@ import {FABModule} from '../../../utils/fabModule.module'; providers: [ ManageCommunityProjectsService, SearchProjectsService, - EnvironmentSpecificResolver,EnvironmentSpecificService - ] + EnvironmentSpecificResolver, EnvironmentSpecificService + ], + exports: [ManageProjectsComponent] }) export class CommunityProjectsModule { } diff --git a/src/app/pages/divId/divIds-routing.module.ts b/src/app/pages/divId/divIds-routing.module.ts new file mode 100644 index 0000000..481f7dd --- /dev/null +++ b/src/app/pages/divId/divIds-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {DivIdsComponent} from './divIds.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: DivIdsComponent} + ]) + ] +}) +export class DivIdsRoutingModule { } diff --git a/src/app/pages/divId/divIds.module.ts b/src/app/pages/divId/divIds.module.ts new file mode 100644 index 0000000..69acb58 --- /dev/null +++ b/src/app/pages/divId/divIds.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {FABModule} from '../../utils/fabModule.module'; +import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; +import {DivIdsComponent} from './divIds.component'; +import {DivIdFormComponent} from './divId-form.component'; +import {DivIdsRoutingModule} from './divIds-routing.module'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, FABModule, + AlertModalModule, ReactiveFormsModule, DivIdsRoutingModule + ], + declarations: [DivIdsComponent, DivIdFormComponent], + providers: [IsCommunity, ConnectAdminLoginGuard], + exports: [DivIdsComponent] +}) +export class DivIdsModule { } diff --git a/src/app/pages/divhelpcontent/div-help-contents-routing.module.ts b/src/app/pages/divhelpcontent/div-help-contents-routing.module.ts new file mode 100644 index 0000000..7a62003 --- /dev/null +++ b/src/app/pages/divhelpcontent/div-help-contents-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {DivHelpContentsComponent} from './div-help-contents.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: DivHelpContentsComponent} + ]) + ] +}) +export class DivHelpContentsRoutingModule { } diff --git a/src/app/pages/divhelpcontent/div-help-contents.module.ts b/src/app/pages/divhelpcontent/div-help-contents.module.ts new file mode 100644 index 0000000..a6cd113 --- /dev/null +++ b/src/app/pages/divhelpcontent/div-help-contents.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {FABModule} from '../../utils/fabModule.module'; +import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; +import {DivHelpContentsRoutingModule} from './div-help-contents-routing.module'; +import {SafeHtmlPipeModule} from '../../openaireLibrary/utils/pipes/safeHTMLPipe.module'; +import {DivHelpContentsComponent} from './div-help-contents.component'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, FABModule, SafeHtmlPipeModule, + AlertModalModule, ReactiveFormsModule, DivHelpContentsRoutingModule + ], + declarations: [ + DivHelpContentsComponent + ], + providers: [IsCommunity, ConnectAdminLoginGuard], + exports: [DivHelpContentsComponent] +}) +export class DivHelpContentsModule { } diff --git a/src/app/pages/divhelpcontent/edit-div-help-content-routing.module.ts b/src/app/pages/divhelpcontent/edit-div-help-content-routing.module.ts new file mode 100644 index 0000000..e73fef5 --- /dev/null +++ b/src/app/pages/divhelpcontent/edit-div-help-content-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {EditDivHelpContentComponent} from './edit-div-help-content.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: EditDivHelpContentComponent} + ]) + ] +}) +export class EditDivHelpContentRoutingModule { } diff --git a/src/app/pages/divhelpcontent/edit-div-help-content.module.ts b/src/app/pages/divhelpcontent/edit-div-help-content.module.ts new file mode 100644 index 0000000..5a94414 --- /dev/null +++ b/src/app/pages/divhelpcontent/edit-div-help-content.module.ts @@ -0,0 +1,27 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {FABModule} from '../../utils/fabModule.module'; +import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; +import {SafeHtmlPipeModule} from '../../openaireLibrary/utils/pipes/safeHTMLPipe.module'; +import {EditDivHelpContentRoutingModule} from './edit-div-help-content-routing.module'; +import {CKEditorModule} from 'ng2-ckeditor'; +import {EditDivHelpContentComponent} from './edit-div-help-content.component'; +import {DivContentFormComponent} from './div-help-content-form.component'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, + FABModule, SafeHtmlPipeModule, CKEditorModule, + AlertModalModule, ReactiveFormsModule, EditDivHelpContentRoutingModule + ], + declarations: [ + EditDivHelpContentComponent, DivContentFormComponent + ], + providers: [IsCommunity, ConnectAdminLoginGuard], + exports: [EditDivHelpContentComponent] +}) +export class EditDivHelpContentModule { } diff --git a/src/app/pages/divhelpcontent/new-div-help-content-routing.module.ts b/src/app/pages/divhelpcontent/new-div-help-content-routing.module.ts new file mode 100644 index 0000000..cfd65c3 --- /dev/null +++ b/src/app/pages/divhelpcontent/new-div-help-content-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {NewDivHelpContentComponent} from './new-div-help-content.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: NewDivHelpContentComponent} + ]) + ] +}) +export class NewDivHelpContentRoutingModule { } diff --git a/src/app/pages/divhelpcontent/new-div-help-content.module.ts b/src/app/pages/divhelpcontent/new-div-help-content.module.ts new file mode 100644 index 0000000..9274ddf --- /dev/null +++ b/src/app/pages/divhelpcontent/new-div-help-content.module.ts @@ -0,0 +1,27 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {FABModule} from '../../utils/fabModule.module'; +import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; +import {SafeHtmlPipeModule} from '../../openaireLibrary/utils/pipes/safeHTMLPipe.module'; +import {NewDivHelpContentRoutingModule} from './new-div-help-content-routing.module'; +import {CKEditorModule} from 'ng2-ckeditor'; +import {NewDivHelpContentComponent} from './new-div-help-content.component'; +import {DivContentFormComponent} from './div-help-content-form.component'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, + FABModule, SafeHtmlPipeModule, CKEditorModule, + AlertModalModule, ReactiveFormsModule, NewDivHelpContentRoutingModule + ], + declarations: [ + NewDivHelpContentComponent, DivContentFormComponent + ], + providers: [IsCommunity, ConnectAdminLoginGuard], + exports: [NewDivHelpContentComponent] +}) +export class NewDivHelpContentModule { } diff --git a/src/app/pages/entity/entities-routing.module.ts b/src/app/pages/entity/entities-routing.module.ts new file mode 100644 index 0000000..f300e49 --- /dev/null +++ b/src/app/pages/entity/entities-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {EntitiesComponent} from './entities.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: EntitiesComponent} + ]) + ] +}) +export class EntitiesRoutingModule { } diff --git a/src/app/pages/entity/entities.module.ts b/src/app/pages/entity/entities.module.ts new file mode 100644 index 0000000..e6de372 --- /dev/null +++ b/src/app/pages/entity/entities.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {EntitiesComponent} from './entities.component'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {FABModule} from '../../utils/fabModule.module'; +import {EntityFormComponent} from './entity-form.component'; +import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; +import {EntitiesRoutingModule} from './entities-routing.module'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, FABModule, + AlertModalModule, ReactiveFormsModule, EntitiesRoutingModule + ], + declarations: [EntitiesComponent, EntityFormComponent], + providers: [IsCommunity, ConnectAdminLoginGuard], + exports: [EntitiesComponent] +}) +export class EntitiesModule { } diff --git a/src/app/pages/helpcontent/edit-page-help-content-routing.module.ts b/src/app/pages/helpcontent/edit-page-help-content-routing.module.ts new file mode 100644 index 0000000..5906590 --- /dev/null +++ b/src/app/pages/helpcontent/edit-page-help-content-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {EditPageHelpContentComponent} from './edit-page-help-content.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: EditPageHelpContentComponent} + ]) + ] +}) +export class EditPageHelpContentRoutingModule { } diff --git a/src/app/pages/helpcontent/edit-page-help-content.module.ts b/src/app/pages/helpcontent/edit-page-help-content.module.ts new file mode 100644 index 0000000..c29ad6b --- /dev/null +++ b/src/app/pages/helpcontent/edit-page-help-content.module.ts @@ -0,0 +1,27 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {FABModule} from '../../utils/fabModule.module'; +import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; +import {SafeHtmlPipeModule} from '../../openaireLibrary/utils/pipes/safeHTMLPipe.module'; +import {PageContentFormComponent} from './page-help-content-form.component'; +import {EditPageHelpContentRoutingModule} from './edit-page-help-content-routing.module'; +import {EditPageHelpContentComponent} from './edit-page-help-content.component'; +import {CKEditorModule} from 'ng2-ckeditor'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, + FABModule, SafeHtmlPipeModule, CKEditorModule, + AlertModalModule, ReactiveFormsModule, EditPageHelpContentRoutingModule + ], + declarations: [ + EditPageHelpContentComponent, PageContentFormComponent + ], + providers: [IsCommunity, ConnectAdminLoginGuard], + exports: [EditPageHelpContentComponent] +}) +export class EditPageHelpContentModule { } diff --git a/src/app/pages/helpcontent/new-page-help-content-routing.module.ts b/src/app/pages/helpcontent/new-page-help-content-routing.module.ts new file mode 100644 index 0000000..7fb748c --- /dev/null +++ b/src/app/pages/helpcontent/new-page-help-content-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {NewPageHelpContentComponent} from './new-page-help-content.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: NewPageHelpContentComponent} + ]) + ] +}) +export class NewPageHelpContentRoutingModule { } diff --git a/src/app/pages/helpcontent/new-page-help-content.module.ts b/src/app/pages/helpcontent/new-page-help-content.module.ts new file mode 100644 index 0000000..2fe3bcd --- /dev/null +++ b/src/app/pages/helpcontent/new-page-help-content.module.ts @@ -0,0 +1,27 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {FABModule} from '../../utils/fabModule.module'; +import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; +import {SafeHtmlPipeModule} from '../../openaireLibrary/utils/pipes/safeHTMLPipe.module'; +import {NewPageHelpContentComponent} from './new-page-help-content.component'; +import {NewPageHelpContentRoutingModule} from './new-page-help-content-routing.module'; +import {PageContentFormComponent} from './page-help-content-form.component'; +import {CKEditorModule} from 'ng2-ckeditor'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, + FABModule, SafeHtmlPipeModule, CKEditorModule, + AlertModalModule, ReactiveFormsModule, NewPageHelpContentRoutingModule + ], + declarations: [ + NewPageHelpContentComponent, PageContentFormComponent + ], + providers: [IsCommunity, ConnectAdminLoginGuard], + exports: [NewPageHelpContentComponent] +}) +export class NewPageHelpContentModule { } diff --git a/src/app/pages/helpcontent/page-help-contents-routing.module.ts b/src/app/pages/helpcontent/page-help-contents-routing.module.ts new file mode 100644 index 0000000..1e490b0 --- /dev/null +++ b/src/app/pages/helpcontent/page-help-contents-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {PageHelpContentsComponent} from './page-help-contents.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: PageHelpContentsComponent} + ]) + ] +}) +export class PageHelpContentsRoutingModule { } diff --git a/src/app/pages/helpcontent/page-help-contents.module.ts b/src/app/pages/helpcontent/page-help-contents.module.ts new file mode 100644 index 0000000..f6118e1 --- /dev/null +++ b/src/app/pages/helpcontent/page-help-contents.module.ts @@ -0,0 +1,24 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {FABModule} from '../../utils/fabModule.module'; +import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; +import {PageHelpContentsRoutingModule} from './page-help-contents-routing.module'; +import {PageHelpContentsComponent} from './page-help-contents.component'; +import {SafeHtmlPipeModule} from '../../openaireLibrary/utils/pipes/safeHTMLPipe.module'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, FABModule, SafeHtmlPipeModule, + AlertModalModule, ReactiveFormsModule, PageHelpContentsRoutingModule + ], + declarations: [ + PageHelpContentsComponent + ], + providers: [IsCommunity, ConnectAdminLoginGuard], + exports: [PageHelpContentsComponent] +}) +export class PageHelpContentsModule { } diff --git a/src/app/pages/htmlpagecontent/edit-html-page-content-routing.module.ts b/src/app/pages/htmlpagecontent/edit-html-page-content-routing.module.ts new file mode 100644 index 0000000..0cd2d05 --- /dev/null +++ b/src/app/pages/htmlpagecontent/edit-html-page-content-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {EditHtmlPageContentComponent} from './edit-htmlpage-content.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: EditHtmlPageContentComponent} + ]) + ] +}) +export class EditHtmlPageContentRoutingModule { } diff --git a/src/app/pages/htmlpagecontent/htmlpagecontent.module.ts b/src/app/pages/htmlpagecontent/edit-html-page-content.module.ts similarity index 53% rename from src/app/pages/htmlpagecontent/htmlpagecontent.module.ts rename to src/app/pages/htmlpagecontent/edit-html-page-content.module.ts index 4cb743c..43e1101 100644 --- a/src/app/pages/htmlpagecontent/htmlpagecontent.module.ts +++ b/src/app/pages/htmlpagecontent/edit-html-page-content.module.ts @@ -6,20 +6,19 @@ import { RouterModule } from '@angular/router'; import { CKEditorModule } from 'ng2-ckeditor'; -import { EnvironmentSpecificResolver } from '../../openaireLibrary/utils/properties/environmentSpecificResolver'; -import { EnvironmentSpecificService } from '../../openaireLibrary/utils/properties/environment-specific.service'; - -import {ErrorMessagesModule} from '../../openaireLibrary/utils/errorMessages.module'; +import {ErrorMessagesModule} from '../../openaireLibrary/utils/errorMessages.module'; import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; import {SafeHtmlPipeModule} from '../../openaireLibrary/utils/pipes/safeHTMLPipe.module'; -import { HtmlPageContentFormComponent } from "./html-page-content-form.component"; -import { EditHtmlPageContentComponent } from "./edit-htmlpage-content.component"; -import { HtmlPageContentService } from "./html-page-content.service"; +import { HtmlPageContentFormComponent } from './html-page-content-form.component'; +import { EditHtmlPageContentComponent } from './edit-htmlpage-content.component'; +import { HtmlPageContentService } from './html-page-content.service'; +import {EditHtmlPageContentRoutingModule} from './edit-html-page-content-routing.module'; +import {CommonModule} from '@angular/common'; @NgModule({ imports: [ - BrowserModule, + CommonModule, HttpModule, JsonpModule, FormsModule, @@ -28,16 +27,17 @@ import { HtmlPageContentService } from "./html-page-content.service"; CKEditorModule, ErrorMessagesModule, AlertModalModule, - SafeHtmlPipeModule + SafeHtmlPipeModule, + EditHtmlPageContentRoutingModule ], declarations: [ HtmlPageContentFormComponent, EditHtmlPageContentComponent, ], providers: [ - HtmlPageContentService, - EnvironmentSpecificResolver,EnvironmentSpecificService - ] + HtmlPageContentService + ], + exports: [EditHtmlPageContentComponent] }) -export class HtmlPageContentModule { } +export class EditHtmlPageContentModule { } diff --git a/src/app/pages/page/pages-routing.module.ts b/src/app/pages/page/pages-routing.module.ts new file mode 100644 index 0000000..1abcca4 --- /dev/null +++ b/src/app/pages/page/pages-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {PagesComponent} from './pages.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: PagesComponent} + ]) + ] +}) +export class PagesRoutingModule { } diff --git a/src/app/pages/page/pages.module.ts b/src/app/pages/page/pages.module.ts new file mode 100644 index 0000000..cba3b82 --- /dev/null +++ b/src/app/pages/page/pages.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; +import {FABModule} from '../../utils/fabModule.module'; +import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module'; +import {PagesComponent} from './pages.component'; +import {PageFormComponent} from './page-form.component'; +import {PagesRoutingModule} from './pages-routing.module'; + +@NgModule({ + imports: [ + CommonModule, RouterModule, FormsModule, FABModule, + AlertModalModule, ReactiveFormsModule, PagesRoutingModule + ], + declarations: [PagesComponent, PageFormComponent], + providers: [IsCommunity, ConnectAdminLoginGuard], + exports: [PagesComponent] +}) +export class PagesModule { } diff --git a/src/app/pages/stats/stats-routing.module.ts b/src/app/pages/stats/stats-routing.module.ts new file mode 100644 index 0000000..78e7fe1 --- /dev/null +++ b/src/app/pages/stats/stats-routing.module.ts @@ -0,0 +1,14 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {StatsComponent} from './stats.component'; + +@NgModule({ + imports: [ + RouterModule.forChild([ + { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: StatsComponent} + ]) + ] +}) +export class StatsRoutingModule { } diff --git a/src/app/pages/stats/stats.component.ts b/src/app/pages/stats/stats.component.ts index 478755a..8f7d03c 100644 --- a/src/app/pages/stats/stats.component.ts +++ b/src/app/pages/stats/stats.component.ts @@ -6,7 +6,6 @@ import { Community } from '../../domain/community'; import { DomSanitizer } from '@angular/platform-browser'; import {TitleCasePipe} from '@angular/common'; import {availableEntitiesMap, StatisticsDisplay, StatisticsSummary} from '../../openaireLibrary/connect/statistics/statisticsEntities'; -import {Observable} from 'rxjs/Observable'; import {ConfigurationService} from '../../openaireLibrary/utils/configuration/configuration.service'; import {Session} from '../../openaireLibrary/login/utils/helper.class'; diff --git a/src/app/pages/stats/stats.module.ts b/src/app/pages/stats/stats.module.ts new file mode 100644 index 0000000..7a5e210 --- /dev/null +++ b/src/app/pages/stats/stats.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import {RouterModule} from '@angular/router'; +import {CommonModule} from '@angular/common'; +import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard'; +import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard'; +import {StatsComponent} from './stats.component'; +import {StatsRoutingModule} from './stats-routing.module'; + +@NgModule({ + imports: [ + CommonModule, StatsRoutingModule, RouterModule + ], + declarations: [StatsComponent], + providers: [IsCommunity, ConnectAdminLoginGuard], + exports: [StatsComponent] +}) +export class StatsModule { }