[develop | DONE | CHANGED ] Change the sidebar menu divide menu items to community profile and content config
This commit is contained in:
parent
378ea26f83
commit
31e217dc7f
|
@ -220,19 +220,23 @@ export class AppComponent implements OnInit {
|
||||||
position: 'left',
|
position: 'left',
|
||||||
badge: true
|
badge: true
|
||||||
};
|
};
|
||||||
let communityInfo = new MenuItem("community", "Community Info", "", "/" + this.community.communityId, false, [], [], {}, {name: 'badge'}, null, null, "/" + this.community.communityId + "/info");
|
let communityInfo = new MenuItem("communityInfo", "Community Info", "", "/" + this.community.communityId, false, [], [], {}, {name: 'badge'}, null, null, "/" + this.community.communityId + "/info");
|
||||||
communityInfo.items = [
|
communityInfo.items = [
|
||||||
new MenuItem("profile", "Profile", "", "/" + this.community.communityId + "/info/profile", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/profile"),
|
new MenuItem("profile", "Profile", "", "/" + this.community.communityId + "/info/profile", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/profile"),
|
||||||
new MenuItem("organizations", "Organizations", "", "/" + this.community.communityId + "/info/organizations", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/organizations"),
|
new MenuItem("organizations", "Organizations", "", "/" + this.community.communityId + "/info/organizations", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/organizations")
|
||||||
new MenuItem("projects", OpenaireEntities.PROJECTS, "", "/" + this.community.communityId + "/info/projects", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/projects"),
|
]
|
||||||
new MenuItem("content-providers", OpenaireEntities.DATASOURCES, "", "/" + this.community.communityId + "/info/content-providers", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/content-providers"),
|
this.sideBarItems.push(communityInfo);
|
||||||
new MenuItem("zenodo-communities", "Zenodo Communities ", "", "/" + this.community.communityId + "/info/zenodo-communities", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/zenodo-communities"),
|
let contentConfiguration = new MenuItem("contentConfiguration", "Content configuration", "", "/" + this.community.communityId +"/config", false, [], [], {}, {name: 'badge'}, null, null, "/" + this.community.communityId + "/config");
|
||||||
new MenuItem("advanced-criteria", "Advanced Criteria", "", "/" + this.community.communityId + "/info/advanced-criteria", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/advanced-criteria")
|
contentConfiguration.items = [
|
||||||
|
new MenuItem("projects", OpenaireEntities.PROJECTS, "", "/" + this.community.communityId + "/config/projects", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/config/projects"),
|
||||||
|
new MenuItem("content-providers", OpenaireEntities.DATASOURCES, "", "/" + this.community.communityId + "/config/content-providers", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/config/content-providers"),
|
||||||
|
new MenuItem("zenodo-communities", "Zenodo Communities ", "", "/" + this.community.communityId + "/config/zenodo-communities", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/config/zenodo-communities"),
|
||||||
|
new MenuItem("advanced-criteria", "Advanced Criteria", "", "/" + this.community.communityId + "/config/advanced-criteria", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/config/advanced-criteria")
|
||||||
]
|
]
|
||||||
if(this.community.type === 'community') {
|
if(this.community.type === 'community') {
|
||||||
communityInfo.items.splice(4, 0, new MenuItem("subjects", "Subjects", "", "/" + this.community.communityId + "/info/subjects", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info/subjects"))
|
contentConfiguration.items.splice(2, 0, new MenuItem("subjects", "Subjects", "", "/" + this.community.communityId + "/config/subjects", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/config/subjects"))
|
||||||
}
|
}
|
||||||
this.sideBarItems.push(communityInfo);
|
this.sideBarItems.push(contentConfiguration);
|
||||||
this.sideBarItems.push(new MenuItem("users", "Users", "", "/" + this.community.communityId + "/users", false, [], [], {}, {name: 'group'}, null, null, "/" + this.community.communityId + "/users"));
|
this.sideBarItems.push(new MenuItem("users", "Users", "", "/" + this.community.communityId + "/users", false, [], [], {}, {name: 'group'}, null, null, "/" + this.community.communityId + "/users"));
|
||||||
this.sideBarItems.push(new MenuItem("admin-tools", "Pages & Menus", "", "/" + this.community.communityId + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, null, "/" + this.community.communityId + "/admin-tools"));
|
this.sideBarItems.push(new MenuItem("admin-tools", "Pages & Menus", "", "/" + this.community.communityId + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, null, "/" + this.community.communityId + "/admin-tools"));
|
||||||
this.sideBarItems.push(new MenuItem("customization", "Customization", "", "/" + this.community.communityId + "/customize-layout", false, [], [], {}, {name: 'brush'}));
|
this.sideBarItems.push(new MenuItem("customization", "Customization", "", "/" + this.community.communityId + "/customize-layout", false, [], [], {}, {name: 'brush'}));
|
||||||
|
|
|
@ -7,12 +7,7 @@ import {ConnectCommunityGuard} from "../../openaireLibrary/connect/communityGuar
|
||||||
RouterModule.forChild([
|
RouterModule.forChild([
|
||||||
{path: '', redirectTo: 'profile', pathMatch: 'full'},
|
{path: '', redirectTo: 'profile', pathMatch: 'full'},
|
||||||
{path: 'profile', loadChildren: () => import('./profile/profile.module').then(m => m.ProfileModule)},
|
{path: 'profile', loadChildren: () => import('./profile/profile.module').then(m => m.ProfileModule)},
|
||||||
{path: 'organizations', loadChildren: () => import('../affiliations/affiliations.module').then(m => m.AffiliationsModule)},
|
{path: 'organizations', loadChildren: () => import('../affiliations/affiliations.module').then(m => m.AffiliationsModule)}
|
||||||
{path: 'projects', loadChildren: () => import('../projects/communityProjects.module').then(m => m.CommunityProjectsModule)},
|
|
||||||
{path: 'content-providers', loadChildren: () => import('../content-providers/communityContentProviders.module').then(m => m.CommunityContentProvidersModule)},
|
|
||||||
{path: 'zenodo-communities', loadChildren: () => import('../zenodo-communities/zenodo-communities.module').then(m => m.ZenodoCommunitiesModule)},
|
|
||||||
{path: 'advanced-criteria', loadChildren: () => import('../advanced-criteria/advanced-criteria.module').then(m => m.AdvancedCriteriaModule)},
|
|
||||||
{path: 'subjects', canActivateChild: [ConnectCommunityGuard], loadChildren: () => import('../subjects/subjects-edit-form/subjects-edit-form.module').then(m => m.SubjectsEditFormModule)},
|
|
||||||
])
|
])
|
||||||
],
|
],
|
||||||
providers: [ConnectCommunityGuard]
|
providers: [ConnectCommunityGuard]
|
||||||
|
|
|
@ -8,6 +8,10 @@ import {ConnectRIGuard} from "../openaireLibrary/connect/communityGuard/connectR
|
||||||
path: 'info',
|
path: 'info',
|
||||||
loadChildren: () => import('./community-info/community-info-routing.module').then(m => m.CommunityInfoRoutingModule),
|
loadChildren: () => import('./community-info/community-info-routing.module').then(m => m.CommunityInfoRoutingModule),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'config',
|
||||||
|
loadChildren: () => import('./content-config/community-content-config-routing.module').then(m => m.CommunityContentConfigRoutingModule),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'users',
|
path: 'users',
|
||||||
loadChildren: () => import('./users/users-routing.module').then(m => m.UsersRoutingModule)
|
loadChildren: () => import('./users/users-routing.module').then(m => m.UsersRoutingModule)
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
import {NgModule} from '@angular/core';
|
||||||
|
import {RouterModule} from '@angular/router';
|
||||||
|
import {ConnectCommunityGuard} from "../../openaireLibrary/connect/communityGuard/connectCommunityGuard.guard";
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
RouterModule.forChild([
|
||||||
|
{path: '', redirectTo: 'projects', pathMatch: 'full'},
|
||||||
|
{path: 'projects', loadChildren: () => import('../projects/communityProjects.module').then(m => m.CommunityProjectsModule)},
|
||||||
|
{path: 'content-providers', loadChildren: () => import('../content-providers/communityContentProviders.module').then(m => m.CommunityContentProvidersModule)},
|
||||||
|
{path: 'zenodo-communities', loadChildren: () => import('../zenodo-communities/zenodo-communities.module').then(m => m.ZenodoCommunitiesModule)},
|
||||||
|
{path: 'advanced-criteria', loadChildren: () => import('../advanced-criteria/advanced-criteria.module').then(m => m.AdvancedCriteriaModule)},
|
||||||
|
{path: 'subjects', canActivateChild: [ConnectCommunityGuard], loadChildren: () => import('../subjects/subjects-edit-form/subjects-edit-form.module').then(m => m.SubjectsEditFormModule)}
|
||||||
|
])
|
||||||
|
],
|
||||||
|
providers: [ConnectCommunityGuard]
|
||||||
|
})
|
||||||
|
export class CommunityContentConfigRoutingModule {
|
||||||
|
}
|
Loading…
Reference in New Issue