From db7995e232d0d50dd6835b78e6df2b9d3074f441 Mon Sep 17 00:00:00 2001 From: Mike Decker Date: Wed, 28 Jun 2023 14:20:58 -0700 Subject: [PATCH] D8CORE-6368 Use list elements for related policy display --- ...w_display.node.stanford_policy.default.yml | 40 +++--- config/sync/views.view.policies.yml | 127 ++++++++++++++++++ 2 files changed, 146 insertions(+), 21 deletions(-) diff --git a/config/sync/core.entity_view_display.node.stanford_policy.default.yml b/config/sync/core.entity_view_display.node.stanford_policy.default.yml index e728d4466..ed2a77b47 100644 --- a/config/sync/core.entity_view_display.node.stanford_policy.default.yml +++ b/config/sync/core.entity_view_display.node.stanford_policy.default.yml @@ -264,27 +264,6 @@ third_party_settings: centered: centered-container columns: default components: - 4678072f-26f1-4620-ad43-13ef301bd28f: - uuid: 4678072f-26f1-4620-ad43-13ef301bd28f - region: main - configuration: - id: 'field_block:node:stanford_policy:su_policy_related' - label: 'Related Policies' - label_display: visible - provider: layout_builder - context_mapping: - entity: layout_builder.entity - view_mode: view_mode - formatter: - type: entity_reference_entity_view - label: hidden - settings: - view_mode: stanford_card - third_party_settings: - field_formatter_class: - class: grid-container-3 - weight: 1 - additional: { } 9239f3b1-86c9-4d97-8e6c-f1ded39f2a02: uuid: 9239f3b1-86c9-4d97-8e6c-f1ded39f2a02 region: main @@ -297,6 +276,20 @@ third_party_settings: node: layout_builder.entity weight: 0 additional: { } + cc6dd1c6-4316-45bc-aa41-88df5e814c0e: + uuid: cc6dd1c6-4316-45bc-aa41-88df5e814c0e + region: main + configuration: + id: 'views_block:policies-related_policies' + label: '' + label_display: visible + provider: views + context_mapping: { } + views_label: '' + items_per_page: none + exposed: { } + weight: 2 + additional: { } third_party_settings: { } layout_library: enable: false @@ -310,6 +303,8 @@ third_party_settings: - 'Content fields' - 'Custom block types' - 'Custom blocks' + - Devel + - 'Devel PHP' - 'Events Lists (Views)' - Forms - Help @@ -395,6 +390,7 @@ third_party_settings: - 'system_menu_block:main' 'Policy (Views)': - 'views_block:policies-child_pages' + - 'views_block:policies-related_policies' Printable: - 'printable_links_block:node' System: @@ -404,6 +400,8 @@ third_party_settings: restricted_categories: - 'Chaos Tools' - 'Config Pages' + - Devel + - 'Devel PHP' - Forms - Help - 'Lists (Views)' diff --git a/config/sync/views.view.policies.yml b/config/sync/views.view.policies.yml index f003ce3ca..f6c58f204 100644 --- a/config/sync/views.view.policies.yml +++ b/config/sync/views.view.policies.yml @@ -3,6 +3,7 @@ langcode: en status: true dependencies: config: + - core.entity_view_mode.node.stanford_card - core.entity_view_mode.node.teaser - node.type.stanford_policy module: @@ -232,3 +233,129 @@ display: - 'user.node_grants:view' - user.permissions tags: { } + related_policies: + id: related_policies + display_title: 'Related Policies' + display_plugin: block + position: 2 + display_options: + title: 'Related Policies' + arguments: + nid: + id: nid + table: node_field_data + field: nid + relationship: reverse__node__su_policy_related + group_type: group + admin_label: '' + entity_type: node + entity_field: nid + plugin_id: node_nid + default_action: default + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: node + 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: true + not: false + nid_1: + id: nid_1 + table: node_field_data + field: nid + relationship: none + group_type: group + admin_label: '' + entity_type: node + entity_field: nid + plugin_id: node_nid + default_action: ignore + exception: + value: all + title_enable: false + title: All + title_enable: false + title: '' + default_argument_type: fixed + default_argument_options: + argument: '' + 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 + style: + type: html_list + options: + row_class: '' + default_row_class: true + uses_fields: false + type: ul + wrapper_class: '' + class: 'su-list-unstyled grid-container-3' + row: + type: 'entity:node' + options: + view_mode: stanford_card + defaults: + title: false + css_class: false + style: false + row: false + relationships: false + arguments: false + relationships: + reverse__node__su_policy_related: + id: reverse__node__su_policy_related + table: node_field_data + field: reverse__node__su_policy_related + relationship: none + group_type: group + admin_label: su_policy_related + entity_type: node + plugin_id: entity_reverse + required: false + css_class: su-policy-related + display_description: '' + display_extenders: { } + block_category: 'Policy (Views)' + block_hide_empty: true + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url + - 'user.node_grants:view' + - user.permissions + tags: { }