From a522399d169868e1eed3690115d1eed2074c9782 Mon Sep 17 00:00:00 2001 From: Alex Tkachev Date: Tue, 3 Oct 2023 17:51:36 +0400 Subject: [PATCH] feat: moderation improvements --- .../de/views.view.moderated_content.yml | 3 - .../sync/views.view.moderated_content.yml | 142 +++++++++++++++++- .../config/sync/workflows.workflow.basic.yml | 20 +-- 3 files changed, 142 insertions(+), 23 deletions(-) diff --git a/apps/cms/config/sync/language/de/views.view.moderated_content.yml b/apps/cms/config/sync/language/de/views.view.moderated_content.yml index 344feb9fa..1dedf7f14 100644 --- a/apps/cms/config/sync/language/de/views.view.moderated_content.yml +++ b/apps/cms/config/sync/language/de/views.view.moderated_content.yml @@ -51,9 +51,6 @@ display: type: expose: label: Inhaltstyp - moderation_state: - expose: - label: Moderationsstatus langcode: expose: label: Sprache diff --git a/apps/cms/config/sync/views.view.moderated_content.yml b/apps/cms/config/sync/views.view.moderated_content.yml index dfbe52f2d..1356b1edb 100644 --- a/apps/cms/config/sync/views.view.moderated_content.yml +++ b/apps/cms/config/sync/views.view.moderated_content.yml @@ -277,6 +277,73 @@ display: multi_type: separator separator: ', ' field_api_classes: false + status: + id: status + table: node_field_data + field: status + relationship: nid + group_type: group + admin_label: '' + entity_type: node + entity_field: status + plugin_id: field + label: 'Publication state' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: boolean + settings: + format: custom + format_custom_false: '🌑 Unpublished' + format_custom_true: '🌕 Published' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false moderation_state: id: moderation_state table: node_field_revision @@ -286,8 +353,8 @@ display: admin_label: '' entity_type: node plugin_id: field - label: 'Moderation state' - exclude: false + label: '' + exclude: true alter: alter_text: false text: '' @@ -319,7 +386,7 @@ display: element_class: '' element_label_type: '' element_label_class: '' - element_label_colon: true + element_label_colon: false element_wrapper_type: '' element_wrapper_class: '' element_default_classes: true @@ -340,6 +407,73 @@ display: multi_type: separator separator: ', ' field_api_classes: false + revision_default: + id: revision_default + table: node_revision + field: revision_default + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: revision_default + plugin_id: field + label: 'Moderation state' + exclude: false + alter: + alter_text: true + text: '⏳ {{ moderation_state }}' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: boolean + settings: + format: custom + format_custom_false: 'will be rewritten' + format_custom_true: '' + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false changed: id: changed table: node_field_revision @@ -639,7 +773,7 @@ display: id: moderation_state table: node_field_revision field: moderation_state - relationship: nid + relationship: none group_type: group admin_label: '' entity_type: node diff --git a/apps/cms/config/sync/workflows.workflow.basic.yml b/apps/cms/config/sync/workflows.workflow.basic.yml index 73df4d93b..a621587b0 100644 --- a/apps/cms/config/sync/workflows.workflow.basic.yml +++ b/apps/cms/config/sync/workflows.workflow.basic.yml @@ -11,11 +11,6 @@ label: Basic type: content_moderation type_settings: states: - archived: - label: Archived - weight: 2 - published: false - default_revision: true draft: label: Draft weight: 0 @@ -32,14 +27,6 @@ type_settings: published: true default_revision: true transitions: - archive: - label: Archive - from: - - archived - - draft - - published - to: archived - weight: 2 create_new_draft: label: 'Create New Draft' from: @@ -50,18 +37,19 @@ type_settings: publish: label: Publish from: - - archived - draft - not_published - published to: published weight: 1 unpublish: - label: 'Not published' + label: Unpublish from: + - draft - not_published + - published to: not_published - weight: 3 + weight: 4 entity_types: node: - page