Revert "Simplified availability"

This reverts commit bc180e8792.
This commit is contained in:
Oliver Davies 2016-01-04 13:29:04 +00:00
parent 1e93473285
commit 1220aa885a
2 changed files with 33 additions and 6 deletions

View file

@ -65,6 +65,19 @@ fuzzy_date_format: F Y
title_separator: "|"
html_lang: en-GB
availability:
status:
day: { available: no, start: ~, end: ~ }
evenings: { available: limited, start: 2015-08-10, end: ~ }
text:
day:
yes: <i class="fa fa-thumbs-o-up text-success"></i> Available for day contract work
no: <i class="fa fa-thumbs-o-down text-danger"></i> Not available for day contract work
evenings:
yes: <i class="fa fa-thumbs-o-up text-success"></i> Available for weekend/evening freelance work
limited: <i class="fa fa-thumbs-o-up text-warning"></i> Limited availability for weekend/evening freelance work
no: <i class="fa fa-thumbs-o-down text-danger"></i> Not availabile for weekend/evening freelance work
companies:
horse_country:
title: 'Horse & Country TV'

View file

@ -2,12 +2,26 @@
<div class="panel-heading">Availability</div>
<div class="panel-body">
<p>
<i class="fa fa-thumbs-o-down text-danger"></i> Not available for day contract work.
</p>
{% set now = "now"|date('U') %}
<p style="margin-bottom: 0">
<i class="fa fa-thumbs-o-up text-warning"></i> Limited availability for weekend/evening freelance work.
</p>
{% for type, data in site.availability.status %}
{% set text = site.availability.text[type][data.available] %}
{% if data.start %}
{% if data.start|date('U') > now %}
{% set text = text ~ ' starting ' ~ data.start|date('F Y') %}
{% if data.end %}
{% set text = text ~ ',' %}
{% endif %}
{% endif %}
{% endif %}
{% if data.end %}
{% set text = text ~ ' until ' ~ data.end|date('F Y') %}
{% endif %}
<p>{{ text|raw }}.</p>
{% endfor %}
</div>
</div>