Skip to content

Commit

Permalink
VACMS-18456 Update legacy action links to DS action links
Browse files Browse the repository at this point in the history
  • Loading branch information
randimays committed Dec 16, 2024
1 parent 2528a35 commit d44dbda
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 42 deletions.
78 changes: 54 additions & 24 deletions src/site/facilities/main_buttons.drupal.liquid
Original file line number Diff line number Diff line change
@@ -1,28 +1,58 @@
{% comment %}
This is used for Region Landing page and Contact us page
Also used for VBA with parameter
This is used for Region Landing page and Contact us page
Also used for VBA with parameter
{% endcomment %}
<div data-template="facilities/main_buttons">
<div>
{% if buttonType == 'vba' %}
<a class="vads-c-action-link--blue" href="https://va.my.site.com/VAVERA/s/">Make an appointment</a>
{% else %}
{% assign topTask = "make-an-appointment" | topTaskLovellComp: path, buildtype, fieldAdministration, fieldVamcEhrSystem, fieldRegionPage, fieldOffice %}
<a class="vads-c-action-link--blue" href="{{topTask.url}}">{{topTask.text}}</a>
{% endif %}
</div>
<div class="vads-u-margin-y--2">
{% if buttonType == 'vba' %}
<a class="vads-c-action-link--blue" href="https://ask.va.gov">Ask a benefit question</a>
{% else %}
<a class="vads-c-action-link--blue" href="/{{ path }}/health-services">View all health services</a>
{% endif %}
</div>
<div>
{% if buttonType == 'vba' %}
<a class="vads-c-action-link--blue" href="/claim-or-appeal-status">Check a claim status</a>
{% else %}
<a class="vads-c-action-link--blue" href="/{{ path }}/register-for-care">Register for care</a>
{% endif %}
</div>
<div>
{% if buttonType == 'vba' %}
<va-link-action
class="vads-u-display--block"
href="https://va.my.site.com/VAVERA/s/"
text="Make an appointment"
type="secondary"
></va-link-action>
{% else %}
{% assign topTask = "make-an-appointment" | topTaskLovellComp: path, buildtype, fieldAdministration, fieldVamcEhrSystem, fieldRegionPage, fieldOffice %}
<va-link-action
class="vads-u-display--block"
href="{{topTask.url}}"
text="{{topTask.text}}"
type="secondary"
></va-link-action>
{% endif %}
</div>
<div class="vads-u-margin-y--2">
{% if buttonType == 'vba' %}
<va-link-action
class="vads-u-display--block"
href="https://ask.va.gov"
text="Ask a benefit question"
type="secondary"
></va-link-action>
{% else %}
<va-link-action
class="vads-u-display--block"
href="/{{ path }}/health-services"
text="View all health services"
type="secondary"
></va-link-action>
{% endif %}
</div>
<div>
{% if buttonType == 'vba' %}
<va-link-action
class="vads-u-display--block"
href="/claim-or-appeal-status"
text="Check a claim status"
type="secondary"
></va-link-action>
{% else %}
<va-link-action
class="vads-u-display--block"
href="/{{ path }}/register-for-care"
text="Register for care"
type="secondary"
></va-link-action>
{% endif %}
</div>
</div>
8 changes: 4 additions & 4 deletions src/site/layouts/campaign_landing_page.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,12 @@
<!-- Call to action -->
{% if fieldClpVideoPanelMoreVideo.entity.fieldButtonLink.url.path and fieldClpVideoPanelMoreVideo.entity.fieldButtonLabel %}
<p>
<va-link
class="vads-c-action-link--blue"
<va-link-action
class="vads-u-display--block"
href="{{ fieldClpVideoPanelMoreVideo.entity.fieldButtonLink.url.path }}"
text="{{ fieldClpVideoPanelMoreVideo.entity.fieldButtonLabel | strip }}"
>
</va-link>
type="secondary"
></va-link-action>
</p>
{% endif %}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@
<div class="usa-grid usa-grid-full vads-u-margin-y--1p5">
<div class="vads-l-row">
<div class="vads-u-margin-right--2p5">
<a
class="vads-u-margin-top--1 vads-u-margin--0 vads-c-action-link--green"
<va-link-action
class="vads-u-display--block"
href="{{ fieldOffice.entity.fieldLinkFacilityEmergList.url.path }}"
>
Subscribe to emergency notifications
</a>
text="Subscribe to emergency notifications"
></va-link-action>
</div>
</div>
</div>
Expand Down
9 changes: 6 additions & 3 deletions src/site/paragraphs/action_link.drupal.liquid
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<a class="vads-c-action-link--blue" data-template="paragraphs/action_link" href="{{ entity.fieldButtonLink.url.path }}">
{{ entity.fieldButtonLabel }}
</a>
<va-link-action
data-template="paragraphs/action_link"
class="vads-u-display--block"
href="{{ entity.fieldButtonLink.url.path }}"
text="{{ entity.fieldButtonLabel }}"
></va-link-action>
12 changes: 9 additions & 3 deletions src/site/paragraphs/react_widget.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,17 @@
<span class="static-widget-content vads-u-display--none" aria-hidden="true">
{% if entity.fieldDefaultLink != empty %}
{% if entity.fieldButtonFormat %}
{% assign classes = 'class="vads-c-action-link--green"' %}
<va-link-action
class="vads-u-display--block"
href="{{ entity.fieldDefaultLink.url.path }}"
text="{{ entity.fieldDefaultLink.title }}"
></va-link-action>
{% else %}
{% assign classes = '' %}
<va-link
href="{{ entity.fieldDefaultLink.url.path }}"
text="{{ entity.fieldDefaultLink.title }}"
></va-link>
{% endif %}
<a href="{{ entity.fieldDefaultLink.url.path }}" {{ classes }}>{{ entity.fieldDefaultLink.title }}</a>
{% endif %}
</span>
{% if entity.fieldErrorMessage != empty %}
Expand Down
9 changes: 6 additions & 3 deletions src/site/paragraphs/service_location.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,12 @@
{% assign scheduleAppointmentLink = "/health-care/schedule-view-va-appointments" %}
{% endif %}

<a class="vads-c-action-link--blue" href="{{ scheduleAppointmentLink }}">
Schedule an appointment online
</a>
<va-link-action
class="vads-u-display--block"
href="{{ scheduleAppointmentLink }}"
text="Schedule an appointment online"
type="secondary"
></va-link-action>
</div>
{% endif %}

Expand Down

0 comments on commit d44dbda

Please sign in to comment.