@@ -118,9 +118,11 @@ export class UmbDocumentCreateOptionsModalElement extends UmbModalBaseElement<
118
118
render ( ) {
119
119
return html `
120
120
<umb- body- layout headline= ${ this . localize . term ( 'actions_create' ) } >
121
- ${ this . _availableBlueprints . length && this . #documentTypeUnique
122
- ? this . #renderBlueprints( )
123
- : this . #renderDocumentTypes( ) }
121
+ ${ when (
122
+ this . _availableBlueprints . length === 0 && this . #documentTypeUnique,
123
+ ( ) => this . #renderBlueprints( ) ,
124
+ ( ) => this . #renderDocumentTypes( ) ,
125
+ ) }
124
126
<uui- butto n slot= "actions" id = "cancel" label = "Cancel" @click = "${ this . _rejectModal } " > </ uui- butto n>
125
127
</ umb- body- layout>
126
128
` ;
@@ -134,8 +136,14 @@ export class UmbDocumentCreateOptionsModalElement extends UmbModalBaseElement<
134
136
<umb- localize key= "create_noDocumentTypes" >
135
137
There are no allowed Document Types available for creating content here . You must enable these in
136
138
<strong> Document Types </ strong> within the <strong> Settings </ strong> section , by editing the
137
- <strong> Allowed child node types </ strong> under <strong> Permissions </ strong>
139
+ <strong> Allowed child node types </ strong> under <strong> Permissions </ strong> <br / >
138
140
</ umb- localize>
141
+ <uui- butto n
142
+ id= "edit-permissions"
143
+ look = "secondary"
144
+ @click = ${ ( ) => this . _rejectModal ( ) }
145
+ href= ${ `/section/settings/workspace/document-type/edit/${ this . data ?. documentType ?. unique } /view/structure` }
146
+ label= ${ this . localize . term ( 'create_noDocumentTypesEditPermissions' ) } > </ uui- butto n>
139
147
` ,
140
148
( ) =>
141
149
repeat (
@@ -145,7 +153,7 @@ export class UmbDocumentCreateOptionsModalElement extends UmbModalBaseElement<
145
153
html ` <uui- ref- node- document- type
146
154
data- id= ${ ifDefined ( documentType . unique ) }
147
155
.name = ${ documentType . name }
148
- .alias = ${ documentType . description }
156
+ .alias = ${ documentType . description ?? '' }
149
157
select- only
150
158
selectable
151
159
@selected = ${ ( ) => this . #onSelectDocumentType( documentType . unique ) } >
@@ -183,6 +191,10 @@ export class UmbDocumentCreateOptionsModalElement extends UmbModalBaseElement<
183
191
# blank {
184
192
border-bottom : 1px solid var (--uui-color-border );
185
193
}
194
+
195
+ # edit-permissions {
196
+ margin-top : var (--uui-size-6 );
197
+ }
186
198
` ,
187
199
] ;
188
200
}
0 commit comments