Refactored availability text
This commit is contained in:
parent
795a6455fe
commit
c2fb13a1f5
|
@ -86,11 +86,20 @@ default_date_format: jS F, Y
|
||||||
title_separator: "|"
|
title_separator: "|"
|
||||||
|
|
||||||
availability:
|
availability:
|
||||||
day:
|
status:
|
||||||
available: no
|
day:
|
||||||
start: ~
|
available: no
|
||||||
end: ~
|
start: ~
|
||||||
evenings:
|
end: ~
|
||||||
available: limited
|
evenings:
|
||||||
start: 2015-08-10
|
available: limited
|
||||||
end: ~
|
start: 2015-08-10
|
||||||
|
end: ~
|
||||||
|
text:
|
||||||
|
day:
|
||||||
|
yes: Available for day contract work
|
||||||
|
no: Not available for day contract work
|
||||||
|
evenings:
|
||||||
|
yes: Available for weekend/evening freelance work
|
||||||
|
no: Not availabile for weekend/evening freelance work
|
||||||
|
limited: Limited availability for weekend/evening freelance work
|
||||||
|
|
|
@ -4,22 +4,8 @@
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{% set now = "now"|date('U') %}
|
{% set now = "now"|date('U') %}
|
||||||
|
|
||||||
{% for type, data in site.availability %}
|
{% for type, data in site.availability.status %}
|
||||||
{% if type == 'day' %}
|
{% set text = site.availability.text[type][data.available] %}
|
||||||
{% if data.available == 'yes' %}
|
|
||||||
{% set text = 'Available for day contract work' %}
|
|
||||||
{% elseif data.available == 'no' %}
|
|
||||||
{% set text = 'Not available for day contract work' %}
|
|
||||||
{% endif %}
|
|
||||||
{% elseif type == 'evenings' %}
|
|
||||||
{% if data.available == 'yes' %}
|
|
||||||
{% set text = 'Available for weekend/evening freelance work' %}
|
|
||||||
{% elseif data.available == 'limited' %}
|
|
||||||
{% set text = 'Limited availability for weekend/evening freelance work' %}
|
|
||||||
{% elseif data.available == 'no' %}
|
|
||||||
{% set text = 'Not available for weekend/evening freelance work' %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if data.start %}
|
{% if data.start %}
|
||||||
{% if data.start|date('U') > now %}
|
{% if data.start|date('U') > now %}
|
||||||
|
|
Reference in a new issue