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

{{ job.title }}

{% trans "JOB ID: "%}{{ job.internal_job_id }} {# Deadline #} {% if job.application_deadline %}
{% trans "Deadline:" %} {{ job.application_deadline }}
{% endif %}
{# Status badge #}
{{ job.get_status_display }} {% if user.is_staff and user == application.job.assigned_to or user.is_superuser %} {% endif %}
{# Share Public Link Button #}
{# CONTENT: CORE DETAILS (No Tabs) #}
{% trans "Administrative & Location" %} {% if job.status == 'DRAFT'%}
  • {% trans "Edit Job" %}
    {% endif %}
    {% if job.assigned_to %} {% trans "Assigned to :" %} {{ job.assigned_to|default:"" }} {% else %} {% endif %}
    {% trans "Department:" %} {{ job.department|default:"" }}
    {% trans "Position No:" %} {{ job.position_number|default:"" }}
    {% trans "Job Type:" %} {{ job.get_job_type_display }}
    {% trans "Workplace:" %} {{ job.get_workplace_type_display }}
    {% trans "Location:" %} {{ job.get_location_display }}
    {% trans "Salary:" %} {{ job.salary_range |default:"" }}
    {% trans "Created By:" %} {{ job.created_by|default:"" }}
    {% trans "Created At:" %} {{ job.created_at|default:"" }}
    {% trans "Updated At:" %} {{ job.updated_at|default:"" }}
    {# Description Blocks (Main Content) #} {% if job.has_description_content %}
    {% trans "Job Description" %}
    {{ job.description|safe }}
    {% endif %} {% if job.has_qualifications_content %}
    {% trans "Required Qualifications" %}
    {{ job.qualifications|safe }}
    {% endif %} {% if job.has_benefits_content %}
    {% trans "Benefits" %}
    {{ job.benefits|safe}}
    {% endif %} {% if job.has_application_instructions_content %}
    {% trans "Application Instructions" %}
    {{ job.application_instructions|safe }}
    {% endif %}
    {# RIGHT COLUMN: TABBED CARDS #}
    {# RIGHT TABS NAVIGATION #}
    {# TAB 1: APPLICANTS CONTENT #}
    {% trans "Total Applications" %} ({{ total_applications }})
    {% trans "Create Application" %} {% trans "Manage Applications" %} {% trans "View Calendar" %} {% if not job.form_template.is_active %} {% if not jobzip_created %} {% trans "Generate All CVs" %} {% endif %} {% if job.zip_created %} {% trans "View All CVs" %} {% endif %} {% else %}

    {% trans "Bulk CV dowload is inactive. To activate please change the status of the job to CLOSED." %}

    {% endif %}
    {# TAB 2: TRACKING CONTENT #}
    {% trans "Applications Stages" %}
    {% include 'jobs/partials/applicant_tracking.html' %}

    {% trans "The applicant tracking flow is defined by the attached Form Template. View the Form Template tab to manage stages and fields." %}

    {# Placeholder for stage tracker component #}
    {# TAB 3: MANAGEMENT (Form Template) CONTENT #}
    {% trans "Form Management" %}

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

    {% if user.is_staff and user == application.job.assigned_to or user.is_superuser %} {% trans "Manage Job Form" %} {% endif %} {% comment %} {% if not job.form_template %} {% trans "Create New Form Template" %} {% else %} {% if job.form_template.is_active %} {% trans "View" %} {% trans "Manage" %} {% else %}

    {% trans "This job status is not active, the form will appear once the job is made active"%}

    {% endif %} {% endif %} {% endcomment %}
    {# TAB 4: STAFF ASSIGNMENT CONTENT #}
    {% trans "Staff Assignment" %}
    {% if job.assigned_to %}

    {% trans "Assigned to:" %} {{ job.assigned_to }}

    {% endif %} {% if not job.assigned_to %} {% elif job.assigned_to and job.assigned_to == request.user %} {% endif %} {% if not job.assigned_to %}
    {% trans "No staff members assigned to this job yet." %}
    {% endif %}
    {# TAB 5: 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 %} {% if job.linkedin_post_formated_data %} {% endif %}
    {# Card 2: Application Category Chart #}
    {% trans "Application Categories & Scores" %}
    {# Card 3: KPIs #}
    {% trans "Key Performance Indicators" %}
    {# 1. Job Avg. Score #}
    {{ avg_match_score|floatformat:1 }}
    {% trans "Avg. AI Score" %}
    {# 2. High Potential Count #}
    {{ high_potential_count }}
    {% trans "High Potential (score>=75)" %}
    {# 3. Avg. Time to Interview #} {% comment %}
    {{ 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" %}
    {% endcomment %}
    {{ job.vacancy_fill_rate|floatformat:2 }}
    {% trans "Vacancy Fill Rate" %}
    {% include "jobs/partials/image_upload.html" %} {% include "jobs/partials/linkedin_content_form.html"%} {% endblock %} {# Translated JS strings used by the inline scripts below. Using `as` + `escapejs` ensures safe JS embedding. #} {% trans "Copy failed. Please copy the URL manually:" as copy_failed_msg %} {% trans "Number of Applications" as chart_label_applications %} {% trans " application(s)" as chart_tooltip_suffix %} {% trans "No application category data available for this job." as no_chart_data_msg %} {% block customJS%} {% endblock %}