@@ -132,24 +132,39 @@ export class UmbDocumentCreateOptionsModalElement extends UmbModalBaseElement<
132
132
` ;
133
133
}
134
134
135
+ #renderNoDocumentTypes( ) {
136
+ if ( this . data ?. documentType ?. unique ) {
137
+ return html `
138
+ <umb- localize key= "create_noDocumentTypes" >
139
+ There are no allowed Document Types available for creating content here . You must enable these in
140
+ <strong> Document Types </ strong> within the <strong> Settings </ strong> section , by editing the
141
+ <strong> Allowed child node types </ strong> under <strong> Structure </ strong> .
142
+ </ umb- localize>
143
+ <br / >
144
+ <uui- butto n
145
+ id= "edit-permissions"
146
+ look = "secondary"
147
+ href= ${ `/section/settings/workspace/document-type/edit/${ this . data ?. documentType ?. unique } /view/structure` }
148
+ label= ${ this . localize . term ( 'create_noDocumentTypesEditPermissions' ) }
149
+ @click = ${ ( ) => this . _rejectModal ( ) } > </ uui- butto n>
150
+ ` ;
151
+ } else {
152
+ return html `
153
+ <umb- localize key= "create_noDocumentTypesAllowedAtRoot" >
154
+ There are no allowed Document Types available for creating content here . You must enable these in
155
+ <strong> Document Types </ strong> within the <strong> Settings </ strong> section , by changing the
156
+ <strong> Allow as root </ strong> option under <strong> Structure </ strong> .
157
+ </ umb- localize>
158
+ ` ;
159
+ }
160
+ }
161
+
135
162
#renderDocumentTypes( ) {
136
163
return html `
137
164
<uui- box .headline = ${ this . _headline } >
138
165
${ when (
139
166
this . _allowedDocumentTypes . length === 0 ,
140
- ( ) => html `
141
- <umb- localize key= "create_noDocumentTypes" >
142
- There are no allowed Document Types available for creating content here . You must enable these in
143
- <strong> Document Types </ strong> within the <strong> Settings </ strong> section , by editing the
144
- <strong> Allowed child node types </ strong> under <strong> Permissions </ strong> .<br / >
145
- </ umb- localize>
146
- <uui- butto n
147
- id= "edit-permissions"
148
- look = "secondary"
149
- href = ${ `/section/settings/workspace/document-type/edit/${ this . data ?. documentType ?. unique } /view/structure` }
150
- label= ${ this . localize . term ( 'create_noDocumentTypesEditPermissions' ) }
151
- @click = ${ ( ) => this . _rejectModal ( ) } > </ uui- butto n>
152
- ` ,
167
+ ( ) => this . #renderNoDocumentTypes( ) ,
153
168
( ) =>
154
169
repeat (
155
170
this . _allowedDocumentTypes ,
0 commit comments