Commit 92f7db9d authored by Ken Hawkins's avatar Ken Hawkins
Browse files

Switch job templte to njk for better formatting

parent dbbc3c76
Pipeline #140911 passed with stages
in 34 seconds
......@@ -7,7 +7,7 @@ pagination:
size: 1
addAllPagesToCollections: true
permalink: "position/{{ pagination.items[0].field_jobs_reference_number | makeUppercase | spaceToDashes }}{{ pagination.items[0].urlSuffix }}/index.html"
templateEngineOverride: njk, md
templateEngineOverride: njk
meta:
image: https://www.embl.org/assets/vf-hero/assets/vf-hero--intense.png
description: ""
......@@ -55,7 +55,7 @@ embl_content_meta_properties:
</div>
<div class="vf-content">
# {{pagination.items[0].title | safe }}
<h1>{{pagination.items[0].title | safe }}</h1>
<br/>
......@@ -63,23 +63,21 @@ embl_content_meta_properties:
<h3 class="vf-box__heading">Key information</h3>
<div class="vf-box__text">
<ul class="vf-list vf-list--unordered">
<li class="vf-list__item" itemprop="jobLocation address"><strong>Location:</strong> {{ pagination.items[0].field_jobs_duty_station | striptags }}</li>
{% if pagination.items[0].field_jobs_staff_category != "EICAT Advertising Only" -%}
<li class="vf-list__item" itemprop="employmentType"><strong>Staff category:</strong> {{ pagination.items[0].field_jobs_staff_category }}</li>
{%- endif %}
<li class="vf-list__item" itemprop="employmentType"><strong>Job type:</strong> {{ pagination.items[0].field_jobs_type }}</li>
{% if pagination.items[0].field_jobs_contract_duration | length > 0 -%}
<li class="vf-list__item"><strong>Contract duration:</strong> {{ pagination.items[0].field_jobs_contract_duration }}</li>
{%- endif %}
{% if pagination.items[0].field_jobs_advertise_grade | length > 0 -%}
<li class="vf-list__item" itemprop="baseSalary"><strong>Grading:</strong> {{ pagination.items[0].field_jobs_advertise_grade }}</li>
{%- endif %}
<li class="vf-list__item" itemprop="validThrough"><strong>Closing date:</strong> {{ pagination.items[0].field_jobs_expiration | striptags | parseDate | prettyDate }}</li>
<li class="vf-list__item"><strong>Reference number:</strong> {{ pagination.items[0].field_jobs_reference_number }}</li>
</ul>
<ul class="vf-list vf-list--unordered">
<li class="vf-list__item" itemprop="jobLocation address"><strong>Location:</strong> {{ pagination.items[0].field_jobs_duty_station | striptags }}</li>
{% if pagination.items[0].field_jobs_staff_category != "EICAT Advertising Only" -%}
<li class="vf-list__item" itemprop="employmentType"><strong>Staff category:</strong> {{ pagination.items[0].field_jobs_staff_category }}</li>
{%- endif %}
<li class="vf-list__item" itemprop="employmentType"><strong>Job type:</strong> {{ pagination.items[0].field_jobs_type }}</li>
{% if pagination.items[0].field_jobs_contract_duration | length > 0 -%}
<li class="vf-list__item"><strong>Contract duration:</strong> {{ pagination.items[0].field_jobs_contract_duration }}</li>
{%- endif %}
{% if pagination.items[0].field_jobs_advertise_grade | length > 0 -%}
<li class="vf-list__item" itemprop="baseSalary"><strong>Grading:</strong> {{ pagination.items[0].field_jobs_advertise_grade }}</li>
{%- endif %}
<li class="vf-list__item" itemprop="validThrough"><strong>Closing date:</strong> {{ pagination.items[0].field_jobs_expiration | striptags | parseDate | prettyDate }}</li>
<li class="vf-list__item"><strong>Reference number:</strong> {{ pagination.items[0].field_jobs_reference_number }}</li>
</ul>
</div>
</section>
......@@ -88,93 +86,93 @@ embl_content_meta_properties:
{# {{ pagination.items[0].field_jobs_publish_date | safe }} #}
<div class="vf-u-display-none | used-for-search-index">
</div>
{# Some entries have emblId and some only `id`; https://gitlab.ebi.ac.uk/emblorg/backlog/issues/264 #}
{# <link rel="import" href="https://www.embl.org/api/v1/pattern.html?filter-content-type=person&pattern=vf-summary-profile-l&filter-field-contains[field_foreignid]={{pagination.items[0].emblId}}{{pagination.items[0].id}}&limit=3&sort-field-value[changed]=DESC&source=contenthub" data-target="self" data-embl-js-content-hub-loader> #}
{% if pagination.items[0].field_jobs_staff_category != "EICAT Advertising Only" -%}
Continue reading for more information about this position, or [apply now]({{ pagination.items[0].field_jobs_apply_link }})
{% endif %}
{% if pagination.items[0].field_jobs_staff_category != "EICAT Advertising Only" -%}
<p>Continue reading for more information about this position, or <a href="{{ pagination.items[0].field_jobs_apply_link }}">apply now</a></p>
{% endif %}
---
<hr class="vf-divider" />
<p data-vf-google-analytics-region="job-advert-intro">
{% markdown %}
- <a href="/jobs" class="vf-link">View all EMBL jobs</a>
- <a href="/jobs/alerts" data-vf-analytics-label="alerts-link-top-link" class="vf-link">Create a customised email alert for jobs</a>
{% endmarkdown %}
</p>
---
<hr class="vf-divider" />
<br/>
<section itemprop="description">
{% markdown %}
{% if pagination.items[0].field_jobs_description | length > 0 %}
## About this position
{{ pagination.items[0].field_jobs_description | safe }}
{% endif %}
{% if pagination.items[0].field_jobs_description | length > 0 %}
## About this position
{{ pagination.items[0].field_jobs_description | safe }}
{% endif %}
{% if pagination.items[0].field_jobs_your_role | length > 0 %}
## Your role
{{ pagination.items[0].field_jobs_your_role | safe }}
{% endif %}
{% if pagination.items[0].field_jobs_your_role | length > 0 %}
## Your role
{% if pagination.items[0].field_jobs_you_have | length > 0 %}
## You have
{{ pagination.items[0].field_jobs_your_role | safe }}
{% endif %}
{{ pagination.items[0].field_jobs_you_have | safe }}
{% endif %}
{% if pagination.items[0].field_jobs_you_have | length > 0 %}
## You have
{% if pagination.items[0].field_jobs_you_also_have | length > 0 %}
## You might also have
{{ pagination.items[0].field_jobs_you_have | safe }}
{% endif %}
{{ pagination.items[0].field_jobs_you_also_have | safe }}
{% endif %}
{% if pagination.items[0].field_jobs_you_also_have | length > 0 %}
## You might also have
{% if pagination.items[0].field_jobs_why_join | length > 0 %}
## Why join us
{{ pagination.items[0].field_jobs_you_also_have | safe }}
{% endif %}
{{ pagination.items[0].field_jobs_why_join | safe }}
{% endif %}
{% if pagination.items[0].field_jobs_why_join | length > 0 %}
## Why join us
{% if pagination.items[0].field_jobs_what_else_to_know | length > 0 %}
## What else you need to know
{{ pagination.items[0].field_jobs_why_join | safe }}
{% endif %}
{{ pagination.items[0].field_jobs_what_else_to_know | safe }}
{% endif %}
{% if pagination.items[0].field_jobs_what_else_to_know | length > 0 %}
## What else you need to know
{{ pagination.items[0].field_jobs_what_else_to_know | safe }}
{% endif %}
{% endmarkdown %}
</section>
</div>
</section>
<section class="vf-intro | embl-grid embl-grid--has-centered-content vf-u-margin__bottom--0" data-vf-google-analytics-region="job-advert-main">
<div class="vf-section-header">
{# <h2 class="vf-section-header__heading">xxxx</h2> #}
</div>
<div class="vf-content">
{% if pagination.items[0].field_jobs_staff_category != "EICAT Advertising Only" %}
<a href="{{ pagination.items[0].field_jobs_apply_link }}" class="vf-button vf-button--primary">Apply now</a>
{% endif %}
{% if pagination.items[0].field_jobs_staff_category != "EICAT Advertising Only" %}
<p>For questions or issues with the application process, please contact
{% if pagination.items[0].field_jobs_duty_station | striptags == "EMBL-EBI Hinxton" -%}
<a href="mailto:recruitment@ebi.ac.uk">recruitment@ebi.ac.uk</a>
{%- else -%}
<a href="mailto:recruitment@embl.org">recruitment@embl.org</a>
{%- endif -%}
</p>
{% endif %}
<a href="/jobs/alerts" data-vf-analytics-label="alerts-link-bottom-button" class="vf-button vf-button--primary vf-button--outline vf-button--sm">Sign up for job alerts</a>
</div>
<div class="vf-section-header">
{# <h2 class="vf-section-header__heading">xxxx</h2> #}
</div>
<div class="vf-content">
{% if pagination.items[0].field_jobs_staff_category != "EICAT Advertising Only" %}
<a href="{{ pagination.items[0].field_jobs_apply_link }}" class="vf-button vf-button--primary">Apply now</a>
{% endif %}
{% if pagination.items[0].field_jobs_staff_category != "EICAT Advertising Only" %}
<p>For questions or issues with the application process, please contact
{% if pagination.items[0].field_jobs_duty_station | striptags == "EMBL-EBI Hinxton" -%}
<a href="mailto:recruitment@ebi.ac.uk">recruitment@ebi.ac.uk</a>
{%- else -%}
<a href="mailto:recruitment@embl.org">recruitment@embl.org</a>
{%- endif -%}
</p>
{% endif %}
<a href="/jobs/alerts" data-vf-analytics-label="alerts-link-bottom-button" class="vf-button vf-button--primary vf-button--outline vf-button--sm">Sign up for job alerts</a>
</div>
</section>
<section class="vf-intro | embl-grid embl-grid--has-centered-content" data-vf-google-analytics-region="job-advert-bottom">
......@@ -182,6 +180,7 @@ embl_content_meta_properties:
{# <h2 class="vf-section-header__heading">xxxx</h2> #}
</div>
<div class="vf-content">
{% markdown %}
---
......@@ -191,10 +190,10 @@ embl_content_meta_properties:
- <a href="/jobs" class="vf-link">View all jobs</a>
- <a href="/jobs/partners/" class="vf-link">View openings from partners</a>
- <a class="vf-link" href="mailto:?subject=EMBL Position: {{pagination.items[0].title}}&body=I thought that the position of {{pagination.items[0].title}} - {{pagination.items[0].field_jobs_reference_number}} at EMBL might be of interest to you. %0D%0A %0D%0AYou can find out more about this vacancy at: https://www.embl.org/jobs/position/{{pagination.items[0].field_jobs_reference_number}}">Share this job</a>
{% endmarkdown %}
</div>
</section>
</div>
</section>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment