{% extends "base.html" %} {% load static humanize i18n %} {% block title %}{{ candidate.name }} - {{ block.super }}{% endblock %} {% block customCSS %} {% endblock %} {% block content %}
{# LEFT COLUMN: MAIN CANDIDATE DETAILS AND TABS #}
{# HEADER SECTION #}

{{ candidate.name }}

{% trans "Stage:" %}
{% trans "Applied for:" %} {{ candidate.job.title }}
{# Change Stage button #} {% if user.is_staff %} {% endif %}
{# LEFT TABS NAVIGATION #}
{# TAB 1 CONTENT: CONTACT & DATES #}
{% trans "Core Details" %}
{% trans "Email" %} {{ candidate.email }}
{% trans "Position Applied" %} {{ candidate.job.title }}
{% trans "Applied Date" %}
{{ candidate.created_at|date:"M d, Y H:i" }} {{ candidate.created_at|naturaltime }}
{# TAB 2 CONTENT: RESUME #} {% if candidate.resume %}
{% trans "Resume Document" %}

{{ candidate.resume.name }}

{{ candidate.resume.name|truncatechars:30 }}
{% trans "Download Resume" %}
{% endif %} {# TAB 3 CONTENT: PARSED SUMMARY #} {% if candidate.parsed_summary %}
{% trans "AI Generated Summary" %}
{% include 'includes/candidate_modal_body.html' %}
{% endif %}
{# RIGHT COLUMN: ACTIONS AND CANDIDATE TIMELINE #}
{# ACTIONS CARD #} {% if user.is_staff %} {% endif %} {# ENHANCED: CANDIDATE JOURNEY TIMELINE CARD #}
{% trans "Candidate Journey" %}
{% trans "Current Stage" %}

{{ candidate.stage }}

{% trans "Latest status update:" %} {{ candidate.updated_at|date:"M d, Y" }}
{% trans "Historical Timeline" %}
{# Base Status: Application Submitted (Always required) #}

{% trans "Application Submitted" %}

{{ candidate.created_at|date:"M d, Y" }} | {{ candidate.created_at|date:"h:i A" }}
{# Fallback if no history is explicitly logged #} {% if not candidate_stage_history %}

{% trans "Detailed stage history logs are currently unavailable." %}

{% endif %}
{% if user.is_staff %} {% include "recruitment/partials/stage_update_modal.html" with candidate=candidate form=stage_form %} {% endif %} {% endblock %}