{% load i18n %}
{% load telemeta_utils %}
{% load teleforma_tags %}
+{% load payment %}
{% block head_title %}{% trans "User Profile" %} : {{ usr.username }}{% endblock %}
{% endif %}
</dl>
</div>
-
</div>
+ {% if payment %}
+ {% payment_summary payment with_pending=False %}
+ {% endif %}
+
<div class="buttons">
<!--<a href="{% url telemeta-password-change %}" class="component_icon button icon_login">{% trans "Password reset" %}</a>-->
</div>
@register.inclusion_tag('payment/payment_summary.html',
takes_context=True)
-def payment_summary(context, payment):
+def payment_summary(context, payment, with_pending=True):
objs = Payment.objects.filter(student = payment.student)
payments = []
today = date.today()
if obj.online_paid:
status = 'payƩ'
sclass = "paid"
- elif obj.id == payment.id:
+ elif obj.id == payment.id and with_pending:
status = 'en cours'
sclass = "pending"
elif obj.scheduled > today: