{% extends 'base.html' %} {% block title %}{{ task.title }} - Task Management System{% endblock %} {% block content %}

{{ task.title }}

{{ task.get_status_display }} {{ task.get_priority_display }}
Description

{{ task.description|linebreaks }}

Department: {{ task.department.name }}
Assigned To: {{ task.assigned_to.get_full_name|default:"Unassigned" }}
Created By: {{ task.created_by.get_full_name }}
{% if task.completed_at %} {% endif %}
Due Date: {{ task.due_date|date:"M d, Y H:i" }} {% if task.is_overdue %} {% endif %}
Created: {{ task.created_at|date:"M d, Y" }}
Completed: {{ task.completed_at|date:"M d, Y H:i" }}
{% if can_update_status %}
{% if task.status != 'completed' %} Update Status {% endif %}
{% endif %}
{% if can_edit %} {% endif %}
Comments ({{ comments|length }})
{% for comment in comments %}
{{ comment.author.first_name|first|upper }}
{{ comment.author.get_full_name }}
{{ comment.created_at|date:"M d, Y H:i" }}

{{ comment.content|linebreaks }}

{% if not forloop.last %}
{% endif %} {% empty %}

No comments yet. Be the first to comment!

{% endfor %}
{% csrf_token %}
{{ comment_form.content }}
Task Progress
{{ task.get_status_display }}
Pending In Progress Completed
{% if task.is_overdue %}
This task is overdue!
Due date was {{ task.due_date|date:"M d, Y" }}
{% elif task.days_remaining > 0 %}
{{ task.days_remaining }} days remaining
Due on {{ task.due_date|date:"M d, Y" }}
{% endif %}
Quick Actions
Back to Tasks {% if user.is_employee %} My Tasks {% endif %}
{% endblock %}