From f7acfa637eaa43cbccd0ebc385f0545340961996 Mon Sep 17 00:00:00 2001 From: Chris Kim Date: Thu, 14 Sep 2023 15:15:50 -0700 Subject: [PATCH] Increase truncation to 60 chars to allow for different ids for accordion elements --- .../facility_health_service.drupal.liquid | 86 +++++---- .../facilities/health_service.drupal.liquid | 2 +- .../layouts/faq_multiple_q_a.drupal.liquid | 2 +- .../health_care_local_facility.drupal.liquid | 178 ++++++++---------- src/site/layouts/landing_page.drupal.liquid | 75 +++++--- .../collapsible_panel.drupal.liquid | 116 ++++++------ .../q_a.collapsible_panel.drupal.liquid | 18 +- ..._a_group_collapsible_content.drupal.liquid | 2 +- 8 files changed, 236 insertions(+), 243 deletions(-) diff --git a/src/site/facilities/facility_health_service.drupal.liquid b/src/site/facilities/facility_health_service.drupal.liquid index aef272e422..d83836f6d1 100644 --- a/src/site/facilities/facility_health_service.drupal.liquid +++ b/src/site/facilities/facility_health_service.drupal.liquid @@ -1,48 +1,46 @@ - {% assign serviceTaxonomy = healthService.fieldServiceNameAndDescripti.entity %} - -

- {{ serviceTaxonomy.name }} -

-
- {% if serviceTaxonomy.fieldCommonlyTreatedCondition %} -
- Common conditions: {{ serviceTaxonomy.fieldCommonlyTreatedCondition }} -
- {% endif %} +{% assign serviceTaxonomy = healthService.fieldServiceNameAndDescripti.entity %} + +

+ {{ serviceTaxonomy.name }} +

+
+ {% if serviceTaxonomy.fieldCommonlyTreatedCondition %} +
+ Common conditions: + + {{ serviceTaxonomy.fieldCommonlyTreatedCondition }} +
+ {% endif %} - {% if serviceSection.name == "Lovell - TRICARE" and serviceTaxonomy.fieldTricareDescription %} -
{{ serviceTaxonomy.fieldTricareDescription }}
- {% elsif serviceTaxonomy.description.processed %} -
{{ serviceTaxonomy.description.processed }}
- {% endif %} + {% if serviceSection.name == "Lovell - TRICARE" and serviceTaxonomy.fieldTricareDescription %} +
{{ serviceTaxonomy.fieldTricareDescription }}
+ {% elsif serviceTaxonomy.description.processed %} +
{{ serviceTaxonomy.description.processed }}
+ {% endif %} - {% if locations.0.entity %} - {% include "src/site/facilities/health_care_local_health_service.drupal.liquid" %} - {% else %} -
{{ localServiceDescription }}
- {% endif %} + {% if locations.0.entity %} + {% include "src/site/facilities/health_care_local_health_service.drupal.liquid" %} + {% else %} +
{{ localServiceDescription }}
+ {% endif %} - {% if fieldFacilityLocatorApiId contains "vha_" %} -
- {% endif %} + {% if fieldFacilityLocatorApiId contains "vha_" %} +
+ {% endif %} - {% if healthService.fieldBody.processed %} -
{{ healthService.fieldBody.processed | replace: 'h3', 'h4' }}
- {% endif %} -
-
+ {% if healthService.fieldBody.processed %} +
{{ healthService.fieldBody.processed | replace: 'h3', 'h4' }}
+ {% endif %} +
+
\ No newline at end of file diff --git a/src/site/facilities/health_service.drupal.liquid b/src/site/facilities/health_service.drupal.liquid index 56b1685c31..264bc7a511 100644 --- a/src/site/facilities/health_service.drupal.liquid +++ b/src/site/facilities/health_service.drupal.liquid @@ -7,7 +7,7 @@ class="va-accordion-item" data-label="{{ serviceTaxonomy.name }}" data-template="facilities/health_service" - id="{{serviceTaxonomy.name | hashReference: 30 }}" + id="{{serviceTaxonomy.name | hashReference: 60 }}" >

{{ serviceTaxonomy.name }} diff --git a/src/site/layouts/faq_multiple_q_a.drupal.liquid b/src/site/layouts/faq_multiple_q_a.drupal.liquid index 2ddd3cbfc5..1dc0be0d41 100644 --- a/src/site/layouts/faq_multiple_q_a.drupal.liquid +++ b/src/site/layouts/faq_multiple_q_a.drupal.liquid @@ -78,7 +78,7 @@

{{ fieldQA.entity.title }} diff --git a/src/site/layouts/health_care_local_facility.drupal.liquid b/src/site/layouts/health_care_local_facility.drupal.liquid index 9324eb529d..d0bf0055ae 100644 --- a/src/site/layouts/health_care_local_facility.drupal.liquid +++ b/src/site/layouts/health_care_local_facility.drupal.liquid @@ -9,8 +9,7 @@
{% include "src/site/includes/lovell-switch-link.drupal.liquid" with - entityUrl = entityUrl - %} + entityUrl = entityUrl %} {% if title != empty %}

{{ title }}

@@ -22,8 +21,7 @@
{% endif %} -
+
{% assign basePath = entityUrl.path | regionBasePath %} {% include "src/site/facilities/facilities_health_services_buttons.drupal.liquid" with path = basePath %}
@@ -33,12 +31,10 @@

Location and contact information

-
+
-
+
@@ -51,39 +47,38 @@
-

+

Address

@@ -96,36 +91,35 @@ {{ fieldAddress.addressLine1 }}, {{ fieldAddress.locality }}, {{ fieldAddress.administrativeArea }} {{ fieldAddress.postalCode }} {% endcapture %} {% include "src/site/includes/directions-google-maps.liquid" with - directionsLinkTitle = title - directionsLinkAddress = fullAddress - %} + directionsLinkTitle = title + directionsLinkAddress = fullAddress %}
-

+

Phone numbers

{% if fieldPhoneNumber %} {% endif %} {% if fieldRegionPage.entity.fieldVaHealthConnectPhone %} {% endif %} {% if fieldMentalHealthPhone %} -
Mental + {% endif %}
@@ -135,9 +129,8 @@
{% include "src/site/includes/image_and_static_map.liquid" with - facilityMedia = fieldMedia - facilityId = fieldFacilityLocatorApiId - %} + facilityMedia = fieldMedia + facilityId = fieldFacilityLocatorApiId %}
@@ -146,23 +139,21 @@ {% endcapture %} {% unless difference contains '-' %}
-

+

Prepare for your visit

Click on a topic for more details.

{% for accordionItem in fieldLocationServices %} {% assign item = accordionItem.entity %} {% comment %} - See Google Analytics datalayer handling in src/applications/static-pages/subscribeAccordionEvents.js + See Google Analytics datalayer handling in src/applications/static-pages/subscribeAccordionEvents.js {% endcomment %} + id="{{ item.fieldTitle | hashReference: 60 }}">
{% include "src/site/paragraphs/wysiwyg.drupal.liquid" entity = item %}
@@ -175,61 +166,58 @@ {% if fieldRegionPage.entity.fieldRelatedLinks != empty %} {% include "src/site/paragraphs/facilities/list_of_link_teasers_facility.drupal.liquid" - with paragraph = fieldRegionPage.entity.fieldRelatedLinks.entity - regionNickname = fieldRegionPage.entity.title - %} + with paragraph = fieldRegionPage.entity.fieldRelatedLinks.entity + regionNickname = fieldRegionPage.entity.title %} {% endif %} {% if fieldLocalHealthCareService != empty and fieldLocalHealthCareService.length %} -

Health services offered here

+

Health services offered here

Click on a service for more details like location, contact, and appointment information.

-
+
{% assign localHealthServices = fieldLocalHealthCareService | sortObjectsBy: 'entity.fieldRegionalHealthService.entity.fieldServiceNameAndDescripti.entity.name' %} - {% for localService in localHealthServices %} - {% assign serviceSection = localService.entity.fieldAdministration.entity %} - {% assign localHealthService = localService.entity | featureFieldRegionalHealthService %} - {% if localHealthService != empty and localService.entity.status == true %} - - {% include "src/site/facilities/facility_health_service.drupal.liquid" with - serviceSection - healthService = localHealthService - locationEntity = localService.entity - locations = localService.entity.fieldServiceLocation - localServiceDescription = localService.entity.fieldBody.processed - fieldFacilityLocatorApiId = fieldFacilityLocatorApiId - %} - - {% endif %} - {% endfor %} + {% for localService in localHealthServices %} + {% assign serviceSection = localService.entity.fieldAdministration.entity %} + {% assign localHealthService = localService.entity | featureFieldRegionalHealthService %} + {% if localHealthService != empty and localService.entity.status == true %} + + {% include "src/site/facilities/facility_health_service.drupal.liquid" with + serviceSection + healthService = localHealthService + locationEntity = localService.entity + locations = localService.entity.fieldServiceLocation + localServiceDescription = localService.entity.fieldBody.processed + fieldFacilityLocatorApiId = fieldFacilityLocatorApiId %} + + {% endif %} + {% endfor %}
{% endif %} {% if fieldFacilityLocatorApiId contains "vha_" %} -
-
+
{% endif %} {% include "src/site/facilities/facility_social_links.drupal.liquid" - with regionNickname = fieldRegionPage.entity.title - fieldGovdeliveryIdEmerg = fieldRegionPage.entity.fieldGovdeliveryIdEmerg - fieldGovdeliveryIdNews = fieldRegionPage.entity.fieldGovdeliveryIdNews - fieldOperatingStatus = fieldRegionPage.entity.fieldOperatingStatus - fieldFacebook = fieldRegionPage.entity.fieldFacebook - fieldTwitter = fieldRegionPage.entity.fieldTwitter - fieldInstagram = fieldRegionPage.entity.fieldInstagram - fieldFlickr = fieldRegionPage.entity.fieldFlickr - %} - - {% include "src/site/includes/above-footer-elements.drupal.liquid" %} + with regionNickname = fieldRegionPage.entity.title + fieldGovdeliveryIdEmerg = fieldRegionPage.entity.fieldGovdeliveryIdEmerg + fieldGovdeliveryIdNews = fieldRegionPage.entity.fieldGovdeliveryIdNews + fieldOperatingStatus = fieldRegionPage.entity.fieldOperatingStatus + fieldFacebook = fieldRegionPage.entity.fieldFacebook + fieldTwitter = fieldRegionPage.entity.fieldTwitter + fieldInstagram = fieldRegionPage.entity.fieldInstagram + fieldFlickr = fieldRegionPage.entity.fieldFlickr %} + + {% include "src/site/includes/above-footer-elements.drupal.liquid" %}
@@ -237,4 +225,4 @@
{% include "src/site/includes/footer.html" %} -{% include "src/site/includes/debug.drupal.liquid" %} +{% include "src/site/includes/debug.drupal.liquid" %} \ No newline at end of file diff --git a/src/site/layouts/landing_page.drupal.liquid b/src/site/layouts/landing_page.drupal.liquid index 88f6a181a5..92df3ff61b 100644 --- a/src/site/layouts/landing_page.drupal.liquid +++ b/src/site/layouts/landing_page.drupal.liquid @@ -2,7 +2,10 @@ {% include "src/site/includes/preview-edit.drupal.liquid" %} {% include "src/site/includes/breadcrumbs.drupal.liquid" %} -
+
@@ -29,8 +32,8 @@ {% if fieldAlert.length %} {% for alert in fieldAlert %} {% if alert.entity != empty %} - {% include "src/site/blocks/alert.drupal.liquid" with alert = alert.entity %} - {% endif %} + {% include "src/site/blocks/alert.drupal.liquid" with alert = alert.entity %} + {% endif %} {% endfor %} {% else %} {% if fieldAlert.entity != empty %} @@ -52,8 +55,8 @@ {% include 'src/site/paragraphs/list_of_link_teasers.drupal.liquid' entity = fieldRelatedLinks.entity boldTitle = true %} {% endif %} - - {% include "src/site/includes/above-footer-elements.drupal.liquid" %} + + {% include "src/site/includes/above-footer-elements.drupal.liquid" %}
@@ -62,13 +65,12 @@ {% endif %} - + id="{{ 'Message us' | hashReference }}">

Message us

\ No newline at end of file diff --git a/src/site/paragraphs/q_a.collapsible_panel.drupal.liquid b/src/site/paragraphs/q_a.collapsible_panel.drupal.liquid index 5f37a87cba..bf704d4e61 100644 --- a/src/site/paragraphs/q_a.collapsible_panel.drupal.liquid +++ b/src/site/paragraphs/q_a.collapsible_panel.drupal.liquid @@ -1,6 +1,6 @@
- + {% assign questions = entity.fieldQuestions %} {% assign sectionHeader = entity.fieldSectionHeader %} @@ -11,20 +11,18 @@ + level="{{ level }}" + {% else %} + level=3 + {% endif %}>
+ data-analytics-faq-text="{{ item.fieldQuestion | escape }}">
{% for answer in item.fieldAnswer %} {% assign bundleComponent = "src/site/paragraphs/" | append: answer.entity.entityBundle | append: ".drupal.liquid" %} @@ -35,4 +33,4 @@ {% endfor %} -
+
\ No newline at end of file diff --git a/src/site/paragraphs/q_a_group_collapsible_content.drupal.liquid b/src/site/paragraphs/q_a_group_collapsible_content.drupal.liquid index 391d7d1535..54af73be52 100644 --- a/src/site/paragraphs/q_a_group_collapsible_content.drupal.liquid +++ b/src/site/paragraphs/q_a_group_collapsible_content.drupal.liquid @@ -13,7 +13,7 @@ {% for item in fieldQAs %} {% assign id = item.entityId %} - +
{% if item.fieldAnswer %}