mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
Add route to create/edit a community policies
This commit is contained in:
@@ -27,9 +27,11 @@ describe('CommunityAuthorizationsComponent', () => {
|
||||
|
||||
const routeStub = {
|
||||
parent: {
|
||||
data: observableOf({
|
||||
dso: communityRD
|
||||
})
|
||||
parent: {
|
||||
data: observableOf({
|
||||
dso: communityRD
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@@ -33,6 +33,6 @@ export class CommunityAuthorizationsComponent<TDomain extends DSpaceObject> impl
|
||||
* Initialize the component, setting up the community
|
||||
*/
|
||||
ngOnInit(): void {
|
||||
this.dsoRD$ = this.route.parent.data.pipe(first(), map((data) => data.dso));
|
||||
this.dsoRD$ = this.route.parent.parent.data.pipe(first(), map((data) => data.dso));
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,10 @@ import { CommunityRolesComponent } from './community-roles/community-roles.compo
|
||||
import { CommunityCurateComponent } from './community-curate/community-curate.component';
|
||||
import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||
import { CommunityAuthorizationsComponent } from './community-authorizations/community-authorizations.component';
|
||||
import { ResourcePolicyTargetResolver } from '../../shared/resource-policies/resolvers/resource-policy-target.resolver';
|
||||
import { ResourcePolicyCreateComponent } from '../../shared/resource-policies/create/resource-policy-create.component';
|
||||
import { ResourcePolicyResolver } from '../../shared/resource-policies/resolvers/resource-policy.resolver';
|
||||
import { ResourcePolicyEditComponent } from '../../shared/resource-policies/edit/resource-policy-edit.component';
|
||||
|
||||
/**
|
||||
* Routing module that handles the routing for the Edit Community page administrator functionality
|
||||
@@ -45,15 +49,46 @@ import { CommunityAuthorizationsComponent } from './community-authorizations/com
|
||||
component: CommunityCurateComponent,
|
||||
data: { title: 'community.edit.tabs.curate.title', showBreadcrumbs: true }
|
||||
},
|
||||
{
|
||||
/*{
|
||||
path: 'authorizations',
|
||||
component: CommunityAuthorizationsComponent,
|
||||
data: { title: 'community.edit.tabs.authorizations.title', showBreadcrumbs: true }
|
||||
},*/
|
||||
{
|
||||
path: 'authorizations',
|
||||
data: { showBreadcrumbs: true },
|
||||
children: [
|
||||
{
|
||||
path: 'create',
|
||||
resolve: {
|
||||
resourcePolicyTarget: ResourcePolicyTargetResolver
|
||||
},
|
||||
component: ResourcePolicyCreateComponent,
|
||||
data: { title: 'resource-policies.create.page.title' }
|
||||
},
|
||||
{
|
||||
path: 'edit',
|
||||
resolve: {
|
||||
resourcePolicy: ResourcePolicyResolver
|
||||
},
|
||||
component: ResourcePolicyEditComponent,
|
||||
data: { title: 'resource-policies.edit.page.title' }
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: CommunityAuthorizationsComponent,
|
||||
data: { title: 'community.edit.tabs.authorizations.title', showBreadcrumbs: true, hideReturnButton: true }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
])
|
||||
],
|
||||
providers: [
|
||||
ResourcePolicyResolver,
|
||||
ResourcePolicyTargetResolver
|
||||
]
|
||||
})
|
||||
export class EditCommunityPageRoutingModule {
|
||||
|
||||
|
Reference in New Issue
Block a user