From 01f2807c973a9fe009b796e0be41073f5518d537 Mon Sep 17 00:00:00 2001 From: ifrik Date: Fri, 20 Oct 2023 16:00:47 +0200 Subject: [PATCH] Place three content blocks on the Content Management board; see #3395496 --- composer.json | 1 + ...dashboard.dashboard.content_management.yml | 32 +- ...s.yml => views.view.dashboard_content.yml} | 371 ++++++++++++++++-- 3 files changed, 369 insertions(+), 35 deletions(-) rename config/sync/{views.view.my_own_drafts.yml => views.view.dashboard_content.yml} (57%) diff --git a/composer.json b/composer.json index 439bbf1..93ced35 100644 --- a/composer.json +++ b/composer.json @@ -90,6 +90,7 @@ "Provide a block for clearing cache from a dashboard": "https://www.drupal.org/files/issues/2023-06-28/3351706-27-block-clear-cache.patch" }, "drupal/dashboard": { + "Provide content blocks in one view": "https://www.drupal.org/files/issues/2023-10-20/3395496-8.patch" } } } diff --git a/config/sync/dashboard.dashboard.content_management.yml b/config/sync/dashboard.dashboard.content_management.yml index fe43178..834d390 100644 --- a/config/sync/dashboard.dashboard.content_management.yml +++ b/config/sync/dashboard.dashboard.content_management.yml @@ -13,11 +13,11 @@ layout: context_mapping: { } column_widths: 50-50 components: - 7e5e7ef4-cd78-4301-a84f-e6c8dc7074be: - uuid: 7e5e7ef4-cd78-4301-a84f-e6c8dc7074be + ef01b050-597d-4462-9131-9ce5361d8501: + uuid: ef01b050-597d-4462-9131-9ce5361d8501 region: first configuration: - id: 'views_block:my_own_drafts-block_own_drafts' + id: 'views_block:dashboard_content-block_own_drafts' label: '' label_display: visible provider: views @@ -26,6 +26,32 @@ layout: items_per_page: none weight: 0 additional: { } + fb01524d-6ea6-4574-81a5-9fc1678ad529: + uuid: fb01524d-6ea6-4574-81a5-9fc1678ad529 + region: second + configuration: + id: 'views_block:dashboard_content-block_own_recent_content' + label: '' + label_display: visible + provider: views + context_mapping: { } + views_label: '' + items_per_page: none + weight: 1 + additional: { } + 5db2e933-08eb-4dbf-a24b-a7407f24b063: + uuid: 5db2e933-08eb-4dbf-a24b-a7407f24b063 + region: first + configuration: + id: 'views_block:dashboard_content-block_edited_content' + label: '' + label_display: visible + provider: views + context_mapping: { } + views_label: '' + items_per_page: none + weight: 1 + additional: { } third_party_settings: { } - layout_id: layout_twocol_section diff --git a/config/sync/views.view.my_own_drafts.yml b/config/sync/views.view.dashboard_content.yml similarity index 57% rename from config/sync/views.view.my_own_drafts.yml rename to config/sync/views.view.dashboard_content.yml index 4b061f4..44d65ab 100644 --- a/config/sync/views.view.my_own_drafts.yml +++ b/config/sync/views.view.dashboard_content.yml @@ -1,4 +1,4 @@ -uuid: 44b585d6-f869-4892-a2f9-a67bd23b390e +uuid: 80ef084b-9376-4e8b-9fef-1d27a7c11ce1 langcode: en status: true dependencies: @@ -7,10 +7,10 @@ dependencies: - user _core: default_config_hash: vBRgLa2N_ZpelIUHvLsVTSoDrgTLjRNExoS8_hMWU5A -id: my_own_drafts -label: 'My own drafts' +id: dashboard_content +label: 'Dashboard content blocks' module: views -description: 'Current user own content drafts, for being used in the dashboard.' +description: 'Lists of content related to the current user, for being used in the dashboard.' tag: dashboard base_table: node_field_data base_field: nid @@ -21,7 +21,7 @@ display: display_plugin: default position: 0 display_options: - title: 'My own drafts' + title: 'My recent content' fields: title: id: title @@ -270,23 +270,10 @@ display: hide_alter_empty: true destination: false pager: - type: mini + type: some options: offset: 0 - items_per_page: 5 - total_pages: null - id: 0 - tags: - next: ' ›' - previous: '‹ ' - expose: - items_per_page: false - items_per_page_label: 'Items per page' - items_per_page_options: '5, 10, 25, 50' - items_per_page_options_all: false - items_per_page_options_all_label: '- All -' - offset: false - offset_label: Offset + items_per_page: 10 exposed_form: type: basic options: @@ -314,23 +301,23 @@ display: admin_label: '' plugin_id: text_custom empty: true - content: 'You have no pending drafts' + content: "You haven't authored any content yet." tokenize: false sorts: - created: - id: created + changed: + id: changed table: node_field_data - field: created + field: changed relationship: none group_type: group admin_label: '' entity_type: node - entity_field: created + entity_field: changed plugin_id: date order: DESC expose: - label: '' - field_identifier: '' + label: Changed + field_identifier: changed exposed: false granularity: second arguments: @@ -382,7 +369,7 @@ display: entity_field: status plugin_id: boolean operator: '=' - value: '0' + value: '1' group: 1 exposed: false expose: @@ -458,6 +445,10 @@ display: default_row_class: true columns: title: title + type: type + changed: changed + operations: operations + revision_uid: revision_uid default: '-1' info: title: @@ -467,6 +458,32 @@ display: separator: '' empty_column: false responsive: '' + type: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + changed: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + operations: + align: '' + separator: '' + empty_column: false + responsive: '' + revision_uid: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' override: true sticky: false summary: '' @@ -484,6 +501,11 @@ display: replica: false query_tags: { } relationships: { } + use_more: true + use_more_always: true + use_more_text: 'See all content' + link_display: custom_url + link_url: /admin/content header: { } footer: { } display_extenders: { } @@ -493,19 +515,305 @@ display: - 'languages:language_content' - 'languages:language_interface' - url - - url.query_args + - user + - 'user.node_grants:view' + - user.permissions + tags: { } + block_edited_content: + id: block_edited_content + display_title: 'Edited content block' + display_plugin: block + position: 1 + display_options: + title: 'Content I recently edited' + empty: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + plugin_id: text_custom + empty: true + content: "You haven't edited any content." + tokenize: false + arguments: + revision_uid: + id: revision_uid + table: node_revision + field: revision_uid + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: revision_uid + plugin_id: numeric + default_action: default + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: current_user + default_argument_options: { } + default_argument_skip_url: false + summary_options: + base_path: '' + count: true + override: false + items_per_page: 25 + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: false + not: false + uid: + id: uid + table: node_field_data + field: uid + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: uid + plugin_id: numeric + default_action: default + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: current_user + default_argument_options: { } + default_argument_skip_url: false + summary_options: + base_path: '' + count: true + override: false + items_per_page: 25 + summary: + sort_order: asc + number_of_records: 0 + format: default_summary + specify_validation: false + validate: + type: none + fail: 'not found' + validate_options: { } + break_phrase: false + not: true + filters: + status_extra: + id: status_extra + table: node_field_data + field: status_extra + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: node_status + operator: '=' + value: false + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + filter_groups: + operator: AND + groups: + 1: AND + defaults: + empty: false + title: false + relationships: false + fields: true + arguments: false + filters: false + filter_groups: false + relationships: { } + display_description: 'Content edited by the current user.' + display_comment: 'Block of content by other authors that has been edited by the current user, for being used in the dashboard.' + display_extenders: { } + block_description: 'Content edited by the current user' + block_category: 'Content Management' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url - user - 'user.node_grants:view' - user.permissions tags: { } block_own_drafts: id: block_own_drafts - display_title: Block + display_title: 'Drafts block' + display_plugin: block + position: 1 + display_options: + title: 'My drafts' + empty: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + plugin_id: text_custom + empty: true + content: 'You have no pending drafts.' + tokenize: false + filters: + status: + id: status + table: node_field_data + field: status + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: status + plugin_id: boolean + operator: '=' + value: '0' + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + status_extra: + id: status_extra + table: node_field_data + field: status_extra + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: node_status + operator: '=' + value: false + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + operator_limit_selection: false + operator_list: { } + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + filter_groups: + operator: AND + groups: + 1: AND + defaults: + empty: false + title: false + filters: false + filter_groups: false + display_description: 'Drafts by the current user.' + display_comment: "Block of the current user's unpublished content, for being used in the dashboard." + display_extenders: { } + block_description: "Current user's drafts" + block_category: 'Content Management' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - user + - 'user.node_grants:view' + - user.permissions + tags: { } + block_own_recent_content: + id: block_own_recent_content + display_title: 'Recent content block' display_plugin: block position: 1 display_options: - display_comment: 'Block of the current user own content drafts, for being used in the dashboard.' + defaults: + title: true + display_description: 'Recent content by the current user.' + display_comment: 'Block of published content by the current user, for being used in the dashboard.' display_extenders: { } + block_description: "Current user's content" block_category: 'Content Management' cache_metadata: max-age: -1 @@ -513,7 +821,6 @@ display: - 'languages:language_content' - 'languages:language_interface' - url - - url.query_args - user - 'user.node_grants:view' - user.permissions