{% extends "base.html" %}

{% block content %}
<div class="d-flex justify-content-between align-items-center mb-4">
    <h1 class="h2">Dettaglio Attività</h1>
    <div>
        <a href="{% url 'activity_update' activity.pk %}" class="btn btn-secondary">Modifica</a>
        <a href="{% url 'activity_delete' activity.pk %}" class="btn btn-danger">Elimina</a>
    </div>
</div>

<div class="card">
    <div class="card-header">
        <h3>{{ activity.title }}</h3>
    </div>
    <div class="card-body">
        <p><strong>Cliente:</strong> <a href="{% url 'client_detail' activity.client.pk %}">{{ activity.client.name }}</a></p>
        <p><strong>Stato:</strong> <span class="badge bg-primary">{{ activity.get_status_display }}</span></p>
        <p><strong>Descrizione:</strong></p>
        <p>{{ activity.description|linebreaksbr }}</p>
        <p><strong>Data Creazione:</strong> {{ activity.created_at|date:"d/m/Y H:i" }}</p>
    </div>
    <div class="card-footer text-muted">
        <a href="{% url 'activity_list' %}" class="btn btn-light">Torna alla lista</a>
    </div>
</div>
{% endblock %}