{% extends 'base.html' %} {% load static i18n %} {% block title %}{% trans "Interviews" %} - ATS{% endblock %} {% block customCSS %} {% endblock %} {% block content %}

{% trans "Interview Management" %}

{# Using count() instead of length filter if interviews is the Paginator Page Object #} {% trans "Total Interviews:" %} {{ interviews.paginator.count }}

{% include 'includes/search_form.html' %}
{# Keep search query context when filtering #} {% if request.GET.search %}{% endif %}
{% if request.GET.search or request.GET.job or request.GET.status or request.GET.type %} {% trans 'Clear Filter' %} {% endif %}
{% if interviews %}
{# View Switcher (kept the name for simplicity) #} {% include "includes/_list_view_switcher.html" with list_id="interview-list" %} {# Table View #}
{% for interview in interviews %} {% endfor %}
{% trans "Candidate" %} {% trans "Job" %} {% trans "Date & Time" %} {% trans "Type" %} {% trans "Status" %} {% trans "Actions" %}
{{ interview.application.name }}
{{ interview.application.email }}
{{ interview.application.phone }}
{{ interview.job.title }}
{{ interview.job.department }}
{{ interview.interview_date|date:"d-m-Y" }}
{{ interview.interview_time|date:"h:i A" }}
{# Assuming interview.interview.location_type is meant to be interview.location_type #} {% if interview.interview.location_type == 'Remote' %} {% trans "Remote" %} {% else %} {% trans "Onsite" %} {% endif %} {{ interview.status|upper }} {# Actions for Reschedule/Cancel (Commented out in original, kept commented) #}
{# Card View (Mobile/Tablet) #}
{% for interview in interviews %}
{{ interview.application.name }}
{{ interview.status|title }}

{% trans "Job" %}: {{ interview.job.title }}
{% trans "Date" %}: {{ interview.interview_date|date:"M d, Y" }}
{% trans "Time" %}: {{ interview.interview_time|time:"H:i A" }}
{# --- Type/Location --- #} {% trans "Type" %}: {{ interview.interview.location_type }} {% comment %} {% if interview.interview.location_type == 'Remote' %}
{# Using interview.join_url directly if available, assuming interview is the full object #} {% trans "Link" %}: {% if interview.interview.join_url %}Join Meeting{% else %}N/A{% endif %} {% else %}
{% trans "Location" %}: {{ interview.interview.location_details|default:"Onsite" }} {% endif %} {% endcomment %}

{% trans "View" %} {# Join button logic simplified #} {% if interview.interview.location_type == 'Remote' and interview.interview.join_url %} {% trans "Join" %} {% endif %}
{% endfor %}
{# FIX: Added the missing pagination include here #} {% include "includes/paginator.html" %} {% else %}

{% if search_query or job_filter or request.GET.status or request.GET.type %} {% trans "There are no interviews matching your filters." %} {% else %} {% trans "There are no interviews scheduled." %} {% endif %}

{% trans "Start by setting the interview stage for an application." %}

{# Add button if needed, otherwise rely on the header button #}
{% endif %}
{% endblock %} {% block customJS %} {% endblock %}