From 62ab1cd3bbad3b6e2fd4f4d156f202eb42ba7805 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 10 Aug 2015 08:19:12 +0100 Subject: [PATCH] Use variables --- source/_partials/availability.html.twig | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/source/_partials/availability.html.twig b/source/_partials/availability.html.twig index f4438fa8..0de9de79 100644 --- a/source/_partials/availability.html.twig +++ b/source/_partials/availability.html.twig @@ -3,18 +3,20 @@
{% set day_available = site.availability.day.available %} {% if (day_available == 'no') %} -

Not available for day contract work.

+ {% set day_status = 'Not available for day contract work' %} {% else %} -

Available for day contract work.

+ {% set day_status = 'Available for day contract work' %} {% endif %} +

{{ day_status }}.

{% set evenings_available = site.availability.evenings.available %} {% if (evenings_available == 'yes') %} -

Available for weekend/evening freelance work.

+ {% set evening_status = 'Available for weekend/evening freelance work' %} {% elseif (evenings_available == 'limited') %} -

Limited availability for weekend/evening freelance work.

+ {% set evening_status = 'Limited availability for weekend/evening freelance work' %} {% else %} -

Not available for weekend/evening freelance work.

+ {% set evening_status = 'Not available for weekend/evening freelance work' %} {% endif %} +

{{ evening_status }}.