job-type.njk 1.48 KB
Newer Older
Ken Hawkins's avatar
Ken Hawkins committed
1
{# Position type #}
Ken Hawkins's avatar
Ken Hawkins committed
2
{%- set positiontypes = {
Ken Hawkins's avatar
Ken Hawkins committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
    'ADM': 'Administration',
    'BIO': 'Bioinformatics',
    'COM': 'Communication',
    'DTC': 'Data Curation',
    'GEN': 'General Support Services',
    'ITS': 'IT and Infrastructure',
    'POS': 'Postdoctoral Fellowships',
    'PRE': 'Predoctoral Fellowships',
    'RES': 'Research',
    'FAC': 'Science Faculty',
    'SSS': 'Scientific Services and Support',
    'SDE': 'Software Development and Engineering',
    'TEC': 'Technical Support',
    'TRA': 'Trainee and Internships',
    'TRN': 'Training',
    'OTH': 'Other'
Ken Hawkins's avatar
Ken Hawkins committed
19
} -%}
Ken Hawkins's avatar
Ken Hawkins committed
20

21 22
<fieldset class="vf-form__fieldset | vf-stack vf-stack--400">
  <legend class="vf-form__legend">Type</legend>
Ken Hawkins's avatar
Ken Hawkins committed
23
  {% spaceless %}
Ken Hawkins's avatar
Ken Hawkins committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
  {% for key, type in positiontypes | dictsort %}
    {% set counter = 0 %}
    {%- for job in emblJobs %}
      {% if key | makeLowercase in job.field_jobs_type_key | makeLowercase %}
        {% set counter = counter + 1 %}
      {% endif -%}
    {% endfor -%}

    <div class="vf-form__item vf-form__item--checkbox">
      <input type="checkbox" id="checkbox-position-{{ loop.index }}" class="vf-form__checkbox"
              data-jplist-control="checkbox-text-filter" data-path=".jplist-job-type" data-group="data-group-1" data-name="type1" data-or="jobtype"
              data-id="type-{{ key }}"
              value="{{ key }}"
      >
      <label for="checkbox-position-{{ loop.index }}" class="vf-form__label">{{ type }} ({{ counter }})</label>
    </div>
  {% endfor %}
Ken Hawkins's avatar
Ken Hawkins committed
41
  {% endspaceless %}
Ken Hawkins's avatar
Ken Hawkins committed
42
</fieldset>