diff --git a/core/modules/content_moderation/config/optional/views.view.moderated_content.yml b/core/modules/content_moderation/config/optional/views.view.moderated_content.yml index f610330628..d30a7047f5 100644 --- a/core/modules/content_moderation/config/optional/views.view.moderated_content.yml +++ b/core/modules/content_moderation/config/optional/views.view.moderated_content.yml @@ -128,27 +128,38 @@ display: id: title table: node_field_revision field: title - entity_type: node - entity_field: title + relationship: none + group_type: group + admin_label: '' + label: Title + exclude: false alter: alter_text: false + text: '' make_link: false + path: '' absolute: false - trim: 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: false ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' strip_tags: false + trim: false + preserve_tags: '' html: false - hide_empty: false - empty_zero: false - settings: - link_to_entity: false - plugin_id: field - relationship: none - group_type: group - admin_label: '' - label: Title - exclude: false element_type: '' element_class: '' element_label_type: '' @@ -158,9 +169,13 @@ display: element_wrapper_class: '' element_default_classes: true empty: '' + hide_empty: false + empty_zero: false hide_alter_empty: true click_sort_column: value type: string + settings: + link_to_entity: true group_column: value group_columns: { } group_rows: true @@ -171,6 +186,9 @@ display: multi_type: separator separator: ', ' field_api_classes: false + entity_type: node + entity_field: title + plugin_id: field type: id: type table: node_field_data @@ -303,9 +321,9 @@ display: plugin_id: field moderation_state: id: moderation_state - table: content_moderation_state_field_revision + table: node_field_revision field: moderation_state - relationship: moderation_state + relationship: none group_type: group admin_label: '' label: 'Moderation state' @@ -350,9 +368,8 @@ display: empty_zero: false hide_alter_empty: true click_sort_column: value - type: string - settings: - link_to_entity: false + type: content_moderation_state + settings: { } group_column: value group_columns: { } group_rows: true @@ -363,8 +380,7 @@ display: multi_type: separator separator: ', ' field_api_classes: false - entity_type: content_moderation_state - entity_field: moderation_state + entity_type: node plugin_id: field changed: id: changed @@ -684,6 +700,44 @@ display: entity_type: node entity_field: langcode plugin_id: language + moderation_state_1: + id: moderation_state_1 + table: node_field_revision + field: moderation_state + relationship: none + group_type: group + admin_label: '' + operator: 'not empty' + value: { } + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + reduce: false + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: node + plugin_id: moderation_state_filter sorts: { } title: 'Moderated content' header: { } @@ -701,16 +755,6 @@ display: content: 'No moderated content available.' plugin_id: text_custom relationships: - moderation_state: - id: moderation_state - table: node_field_revision - field: moderation_state - relationship: none - group_type: group - admin_label: 'Content moderation state' - required: false - entity_type: node - plugin_id: standard uid: id: uid table: node_field_revision @@ -756,7 +800,7 @@ display: position: 1 display_options: display_extenders: { } - path: admin/content/node/moderate + path: admin/content/node/moderated display_description: '' cache_metadata: max-age: 0 diff --git a/core/modules/content_moderation/content_moderation.routing.yml b/core/modules/content_moderation/content_moderation.routing.yml index 95587584ce..f1819b600f 100644 --- a/core/modules/content_moderation/content_moderation.routing.yml +++ b/core/modules/content_moderation/content_moderation.routing.yml @@ -1,5 +1,5 @@ content_moderation.admin_moderated_content: - path: '/admin/content/node/moderate' + path: '/admin/content/node/moderated' defaults: _controller: '\Drupal\content_moderation\Controller\ModeratedContentController::listing' _title: 'Moderated content' diff --git a/core/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php b/core/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php index cbb32da523..ea2c1d5694 100644 --- a/core/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php +++ b/core/modules/content_moderation/src/Plugin/views/filter/ModerationStateFilter.php @@ -124,7 +124,7 @@ protected function opSimple() { if (empty($this->value)) { return; } - + $this->query->addWhere($this->options['group'], 'content_moderation_state.moderation_state', $this->value, $this->operator); } diff --git a/core/modules/content_moderation/src/ViewsData.php b/core/modules/content_moderation/src/ViewsData.php index e1ada8a38e..4f0573f81d 100644 --- a/core/modules/content_moderation/src/ViewsData.php +++ b/core/modules/content_moderation/src/ViewsData.php @@ -202,7 +202,7 @@ public function getViewsData() { ], ], ], - 'field' => ['default_formatter' => 'content_moderation_state'], + 'field' => ['id' => 'field', 'default_formatter' => 'content_moderation_state', 'field_name' => 'moderation_state'], 'filter' => ['id' => 'moderation_state_filter'], ]; @@ -222,7 +222,7 @@ public function getViewsData() { ], ], ], - 'field' => ['default_formatter' => 'content_moderation_state'], + 'field' => ['id' => 'field', 'default_formatter' => 'content_moderation_state', 'field_name' => 'moderation_state'], 'filter' => ['id' => 'moderation_state_filter'], ]; }