Markup tidy-up
of the components with doctype localizations
This commit is contained in:
@@ -148,7 +148,7 @@ export class UmbInputEntityElement extends UmbFormControlMixin<string | undefine
|
||||
id="btn-add"
|
||||
look="placeholder"
|
||||
@click=${this.#openPicker}
|
||||
label="${this.localize.term('general_choose')}"></uui-button>
|
||||
label=${this.localize.term('general_choose')}></uui-button>
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
@@ -129,11 +129,13 @@ export class UmbCompositionPickerModalElement extends UmbModalBaseElement<
|
||||
<div slot="actions">
|
||||
<uui-button label=${this.localize.term('general_close')} @click=${this._rejectModal}></uui-button>
|
||||
${!this._references.length
|
||||
? html`<uui-button
|
||||
label=${this.localize.term('general_submit')}
|
||||
look="primary"
|
||||
color="positive"
|
||||
@click=${this._submitModal}></uui-button>`
|
||||
? html`
|
||||
<uui-button
|
||||
label=${this.localize.term('general_submit')}
|
||||
look="primary"
|
||||
color="positive"
|
||||
@click=${this._submitModal}></uui-button>
|
||||
`
|
||||
: nothing}
|
||||
</div>
|
||||
</umb-body-layout>
|
||||
@@ -141,7 +143,8 @@ export class UmbCompositionPickerModalElement extends UmbModalBaseElement<
|
||||
}
|
||||
|
||||
#renderHasReference() {
|
||||
return html` <umb-localize key="contentTypeEditor_compositionInUse">
|
||||
return html`
|
||||
<umb-localize key="contentTypeEditor_compositionInUse">
|
||||
This Content Type is used in a composition, and therefore cannot be composed itself.
|
||||
</umb-localize>
|
||||
<h4>
|
||||
@@ -154,19 +157,22 @@ export class UmbCompositionPickerModalElement extends UmbModalBaseElement<
|
||||
${repeat(
|
||||
this._references,
|
||||
(item) => item.unique,
|
||||
(item) =>
|
||||
html`<uui-ref-node-document-type
|
||||
(item) => html`
|
||||
<uui-ref-node-document-type
|
||||
href=${'/section/settings/workspace/document-type/edit/' + item.unique}
|
||||
name=${this.localize.string(item.name)}>
|
||||
<umb-icon slot="icon" name=${item.icon}></umb-icon>
|
||||
</uui-ref-node-document-type>`,
|
||||
</uui-ref-node-document-type>
|
||||
`,
|
||||
)}
|
||||
</div>`;
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
#renderAvailableCompositions() {
|
||||
if (this._compatibleCompositions) {
|
||||
return html`<umb-localize key="contentTypeEditor_compositionsDescription">
|
||||
return html`
|
||||
<umb-localize key="contentTypeEditor_compositionsDescription">
|
||||
Inherit tabs and properties from an existing Document Type. New tabs will be<br />added to the current
|
||||
Document Type or merged if a tab with an identical name exists.<br />
|
||||
</umb-localize>
|
||||
@@ -184,11 +190,14 @@ export class UmbCompositionPickerModalElement extends UmbModalBaseElement<
|
||||
: nothing}
|
||||
${this.#renderCompositionsItems(folder.compositions)}`,
|
||||
)}
|
||||
</div>`;
|
||||
</div>
|
||||
`;
|
||||
} else {
|
||||
return html`<umb-localize key="contentTypeEditor_noAvailableCompositions">
|
||||
There are no Content Types available to use as a composition
|
||||
</umb-localize>`;
|
||||
return html`
|
||||
<umb-localize key="contentTypeEditor_noAvailableCompositions">
|
||||
There are no Content Types available to use as a composition
|
||||
</umb-localize>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,7 +213,8 @@ export class UmbCompositionPickerModalElement extends UmbModalBaseElement<
|
||||
@deselected=${() => this.#onSelectionRemove(compositions.unique)}
|
||||
?selected=${this._selection.find((unique) => unique === compositions.unique)}>
|
||||
<umb-icon name=${compositions.icon} slot="icon"></umb-icon>
|
||||
</uui-menu-item>`,
|
||||
</uui-menu-item>
|
||||
`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -416,14 +416,16 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements
|
||||
return html`
|
||||
<div id="actions">
|
||||
${this._compositionRepositoryAlias
|
||||
? html` <uui-button
|
||||
look="outline"
|
||||
label=${this.localize.term('contentTypeEditor_compositions')}
|
||||
compact
|
||||
@click=${this.#openCompositionModal}>
|
||||
<uui-icon name="icon-merge"></uui-icon>
|
||||
${this.localize.term('contentTypeEditor_compositions')}
|
||||
</uui-button>`
|
||||
? html`
|
||||
<uui-button
|
||||
look="outline"
|
||||
label=${this.localize.term('contentTypeEditor_compositions')}
|
||||
compact
|
||||
@click=${this.#openCompositionModal}>
|
||||
<uui-icon name="icon-merge"></uui-icon>
|
||||
${this.localize.term('contentTypeEditor_compositions')}
|
||||
</uui-button>
|
||||
`
|
||||
: ''}
|
||||
<uui-button look="outline" label=${sortButtonText} compact @click=${this.#toggleSortMode}>
|
||||
<uui-icon name="icon-navigation"></uui-icon>
|
||||
|
||||
@@ -133,60 +133,65 @@ export class UmbDocumentCreateOptionsModalElement extends UmbModalBaseElement<
|
||||
}
|
||||
|
||||
#renderDocumentTypes() {
|
||||
return html`<uui-box .headline=${this._headline}>
|
||||
${when(
|
||||
this._allowedDocumentTypes.length === 0,
|
||||
() => html`
|
||||
<umb-localize key="create_noDocumentTypes">
|
||||
There are no allowed Document Types available for creating content here. You must enable these in
|
||||
<strong>Document Types</strong> within the <strong>Settings</strong> section, by editing the
|
||||
<strong>Allowed child node types</strong> under <strong>Permissions</strong>.<br />
|
||||
</umb-localize>
|
||||
<uui-button
|
||||
id="edit-permissions"
|
||||
look="secondary"
|
||||
@click=${() => this._rejectModal()}
|
||||
href=${`/section/settings/workspace/document-type/edit/${this.data?.documentType?.unique}/view/structure`}
|
||||
label=${this.localize.term('create_noDocumentTypesEditPermissions')}></uui-button>
|
||||
`,
|
||||
() =>
|
||||
repeat(
|
||||
this._allowedDocumentTypes,
|
||||
(documentType) => documentType.unique,
|
||||
(documentType) =>
|
||||
html` <uui-ref-node-document-type
|
||||
data-id=${ifDefined(documentType.unique)}
|
||||
.name=${documentType.name}
|
||||
.alias=${documentType.description ?? ''}
|
||||
select-only
|
||||
selectable
|
||||
@selected=${() => this.#onSelectDocumentType(documentType.unique)}>
|
||||
<umb-icon slot="icon" name=${documentType.icon || 'icon-circle-dotted'}></umb-icon>
|
||||
</uui-ref-node-document-type>`,
|
||||
),
|
||||
)}
|
||||
</uui-box>`;
|
||||
return html`
|
||||
<uui-box .headline=${this._headline}>
|
||||
${when(
|
||||
this._allowedDocumentTypes.length === 0,
|
||||
() => html`
|
||||
<umb-localize key="create_noDocumentTypes">
|
||||
There are no allowed Document Types available for creating content here. You must enable these in
|
||||
<strong>Document Types</strong> within the <strong>Settings</strong> section, by editing the
|
||||
<strong>Allowed child node types</strong> under <strong>Permissions</strong>.<br />
|
||||
</umb-localize>
|
||||
<uui-button
|
||||
id="edit-permissions"
|
||||
look="secondary"
|
||||
href=${`/section/settings/workspace/document-type/edit/${this.data?.documentType?.unique}/view/structure`}
|
||||
label=${this.localize.term('create_noDocumentTypesEditPermissions')}
|
||||
@click=${() => this._rejectModal()}></uui-button>
|
||||
`,
|
||||
() =>
|
||||
repeat(
|
||||
this._allowedDocumentTypes,
|
||||
(documentType) => documentType.unique,
|
||||
(documentType) => html`
|
||||
<uui-ref-node-document-type
|
||||
data-id=${ifDefined(documentType.unique)}
|
||||
.name=${this.localize.string(documentType.name)}
|
||||
.alias=${this.localize.string(documentType.description ?? '')}
|
||||
select-only
|
||||
selectable
|
||||
@selected=${() => this.#onSelectDocumentType(documentType.unique)}>
|
||||
<umb-icon slot="icon" name=${documentType.icon || 'icon-circle-dotted'}></umb-icon>
|
||||
</uui-ref-node-document-type>
|
||||
`,
|
||||
),
|
||||
)}
|
||||
</uui-box>
|
||||
`;
|
||||
}
|
||||
|
||||
#renderBlueprints() {
|
||||
return html`<uui-box headline=${this.localize.term('blueprints_selectBlueprint')}>
|
||||
<uui-menu-item
|
||||
id="blank"
|
||||
label=${this.localize.term('blueprints_blankBlueprint')}
|
||||
@click=${() => this.#onNavigate(this.#documentTypeUnique)}>
|
||||
<umb-icon slot="icon" name=${this.#documentTypeIcon}></umb-icon>
|
||||
</uui-menu-item>
|
||||
${repeat(
|
||||
this._availableBlueprints,
|
||||
(blueprint) => blueprint.unique,
|
||||
(blueprint) =>
|
||||
html`<uui-menu-item
|
||||
label=${blueprint.name}
|
||||
@click=${() => this.#onNavigate(this.#documentTypeUnique, blueprint.unique)}>
|
||||
<umb-icon slot="icon" name="icon-blueprint"></umb-icon>
|
||||
</uui-menu-item>`,
|
||||
)}</uui-box
|
||||
> `;
|
||||
return html`
|
||||
<uui-box headline=${this.localize.term('blueprints_selectBlueprint')}>
|
||||
<uui-menu-item
|
||||
id="blank"
|
||||
label=${this.localize.term('blueprints_blankBlueprint')}
|
||||
@click=${() => this.#onNavigate(this.#documentTypeUnique)}>
|
||||
<umb-icon slot="icon" name=${this.#documentTypeIcon}></umb-icon>
|
||||
</uui-menu-item>
|
||||
${repeat(
|
||||
this._availableBlueprints,
|
||||
(blueprint) => blueprint.unique,
|
||||
(blueprint) =>
|
||||
html`<uui-menu-item
|
||||
label=${blueprint.name}
|
||||
@click=${() => this.#onNavigate(this.#documentTypeUnique, blueprint.unique)}>
|
||||
<umb-icon slot="icon" name="icon-blueprint"></umb-icon>
|
||||
</uui-menu-item>`,
|
||||
)}
|
||||
</uui-box>
|
||||
`;
|
||||
}
|
||||
|
||||
static override styles = [
|
||||
|
||||
@@ -89,7 +89,8 @@ export class UmbMediaCreateOptionsModalElement extends UmbModalBaseElement<
|
||||
}
|
||||
|
||||
#renderNotAllowed() {
|
||||
return html`<umb-localize key="create_noMediaTypes">
|
||||
return html`
|
||||
<umb-localize key="create_noMediaTypes">
|
||||
There are no allowed Media Types available for creating media here. You must enable these in
|
||||
<strong>Media Types</strong> within the <strong>Settings</strong> section, by editing the
|
||||
<strong>Allowed child node types</strong> under <strong>Permissions</strong>. </umb-localize
|
||||
@@ -99,15 +100,16 @@ export class UmbMediaCreateOptionsModalElement extends UmbModalBaseElement<
|
||||
look="secondary"
|
||||
@click=${() => this._rejectModal()}
|
||||
href=${`/section/settings/workspace/media-type/edit/${this.data?.mediaType?.unique}/view/structure`}
|
||||
label=${this.localize.term('create_noMediaTypesEditPermissions')}></uui-button>`;
|
||||
label=${this.localize.term('create_noMediaTypesEditPermissions')}></uui-button>
|
||||
`;
|
||||
}
|
||||
|
||||
#renderAllowedMediaTypes() {
|
||||
return repeat(
|
||||
this._allowedMediaTypes,
|
||||
(mediaType) => mediaType.unique,
|
||||
(mediaType) =>
|
||||
html`<uui-ref-node-document-type
|
||||
(mediaType) => html`
|
||||
<uui-ref-node-document-type
|
||||
data-id=${ifDefined(mediaType.unique)}
|
||||
.name=${this.localize.string(mediaType.name)}
|
||||
.alias=${this.localize.string(mediaType.description ?? '')}
|
||||
@@ -115,7 +117,8 @@ export class UmbMediaCreateOptionsModalElement extends UmbModalBaseElement<
|
||||
selectable
|
||||
@selected=${() => this.#onNavigate(mediaType)}>
|
||||
${mediaType.icon ? html`<umb-icon slot="icon" name=${mediaType.icon}></umb-icon>` : nothing}
|
||||
</uui-ref-node-document-type>`,
|
||||
</uui-ref-node-document-type>
|
||||
`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,8 @@ export class UmbTemplateFieldDropdownListElement extends UmbLitElement {
|
||||
html`<uui-combobox-list-option value=${ifDefined(field.alias)}>${field.alias}</uui-combobox-list-option>`,
|
||||
)}
|
||||
</uui-combobox-list>
|
||||
</uui-combobox>`;
|
||||
</uui-combobox>
|
||||
`;
|
||||
}
|
||||
|
||||
static override styles = [
|
||||
|
||||
Reference in New Issue
Block a user