{% extends "base.html" %}

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

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