{% extends 'profil/profil_base.html' %}
{% load static %}
{% load custom_tag %}

{% block profil_content %}
<div class="row">
    <div class="col-lg-12"><br/>
        <h3><i class="bi bi-chat-fill"></i> Réclamations</h3><hr/>
    </div>
</div>
<div class="row col-lg-11">
    <h3 class="ptitle">Poser une réclamation</h3>
    <center>{% include 'parts/message.html' %}</center><br/>
    <form action="#" method="post" class="checkout-form form-bordered" enctype="multipart/form-data" {% if hide_form %}hidden{% endif %}>
    {% csrf_token %}
        <div class="form-group">
             {{form.as_p}}
            <div class="col-lg-offset-2 col-lg-10">
              <center><button type="submit" class="btn btn-success"><i class="bi bi-save-fill"></i> Enregistrer</button></center>
            </div>
        </div><br/>
    </form>
    <br/>
    <h3 class="ptitle">Mes réclamations</h3>
    {% for reclamation in reclamations %}
    <div class="rec-item">
        <p class="rec-item-date">Le {{reclamation.created|date:'d-m-Y à h:m:s'}} <span><a class="btn btn-secondary" href="{% url 'reclamation_reponse' reclamation.id %}">
            <!--<i class="bi bi-chat-left-dots-fill"></i>--> reponse <span class="rep-nb">{{reclamation.id|rec_respone_count}}</span></a></span>
        </p>
        <p class="rec-item-content">{{reclamation.description}}</p>
    </div>
    {% endfor %}
    <br/><br/>

</div>
{% endblock profil_content %}