Connecting to LinkedIn...

job.liquid

This template is used to show a Job's details and to allow users to apply for the Job and save the Job.

The variables specific to this template are job, job_description, similar_jobs, already_applied, and job_already_saved.

The job_description variable outputs a formatted version of the job's description.

The similar_jobs variable is an array of jobs which are similar to the selected job as can be looped through as shown:

{% if similar_jobs != blank %}
  <h2>SIMILAR JOBS</h2>
  {% for job in similar_jobs %}
    <div>
      <p><b>{{ job | job_link }}</b></p>
      <p>{{ job.job_location }}</p>
      <p>{{ job.job_salary }}</p>
      <p>Published: {{ job.created_at | distance_of_time }}</p>
    </div>
  {% endfor %}
{% endif %}

The already_applied variable value is either 'true' or 'false' and should be used to stop candidates applying for the same job more than once, for example:

{% if already_applied == 'true' %}
  THANK YOU FOR YOUR APPLICATION
{% else %}
  <a href="{{ job | apply_url }}">APPLY FOR THIS JOB</a>
{% endif %}

The job_already_saved variable can be used to ensure candidates don't save the job more than once, for example:

{% form 'save_job' %}
  {% if user %}
    {% if job_already_saved == 'true' %}
      {{ 'YOUR SAVED JOBS' | account_link }}
    {% else %}
      {{ 'SAVE THIS JOB' | save_job_link }}
    {% endif %}
  {% else %}
    {{ 'LOGIN TO SAVE JOBS' | login_link }}
  {% endif %}
{% endform %}

The save_job_link filter uses javascript to submit the 'save_job' form which saves the job for the candidate.