Skip to content

Commit f0ac7b4

Browse files
Document/Media Recycle Bin: Add 'Trashed' state to info workspace view (#20581)
* Add 'Trashed' state to document workspace view Introduces a new 'Trashed' label and tag for documents in the workspace view. Updates localization to include the 'Trashed' term for improved clarity when displaying trashed documents. * Show trashed state in media workspace info view --------- Co-authored-by: Jacob Overgaard <[email protected]>
1 parent 5f0122e commit f0ac7b4

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

src/Umbraco.Web.UI.Client/src/assets/lang/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ export default {
294294
titleOptional: 'Title (optional)',
295295
altTextOptional: 'Alternative text (optional)',
296296
captionTextOptional: 'Caption (optional)',
297+
trashed: 'Trashed',
297298
type: 'Type',
298299
unpublish: 'Unpublish',
299300
unpublished: 'Unpublished',

src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/views/info/document-workspace-view-info.element.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,12 @@ export class UmbDocumentWorkspaceViewInfoElement extends UmbLitElement {
179179
</uui-tag>
180180
`;
181181
}
182+
case DocumentVariantStateModel.TRASHED:
183+
return html`
184+
<uui-tag color="danger" look="primary" label=${this.localize.term('content_trashed')}>
185+
${this.localize.term('content_trashed')}
186+
</uui-tag>
187+
`;
182188
default:
183189
return html`
184190
<uui-tag look="primary" label=${this.localize.term('content_notCreated')}>

src/Umbraco.Web.UI.Client/src/packages/media/media/workspace/views/info/media-workspace-view-info.element.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export class UmbMediaWorkspaceViewInfoElement extends UmbLitElement {
129129

130130
#renderGeneralSection() {
131131
return html`
132-
${this.#renderCreateDate()} ${this.#renderUpdateDate()}
132+
${this.#renderTrashState()} ${this.#renderCreateDate()} ${this.#renderUpdateDate()}
133133
<div class="general-item">
134134
<strong><umb-localize key="content_mediaType">Media Type</umb-localize></strong>
135135
<uui-ref-node-document-type
@@ -149,6 +149,20 @@ export class UmbMediaWorkspaceViewInfoElement extends UmbLitElement {
149149
`;
150150
}
151151

152+
#renderTrashState() {
153+
if (!this._isTrashed) return nothing;
154+
155+
return html`
156+
<div class="general-item">
157+
<span>
158+
<uui-tag color="danger" look="primary" label=${this.localize.term('content_trashed')}>
159+
${this.localize.term('content_trashed')}
160+
</uui-tag>
161+
</span>
162+
</div>
163+
`;
164+
}
165+
152166
#renderCreateDate() {
153167
if (!this._createDate) return nothing;
154168
return html`

0 commit comments

Comments
 (0)