Skip to content

Commit

Permalink
D8CORE-6368 Use list elements for related policy display
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jun 28, 2023
1 parent 4dbed8f commit db7995e
Show file tree
Hide file tree
Showing 2 changed files with 146 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -310,6 +303,8 @@ third_party_settings:
- 'Content fields'
- 'Custom block types'
- 'Custom blocks'
- Devel
- 'Devel PHP'
- 'Events Lists (Views)'
- Forms
- Help
Expand Down Expand Up @@ -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:
Expand All @@ -404,6 +400,8 @@ third_party_settings:
restricted_categories:
- 'Chaos Tools'
- 'Config Pages'
- Devel
- 'Devel PHP'
- Forms
- Help
- 'Lists (Views)'
Expand Down
127 changes: 127 additions & 0 deletions config/sync/views.view.policies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: { }

0 comments on commit db7995e

Please sign in to comment.