From 4851660558f4ce7bb50df70cfca420f85e98720c Mon Sep 17 00:00:00 2001
From: Lone Iversen <108085781+loivsen@users.noreply.github.com>
Date: Tue, 11 Jun 2024 10:15:01 +0200
Subject: [PATCH] add missing edit permissions for document create options
modal
---
.../document-create-options-modal.element.ts | 22 ++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/document-create-options-modal.element.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/document-create-options-modal.element.ts
index f1cb7e1e04..51146a3c1c 100644
--- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/document-create-options-modal.element.ts
+++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/document-create-options-modal.element.ts
@@ -118,9 +118,11 @@ export class UmbDocumentCreateOptionsModalElement extends UmbModalBaseElement<
render() {
return html`
- ${this._availableBlueprints.length && this.#documentTypeUnique
- ? this.#renderBlueprints()
- : this.#renderDocumentTypes()}
+ ${when(
+ this._availableBlueprints.length === 0 && this.#documentTypeUnique,
+ () => this.#renderBlueprints(),
+ () => this.#renderDocumentTypes(),
+ )}
`;
@@ -134,8 +136,14 @@ export class UmbDocumentCreateOptionsModalElement extends UmbModalBaseElement<
There are no allowed Document Types available for creating content here. You must enable these in
Document Types within the Settings section, by editing the
- Allowed child node types under Permissions
+ Allowed child node types under Permissions
+ this._rejectModal()}
+ href=${`/section/settings/workspace/document-type/edit/${this.data?.documentType?.unique}/view/structure`}
+ label=${this.localize.term('create_noDocumentTypesEditPermissions')}>
`,
() =>
repeat(
@@ -145,7 +153,7 @@ export class UmbDocumentCreateOptionsModalElement extends UmbModalBaseElement<
html` this.#onSelectDocumentType(documentType.unique)}>
@@ -183,6 +191,10 @@ export class UmbDocumentCreateOptionsModalElement extends UmbModalBaseElement<
#blank {
border-bottom: 1px solid var(--uui-color-border);
}
+
+ #edit-permissions {
+ margin-top: var(--uui-size-6);
+ }
`,
];
}