From eb479e4767b91aa3451488b63183257d15b0db9c Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Fri, 30 Dec 2022 11:07:49 +0100 Subject: [PATCH] Marker for deleted content items. (#961) --- backend/i18n/frontend_en.json | 2 ++ backend/i18n/frontend_it.json | 2 ++ backend/i18n/frontend_nl.json | 2 ++ backend/i18n/frontend_pt.json | 2 ++ backend/i18n/frontend_zh.json | 2 ++ backend/i18n/source/frontend_en.json | 2 ++ .../pages/content/content-page.component.html | 1 + .../editor/content-editor.component.html | 19 ++++++++++++++++++- .../editor/content-editor.component.ts | 3 +++ .../components/schema-category.component.html | 4 ++-- .../components/schema-category.component.scss | 4 ++++ .../shared/services/contents.service.spec.ts | 6 ++++-- .../app/shared/services/contents.service.ts | 2 ++ 13 files changed, 46 insertions(+), 5 deletions(-) diff --git a/backend/i18n/frontend_en.json b/backend/i18n/frontend_en.json index 2094e1f33..c5b37de45 100644 --- a/backend/i18n/frontend_en.json +++ b/backend/i18n/frontend_en.json @@ -448,6 +448,7 @@ "contents.currentStatusLabel": "Current Version", "contents.deleteConfirmText": "Do you really want to delete the content?", "contents.deleteConfirmTitle": "Delete content", + "contents.deleted": "This content item has been deleted.", "contents.deleteManyConfirmText": "Do you really want to delete the selected content items?", "contents.deleteReferrerConfirmText": "The content is referenced by another content item.\n\nDo you really want to delete this content?", "contents.deleteReferrerConfirmTitle": "Delete content", @@ -513,6 +514,7 @@ "contents.versionCompare": "Compare", "contents.versionDelete": "Delete this Version", "contents.versionViewing": "Viewing version **{version}**.", + "contents.versionViewingDeleted": "Viewing deleted version **{version}**.", "contents.viewLatest": "View latest", "contents.viewReset": "Reset Default View", "contributors.add": "Add Contributor", diff --git a/backend/i18n/frontend_it.json b/backend/i18n/frontend_it.json index 6ec07cfe9..a1e7dbd57 100644 --- a/backend/i18n/frontend_it.json +++ b/backend/i18n/frontend_it.json @@ -448,6 +448,7 @@ "contents.currentStatusLabel": "Versione corrente", "contents.deleteConfirmText": "Sei sicuro di voler eliminare il contenuto?", "contents.deleteConfirmTitle": "Elimina il contenuto", + "contents.deleted": "This content item has been deleted.", "contents.deleteManyConfirmText": "Sei sicuro di voler eliminare gli elementi del contenuto selezionati?", "contents.deleteReferrerConfirmText": "Il contenuto è collegato a un altro contenuto.\n\nSei sicuro di volerlo cancellare?", "contents.deleteReferrerConfirmTitle": "Contenuto cancellato", @@ -513,6 +514,7 @@ "contents.versionCompare": "Confronta", "contents.versionDelete": "Cancella questa Versione", "contents.versionViewing": "Stai guardando la versione **{version}**.", + "contents.versionViewingDeleted": "Viewing deleted version **{version}**.", "contents.viewLatest": "Visualizza l'ultima", "contents.viewReset": "Imposta la visualizzazione predefinita", "contributors.add": "Aggiungi un collaboratore", diff --git a/backend/i18n/frontend_nl.json b/backend/i18n/frontend_nl.json index 8347ed675..9d66bf493 100644 --- a/backend/i18n/frontend_nl.json +++ b/backend/i18n/frontend_nl.json @@ -448,6 +448,7 @@ "contents.currentStatusLabel": "Huidige versie", "contents.deleteConfirmText": "Wilt je de inhoud echt verwijderen?", "contents.deleteConfirmTitle": "Inhoud verwijderen", + "contents.deleted": "This content item has been deleted.", "contents.deleteManyConfirmText": "Weet je zeker dat je de geselecteerde inhoudsitems wilt verwijderen?", "contents.deleteReferrerConfirmText": "Er wordt naar de inhoud verwezen door een ander inhoudsitem. \n \n Wil je de inhoud echt verwijderen?", "contents.deleteReferrerConfirmTitle": "Inhoud verwijderen", @@ -513,6 +514,7 @@ "contents.versionCompare": "Vergelijk", "contents.versionDelete": "Verwijder deze versie", "contents.versionViewing": "Bekijk versie **{version}**.", + "contents.versionViewingDeleted": "Viewing deleted version **{version}**.", "contents.viewLatest": "Bekijk laatste", "contents.viewReset": "Standaardweergave herstellen", "contributors.add": "Bijdrager toevoegen", diff --git a/backend/i18n/frontend_pt.json b/backend/i18n/frontend_pt.json index 14936e440..797153bf1 100644 --- a/backend/i18n/frontend_pt.json +++ b/backend/i18n/frontend_pt.json @@ -448,6 +448,7 @@ "contents.currentStatusLabel": "Versão atual", "contents.deleteConfirmText": "Deseja mesmo apagar o conteúdo?", "contents.deleteConfirmTitle": "Eliminar conteúdo", + "contents.deleted": "This content item has been deleted.", "contents.deleteManyConfirmText": "Deseja mesmo eliminar os itens de conteúdo selecionados?", "contents.deleteReferrerConfirmText": "O conteúdo é referenciado por outro item de conteúdo.\n\nDeseja mesmo eliminar este conteúdo?", "contents.deleteReferrerConfirmTitle": "Eliminar conteúdo", @@ -513,6 +514,7 @@ "contents.versionCompare": "Comparar", "contents.versionDelete": "Excluir esta versão", "contents.versionViewing": "Versão de visualização **{version}***", + "contents.versionViewingDeleted": "Viewing deleted version **{version}**.", "contents.viewLatest": "Ver as últimas", "contents.viewReset": "Ver por defeito de reposição", "contributors.add": "Adicionar Colaborador", diff --git a/backend/i18n/frontend_zh.json b/backend/i18n/frontend_zh.json index 85f81d3e5..149e8fda5 100644 --- a/backend/i18n/frontend_zh.json +++ b/backend/i18n/frontend_zh.json @@ -448,6 +448,7 @@ "contents.currentStatusLabel": "当前版本", "contents.deleteConfirmText": "你真的要删除内容吗?", "contents.deleteConfirmTitle": "删除内容", + "contents.deleted": "This content item has been deleted.", "contents.deleteManyConfirmText": "您真的要删除选定的内容项吗?", "contents.deleteReferrerConfirmText": "该内容被另一个内容项引用。\n\n您真的要删除该内容吗?", "contents.deleteReferrerConfirmTitle": "删除内容", @@ -513,6 +514,7 @@ "contents.versionCompare": "比较", "contents.versionDelete": "删除此版本", "contents.versionViewing": "查看版本**{version}**。", + "contents.versionViewingDeleted": "Viewing deleted version **{version}**.", "contents.viewLatest": "查看最新", "contents.viewReset": "重置默认视图", "contributors.add": "添加贡献者", diff --git a/backend/i18n/source/frontend_en.json b/backend/i18n/source/frontend_en.json index 2094e1f33..c5b37de45 100644 --- a/backend/i18n/source/frontend_en.json +++ b/backend/i18n/source/frontend_en.json @@ -448,6 +448,7 @@ "contents.currentStatusLabel": "Current Version", "contents.deleteConfirmText": "Do you really want to delete the content?", "contents.deleteConfirmTitle": "Delete content", + "contents.deleted": "This content item has been deleted.", "contents.deleteManyConfirmText": "Do you really want to delete the selected content items?", "contents.deleteReferrerConfirmText": "The content is referenced by another content item.\n\nDo you really want to delete this content?", "contents.deleteReferrerConfirmTitle": "Delete content", @@ -513,6 +514,7 @@ "contents.versionCompare": "Compare", "contents.versionDelete": "Delete this Version", "contents.versionViewing": "Viewing version **{version}**.", + "contents.versionViewingDeleted": "Viewing deleted version **{version}**.", "contents.viewLatest": "View latest", "contents.viewReset": "Reset Default View", "contributors.add": "Add Contributor", diff --git a/frontend/src/app/features/content/pages/content/content-page.component.html b/frontend/src/app/features/content/pages/content/content-page.component.html index a6eaf0f64..de1a7323e 100644 --- a/frontend/src/app/features/content/pages/content/content-page.component.html +++ b/frontend/src/app/features/content/pages/content/content-page.component.html @@ -159,6 +159,7 @@ (loadLatest)="loadLatest()" [(language)]="language" [isNew]="!content" + [isDeleted]="content?.isDeleted" [contentForm]="contentForm" [contentFormCompare]="contentFormCompare" [contentVersion]="contentVersion" diff --git a/frontend/src/app/features/content/pages/content/editor/content-editor.component.html b/frontend/src/app/features/content/pages/content/editor/content-editor.component.html index a42419e30..16cba7684 100644 --- a/frontend/src/app/features/content/pages/content/editor/content-editor.component.html +++ b/frontend/src/app/features/content/pages/content/editor/content-editor.component.html @@ -2,12 +2,29 @@ + +
+ +
+ +
+ {{ 'contents.deleted' | sqxTranslate }} +
+
diff --git a/frontend/src/app/features/content/pages/content/editor/content-editor.component.ts b/frontend/src/app/features/content/pages/content/editor/content-editor.component.ts index c37e584ad..2bbe16f67 100644 --- a/frontend/src/app/features/content/pages/content/editor/content-editor.component.ts +++ b/frontend/src/app/features/content/pages/content/editor/content-editor.component.ts @@ -26,6 +26,9 @@ export class ContentEditorComponent { @Input() public isNew = false; + @Input() + public isDeleted?: boolean; + @Input() public showIdInput = false; diff --git a/frontend/src/app/shared/components/schema-category.component.html b/frontend/src/app/shared/components/schema-category.component.html index 2ad60eb6e..0ed0f2ea1 100644 --- a/frontend/src/app/shared/components/schema-category.component.html +++ b/frontend/src/app/shared/components/schema-category.component.html @@ -6,13 +6,13 @@ (cdkDropListDropped)="changeCategory($event)">