From 585d2fd79e084c5433272527d07f283dc35b1d67 Mon Sep 17 00:00:00 2001 From: Dave Hansen-Lange <1127349+dalin-@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:48:45 -0500 Subject: [PATCH 1/2] feat(SHS-5913): Initial install of Dashboard module --- composer.json | 1 + composer.lock | 93 +- config/default/core.extension.yml | 1 + .../default/views.view.dashboard_content.yml | 1405 +++++++++++++++++ 4 files changed, 1496 insertions(+), 4 deletions(-) create mode 100644 config/default/views.view.dashboard_content.yml diff --git a/composer.json b/composer.json index 576be2ab98..a3aca74988 100644 --- a/composer.json +++ b/composer.json @@ -78,6 +78,7 @@ "drupal/core-composer-scaffold": "~10.3.0", "drupal/core-recommended": "~10.3.0", "drupal/cshs": "^4.0", + "drupal/dashboard": "^2.0@alpha", "drupal/default_content": "^2.0", "drupal/diff": "^1.0", "drupal/display_field_copy": "^2.1", diff --git a/composer.lock b/composer.lock index 03e9839b3a..3dce511f88 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2f7bad9bdb9e627d50c258def1e34095", + "content-hash": "9e1a0e6f5f8a9cac199426b8f9edd6f5", "packages": [ { "name": "acquia/blt", @@ -4578,6 +4578,91 @@ "source": "https://git.drupalcode.org/project/ctools" } }, + { + "name": "drupal/dashboard", + "version": "2.0.0-alpha1", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/dashboard.git", + "reference": "2.0.0-alpha1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/dashboard-2.0.0-alpha1.zip", + "reference": "2.0.0-alpha1", + "shasum": "d0feb638700b5e7aebc6d4ad8293226b9b92529f" + }, + "require": { + "drupal/core": "^9 || ^10 || ^11" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "2.0.0-alpha1", + "datestamp": "1732126700", + "security-coverage": { + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "See contributors", + "homepage": "https://www.drupal.org/node/35094/maintainers" + }, + { + "name": "Anonymous", + "homepage": "https://www.drupal.org/user/0" + }, + { + "name": "ChrisMiller627", + "homepage": "https://www.drupal.org/user/274027" + }, + { + "name": "ckrina", + "homepage": "https://www.drupal.org/user/1206650" + }, + { + "name": "dmitrig01", + "homepage": "https://www.drupal.org/user/47566" + }, + { + "name": "jtsnow", + "homepage": "https://www.drupal.org/user/171614" + }, + { + "name": "mtift", + "homepage": "https://www.drupal.org/user/751908" + }, + { + "name": "penyaskito", + "homepage": "https://www.drupal.org/user/959536" + }, + { + "name": "pingers", + "homepage": "https://www.drupal.org/user/56282" + }, + { + "name": "plopesc", + "homepage": "https://www.drupal.org/user/282415" + }, + { + "name": "webchick", + "homepage": "https://www.drupal.org/user/24967" + } + ], + "description": "Dashboard (another attempt, yes)", + "homepage": "https://www.drupal.org/project/dashboard", + "support": { + "source": "https://git.drupalcode.org/project/dashboard", + "issues": "https://www.drupal.org/project/issues/dashboard" + } + }, { "name": "drupal/default_content", "version": "2.0.0-alpha3", @@ -26145,14 +26230,14 @@ "drupal/views_ical": 15, "drupal/webform": 10, "onlyextart/colorbox": 20, - "su-sws/blt-sws": 20, - "su-sws/stanford_basic": 20 + "su-sws/stanford_basic": 20, + "su-sws/blt-sws": 20 }, "prefer-stable": true, "prefer-lowest": false, "platform": { "php": ">=8.3" }, - "platform-dev": {}, + "platform-dev": [], "plugin-api-version": "2.6.0" } diff --git a/config/default/core.extension.yml b/config/default/core.extension.yml index 0c06e94525..d13aa55bc6 100644 --- a/config/default/core.extension.yml +++ b/config/default/core.extension.yml @@ -46,6 +46,7 @@ module: csv_serialization: 0 ctools: 0 ctools_views: 0 + dashboard: 0 datetime: 0 datetime_range: 0 default_content: 0 diff --git a/config/default/views.view.dashboard_content.yml b/config/default/views.view.dashboard_content.yml new file mode 100644 index 0000000000..64e8c3f55b --- /dev/null +++ b/config/default/views.view.dashboard_content.yml @@ -0,0 +1,1405 @@ +uuid: 76da3f26-93cb-4f23-8311-9ae53b28d538 +langcode: en +status: true +dependencies: + module: + - node + - user +_core: + default_config_hash: VU2B0OjzeHGk32ixG2NpIKv6_TTB5bKou2lMUxFi5hw +id: dashboard_content +label: 'Dashboard content blocks' +module: views +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 +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + title: 'My recent content' + fields: + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + plugin_id: field + label: Title + 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: string + settings: + link_to_entity: 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 + type: + id: type + table: node_field_data + field: type + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: type + plugin_id: field + label: 'Content type' + 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: target_id + type: entity_reference_label + settings: + link: true + group_column: target_id + 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_data + field: changed + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: changed + plugin_id: field + label: 'Last update' + 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: timestamp_ago + settings: + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + 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 + operations: + id: operations + table: node_revision + field: operations + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: entity_operations + label: '' + 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: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + destination: false + pager: + type: some + options: + offset: 0 + items_per_page: 10 + exposed_form: + type: basic + options: + submit_button: Filter + reset_button: true + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + access: + type: perm + options: + perm: 'view own unpublished content' + cache: + type: tag + options: { } + 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 authored any content yet." + tokenize: false + sorts: + changed: + id: changed + table: node_field_data + field: changed + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: changed + plugin_id: date + order: DESC + expose: + label: Changed + field_identifier: changed + exposed: false + granularity: second + arguments: + 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: { } + 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 + 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: '1' + 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: { } + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + columns: + title: title + type: type + changed: changed + operations: operations + default: '-1' + info: + title: + sortable: false + default_sort_order: asc + align: '' + 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: '' + override: true + sticky: false + summary: '' + empty_table: true + caption: '' + description: '' + row: + type: fields + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + 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: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - 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: entity_target_id + default_action: default + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: current_user + default_argument_options: { } + 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 + target_entity_type_id: user + uid: + id: uid + table: node_field_data + field: uid + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: uid + plugin_id: entity_target_id + default_action: default + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: current_user + default_argument_options: { } + 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 + target_entity_type_id: user + 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: '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: + 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 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - user + - 'user.node_grants:view' + - user.permissions + tags: { } + block_site_content: + id: block_site_content + display_title: 'Site content' + display_plugin: block + position: 4 + display_options: + title: 'Site Content' + fields: + node_bulk_form: + id: node_bulk_form + table: node + field: node_bulk_form + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: node_bulk_form + label: '' + 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: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + action_title: Action + include_exclude: exclude + selected_actions: { } + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + plugin_id: field + label: Title + 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: string + settings: + link_to_entity: 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 + type: + id: type + table: node_field_data + field: type + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: type + plugin_id: field + label: 'Content type' + 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: target_id + type: entity_reference_label + settings: + link: true + group_column: target_id + 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_data + field: changed + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: changed + plugin_id: field + label: Updated + 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: timestamp + settings: + date_format: short + custom_date_format: '' + timezone: '' + tooltip: + date_format: long + custom_date_format: '' + time_diff: + enabled: false + future_format: '@interval hence' + past_format: '@interval ago' + granularity: 2 + refresh: 60 + 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 + operations: + id: operations + table: node_revision + field: operations + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: entity_operations + label: '' + 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: false + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + destination: false + name: + id: name + table: users_field_data + field: name + relationship: uid + group_type: group + admin_label: '' + entity_type: user + entity_field: name + plugin_id: field + label: Author + 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: user_name + settings: + link_to_entity: 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 + arguments: { } + 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: '1' + 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: { } + title: + id: title + table: node_field_data + field: title + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: title + plugin_id: string + operator: contains + value: '' + group: 1 + exposed: true + expose: + operator_id: title_op + label: Search + description: '' + use_operator: false + operator: title_op + operator_limit_selection: false + operator_list: { } + identifier: title + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + content_editor: '0' + administrator: '0' + placeholder: '' + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + type: + id: type + table: node_field_data + field: type + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: type + plugin_id: bundle + operator: in + value: { } + group: 1 + exposed: true + expose: + operator_id: type_op + label: 'Content type' + description: '' + use_operator: false + operator: type_op + operator_limit_selection: false + operator_list: { } + identifier: type + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + anonymous: '0' + content_editor: '0' + administrator: '0' + 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: { } + filter_groups: + operator: AND + groups: + 1: AND + defaults: + title: false + relationships: false + fields: false + arguments: false + filters: false + filter_groups: false + relationships: + uid: + id: uid + table: node_field_data + field: uid + relationship: none + group_type: group + admin_label: author + entity_type: node + entity_field: uid + plugin_id: standard + required: false + display_description: '' + display_extenders: { } + block_description: 'Site Content' + block_category: 'Content Management' + cache_metadata: + max-age: 0 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - user + - 'user.node_grants:view' + - user.permissions + tags: { } From 81fcea49f18f323ccae3f4cc3e33d135b1d6106c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mariana=20N=C3=BA=C3=B1ez?= <48533432+mariannuar@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:26:54 -0600 Subject: [PATCH 2/2] SH-5972: Use default Drupal layouts in Dashboard (#1697) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(shs-5972): use default drupal layouts in dashboard * feat(shs-5972): use DashboardSectionStorage instead * feat(shs-5972): use DashboardSectionStorage instead * fix(shs-5972): small fixes in code * fix(shs-5972): small fixes in code * Update docroot/modules/humsci/hs_layouts/hs_layouts.info.yml Co-authored-by: Andrés Díaz Soto --------- Co-authored-by: Mari Nez Co-authored-by: Andrés Díaz Soto --- .../humsci/hs_layouts/hs_layouts.info.yml | 1 + .../humsci/hs_layouts/hs_layouts.module | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/docroot/modules/humsci/hs_layouts/hs_layouts.info.yml b/docroot/modules/humsci/hs_layouts/hs_layouts.info.yml index a3a79bbd7d..9ca2ada66e 100644 --- a/docroot/modules/humsci/hs_layouts/hs_layouts.info.yml +++ b/docroot/modules/humsci/hs_layouts/hs_layouts.info.yml @@ -6,6 +6,7 @@ version: 8.2.7 package: 'Humanities & Sciences' dependencies: - layout_discovery + - dashboard:dashboard components: namespaces: diff --git a/docroot/modules/humsci/hs_layouts/hs_layouts.module b/docroot/modules/humsci/hs_layouts/hs_layouts.module index 463e1dd9c9..2bed638f45 100644 --- a/docroot/modules/humsci/hs_layouts/hs_layouts.module +++ b/docroot/modules/humsci/hs_layouts/hs_layouts.module @@ -6,6 +6,7 @@ */ use Drupal\Component\Utility\Html; +use Drupal\dashboard\Plugin\SectionStorage\DashboardSectionStorage; use Drupal\paragraphs\ParagraphInterface; /** @@ -14,8 +15,21 @@ use Drupal\paragraphs\ParagraphInterface; function hs_layouts_plugin_filter_layout__layout_builder_alter(&$definitions, &$extra, &$consumer) { /** @var \Drupal\Core\Layout\LayoutDefinition $definition */ foreach ($definitions as $id => $definition) { - if ($definition->getProvider() !== 'hs_layouts') { - unset($definitions[$id]); + $provider = $definition->getProvider(); + if ($extra['section_storage'] instanceof DashboardSectionStorage) { + // Define providers to unset for the dashboard. + $providers_to_unset = [ + 'ui_patterns_library', + 'hs_layouts', + 'ds', + ]; + if (in_array($provider, $providers_to_unset)) { + unset($definitions[$id]); + } + } else { + if ($provider !== 'hs_layouts') { + unset($definitions[$id]); + } } } }