{% extends 'home/base.html' %} {% load humanize messaging_tags %} {% block title %}Messages – PEZAJOB{% endblock %} {% block extra_head %} {% endblock %} {% block content %} Messages {% if user.is_company %} Dashboard {% else %} My Applications {% endif %} {% for conv in conversations %} {{ conv|conversation_initials:user }} {{ conv|conversation_partner:user }} {% if conv.recent_messages %}{{ conv.recent_messages.0.body|truncatechars:60 }}{% else %}No messages yet{% endif %} {% if conv.is_closed %}Closed{% endif %} {% if conv.last_message_at or conv.updated_at %} {{ conv.last_message_at|default:conv.updated_at|naturaltime }} {% endif %} {% if conv.unread_count %}{{ conv.unread_count }}{% endif %} {% empty %} No conversations yet. Message a candidate from their profile or an application page. {% endfor %} {% if active_conversation %} {{ active_conversation|conversation_initials:user }} {{ active_conversation|conversation_partner:user }} {{ active_conversation|conversation_subtitle:user }} {% if active_conversation.is_closed %} · Closed{% if active_conversation.closed_at %} {{ active_conversation.closed_at|naturaltime }}{% endif %}{% endif %} {% if user.is_company %} {% if active_conversation.is_open %} {% csrf_token %} Close chat {% else %} {% csrf_token %} Reopen chat {% endif %} {% if active_conversation.application_id %} {% if active_conversation.application.applicant.seeker_profile.is_public %} {% endif %} {% elif active_conversation.direct_seeker %} {% with direct_profile=active_conversation.direct_seeker.seeker_profile %} {% if direct_profile.is_public %} {% endif %} {% endwith %} {% endif %} {% else %} {% if active_conversation.application_id %} {% endif %} {% endif %} {% if active_conversation.is_closed %} This conversation is closed{% if user.is_company %} - reopen it to message again{% else %} - you can read past messages but cannot reply{% endif %}. {% endif %} {% for msg in messages_list %} {{ msg.body }} {{ msg.created_at|date:"g:i A" }} · {{ msg.created_at|naturaltime }} {% empty %} Send the first message about this application. {% endfor %} {% if active_conversation.is_open %} {% csrf_token %} {{ form.body }} {% else %} Messaging is disabled for closed conversations. {% endif %} {% else %} Select a conversation or start one from an application. {% endif %} {% endblock %}
Select a conversation or start one from an application.