From 3c5c46855f0d6b4a79f6258220213591cc8c7f36 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 24 Jun 2016 01:56:43 +0100 Subject: [PATCH] Move availability text into the template --- app/config/sculpin_site.yml | 6 +++--- source/_includes/availability.html.twig | 21 ++++++++++++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/app/config/sculpin_site.yml b/app/config/sculpin_site.yml index 8f12e242..283be892 100644 --- a/app/config/sculpin_site.yml +++ b/app/config/sculpin_site.yml @@ -19,9 +19,9 @@ author: role: Senior Drupal Developer website: https://www.appnovation.com -availability: | -

Currently no spare part-time capacity.

-

Currently no spare full-time capacity.

+availability: + full: no + part: no companies: appnovation: diff --git a/source/_includes/availability.html.twig b/source/_includes/availability.html.twig index d30c2cfd..5373aa98 100644 --- a/source/_includes/availability.html.twig +++ b/source/_includes/availability.html.twig @@ -2,6 +2,25 @@
Availability
- {{ site.availability|raw }} + {% for key, availability in site.availability %} +

+ {% if availability == 'yes' %} + + + {{ key == 'full' ? 'Currently have available full-time capacity' }} + {{ key == 'part' ? 'Currently have available part-time capacity' }} + {% elseif availability == 'limited' %} + + + {{ key == 'full' ? 'Currently have limited full-time capacity' }} + {{ key == 'part' ? 'Currently have limited part-time capacity' }} + {% else %} + + + {{ key == 'full' ? 'Currently no spare full-time capacity.' }} + {{ key == 'part' ? 'Currently no spare part-time capacity.' }} + {% endif %} +

+ {% endfor %}