diff --git a/resources/i18n/en.json5 b/resources/i18n/en.json5 index e85c374779..c869f51e5f 100644 --- a/resources/i18n/en.json5 +++ b/resources/i18n/en.json5 @@ -1667,15 +1667,51 @@ "resource-policies.add.for.item": "Add a new Item policy", + "resource-policies.create.modal.head": "Create new resource policy", + + "resource-policies.edit.modal.head": "Edit resource policy", + + "resource-policies.form.action-type.label": "Select the action type", + + "resource-policies.form.action-type.required": "You must select the resource policy action.", + + "resource-policies.form.eperson-group-list.label": "Select the eperson or group that will be grant of the permission", + + "resource-policies.form.eperson-group-list.select.btn": "Select", + + "resource-policies.form.eperson-group-list.tab.eperson": "Search for a ePerson", + + "resource-policies.form.eperson-group-list.tab.group": "Search for a group", + + "resource-policies.form.eperson-group-list.table.headers.action": "Action", + + "resource-policies.form.eperson-group-list.table.headers.id": "ID", + + "resource-policies.form.eperson-group-list.table.headers.name": "Name", + + "resource-policies.form.date.end.label": "End Date", + + "resource-policies.form.date.start.label": "Start Date", + + "resource-policies.form.description.label": "Description", + + "resource-policies.form.name.label": "Name", + + "resource-policies.form.policy-type.label": "Select the policy type", + + "resource-policies.form.policy-type.required": "You must select the resource policy type.", + "resource-policies.table.headers.action": "Action", "resource-policies.table.headers.date.end": "End Date", "resource-policies.table.headers.date.start": "Start Date", - "resource-policies.table.headers.group": "Group", + "resource-policies.table.headers.edit": "Edit", - "resource-policies.table.headers.group.edit": "Edit", + "resource-policies.table.headers.eperson": "EPerson", + + "resource-policies.table.headers.group": "Group", "resource-policies.table.headers.name": "Name", diff --git a/src/app/+item-page/edit-item-page/edit-item-page.routing.module.ts b/src/app/+item-page/edit-item-page/edit-item-page.routing.module.ts index b41df21eaf..c9bb14b1a9 100644 --- a/src/app/+item-page/edit-item-page/edit-item-page.routing.module.ts +++ b/src/app/+item-page/edit-item-page/edit-item-page.routing.module.ts @@ -15,6 +15,8 @@ import { ItemRelationshipsComponent } from './item-relationships/item-relationsh import { I18nBreadcrumbResolver } from '../../core/breadcrumbs/i18n-breadcrumb.resolver'; import { ItemVersionHistoryComponent } from './item-version-history/item-version-history.component'; import { ItemAuthorizationsComponent } from './item-authorizations/item-authorizations.component'; +import { ResourcePolicyEditComponent } from '../../shared/resource-policies/edit/resource-policy-edit.component'; +import { ResourcePolicyCreateComponent } from '../../shared/resource-policies/create/resource-policy-create.component'; export const ITEM_EDIT_WITHDRAW_PATH = 'withdraw'; export const ITEM_EDIT_REINSTATE_PATH = 'reinstate'; @@ -116,8 +118,21 @@ export const ITEM_EDIT_AUTHORIZATIONS_PATH = 'authorizations'; }, { path: ITEM_EDIT_AUTHORIZATIONS_PATH, - component: ItemAuthorizationsComponent, data: { title: 'item.edit.authorizations.title' }, + children: [ + { + path: ':dso/create', + component: ResourcePolicyCreateComponent, + }, + { + path: ':dso/:policy/edit', + component: ResourcePolicyEditComponent, + }, + { + path: '', + component: ItemAuthorizationsComponent + } + ] } ] } diff --git a/src/app/shared/resource-policies/create/resource-policy-create.component.html b/src/app/shared/resource-policies/create/resource-policy-create.component.html new file mode 100644 index 0000000000..7990b8eb43 --- /dev/null +++ b/src/app/shared/resource-policies/create/resource-policy-create.component.html @@ -0,0 +1,6 @@ +