{% extends "base.html" %} {% load i18n static %} {% block title %}{{ job.title }} - University ATS{% endblock %} {% block customCSS %} {% endblock %} {% block content %}
{# LEFT COLUMN: JOB DETAILS WITH TABS #}
{# HEADER SECTION #}

{{ job.title }}

{% trans "JOB ID: "%}{{ job.internal_job_id }}
{# Corrected status badge logic to close the span correctly #} {% if job.status == "ACTIVE" %} {% elif job.status == "DRAFT" %} {% elif job.status == "CLOSED" %} {% elif job.status == "CANCELLED" %} {% elif job.status == "ARCHIVED" %} {% else %} {% endif %} {{ job.get_status_display }}
{# LEFT TABS NAVIGATION #}
{# TAB 1 CONTENT: CORE DETAILS #}
{% trans "Administrative & Location" %}
{% trans "Department:" %} {{ job.department|default:"N/A" }}
{% trans "Position No:" %} {{ job.position_number|default:"N/A" }}
{% trans "Job Type:" %} {{ job.get_job_type_display }}
{% trans "Workplace:" %} {{ job.get_workplace_type_display }}
{% trans "Location:" %} {{ job.get_location_display }}
{% trans "Created By:" %} {{ job.created_by|default:"N/A" }}
{% trans "Created At:" %} {{ job.created_at|default:"N/A" }}
{% trans "Updated At:" %} {{ job.updated_at|default:"N/A" }}
{% trans "Financial & Timeline" %}
{% if job.salary_range %}
{% trans "Salary:" %} {{ job.salary_range }}
{% endif %} {% if job.start_date %}
{% trans "Start Date:" %} {{ job.start_date }}
{% endif %} {% if job.application_deadline %}
{% trans "Deadline:" %} {{ job.application_deadline }} {% if job.is_expired %} {% trans "EXPIRED" %} {% endif %}
{% endif %}
{# TAB 2 CONTENT: DESCRIPTION & REQUIREMENTS #}
{% if job.description %}
{% trans "Job Description" %}
{{ job.description|safe }}
{% endif %} {% if job.qualifications %}
{% trans "Required Qualifications" %}
{{ job.qualifications|safe }}
{% endif %} {% if job.benefits %}
{% trans "Benefits" %}
{{ job.benefits|safe}}
{% endif %} {% if job.application_instructions %}
{% trans "Application Instructions" %}
{{ job.application_instructions|safe }}
{% endif %}
{# TAB 3 CONTENT: APPLICATION KPIS #}
{# 1. Job Avg. Score #}
{{ avg_match_score|floatformat:1 }}
{% trans "Avg. AI Score" %}
{# 2. High Potential Count #}
{{ high_potential_count }}
{% trans "High Potential" %}
{# 3. Avg. Time to Interview #}
{{ avg_t2i_days|floatformat:1 }}d
{% trans "Time to Interview" %}
{# 4. Avg. Exam Review Time #}
{{ avg_t_in_exam_days|floatformat:1 }}d
{% trans "Avg. Exam Review" %}

{% trans "KPIs based on completed applicant data." %}

{# FOOTER ACTIONS #}
{# RIGHT COLUMN: TABBED CARDS #}
{# New Card for Candidate Category Chart #}
{% trans "Candidate Categories & Scores" %}
{# REMOVED: Standalone Applicant Tracking Card (It is now in a tab) #}
{# RIGHT TABS NAVIGATION #}
{# TAB 1: APPLICANTS CONTENT #}
{% trans "Total Applicants" %} ({{ total_applicants }})
{# NEW TAB 2: APPLICANT TRACKING CONTENT #}
{% trans "Pipeline Stages" %}
{% include 'jobs/partials/applicant_tracking.html' %}

{% trans "View the number of candidates currently in each stage of the hiring pipeline." %}

{# TAB 3: MANAGEMENT (Form Template) CONTENT #}
{% trans "Form Management" %}

{% trans "Manage the custom application forms associated with this job posting." %}

{% if not job.form_template %} {% trans "Create New Form Template" %} {% else %} {% trans "View Form Template" %} {% endif %}
{# TAB 4: LINKEDIN INTEGRATION CONTENT #}
{% trans "LinkedIn Integration" %}
{% if job.posted_to_linkedin %}
{% trans "Posted successfully!" %}
{% if job.linkedin_post_url %} {% trans "View on LinkedIn" %} {% endif %} {% trans "Posted on:" %} {{ job.linkedin_posted_at|date:"M d, Y" }} {% else %}

{% trans "This job has not been posted to LinkedIn yet." %}

{% endif %}
{% csrf_token %}
{% if not request.session.linkedin_authenticated %} {% trans "You need to" %} {% trans "authenticate with LinkedIn" %} {% trans "first." %} {% endif %} {% if job.linkedin_post_status and 'ERROR' in job.linkedin_post_status %}
{% trans "Error:" %} {{ job.linkedin_post_status }}
{% endif %}
{% include "jobs/partials/image_upload.html" %} {% endblock %} {% block customJS%} {% endblock %}