From 8b9d21ddb932a1459294ecf34421b4876475539f Mon Sep 17 00:00:00 2001 From: Ray Estrada Date: Thu, 24 Oct 2024 12:41:38 -0700 Subject: [PATCH] VOTE-3037 Hide untranslated state links in registration tool --- config/sync/views.view.state_territory.yml | 56 ++++++++++++++++++- .../paragraph--registration-tool.html.twig | 4 +- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/config/sync/views.view.state_territory.yml b/config/sync/views.view.state_territory.yml index 5357ebd87..5ec20b6c4 100644 --- a/config/sync/views.view.state_territory.yml +++ b/config/sync/views.view.state_territory.yml @@ -150,6 +150,59 @@ display: multi_type: separator separator: ', ' field_api_classes: false + view_node: + id: view_node + table: node + field: view_node + relationship: none + group_type: group + admin_label: '' + entity_type: node + plugin_id: entity_link + 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 + text: '' + output_url_as_text: true + absolute: false pager: type: none options: @@ -222,8 +275,7 @@ display: plugin_id: language operator: in value: - '***LANGUAGE_site_default***': '***LANGUAGE_site_default***' - en: en + '***LANGUAGE_language_interface***': '***LANGUAGE_language_interface***' group: 1 exposed: false expose: diff --git a/web/themes/custom/votegov/templates/paragraph/paragraph--registration-tool.html.twig b/web/themes/custom/votegov/templates/paragraph/paragraph--registration-tool.html.twig index 8e524eba5..36145521a 100644 --- a/web/themes/custom/votegov/templates/paragraph/paragraph--registration-tool.html.twig +++ b/web/themes/custom/votegov/templates/paragraph/paragraph--registration-tool.html.twig @@ -28,6 +28,8 @@ {% endif %} + {% set results = drupal_view_result('state_territory', 'block') %} + {% if results | length %}