From 57ace376d806b8f9b73dc72951c8c66f06582445 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Sun, 22 May 2022 10:35:22 +0200 Subject: [PATCH] Updat transaction list in category with table --- nummi/main/templates/main/category.html | 43 +++++++++++++++++++------ 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/nummi/main/templates/main/category.html b/nummi/main/templates/main/category.html index cbd6f59..38bccee 100644 --- a/nummi/main/templates/main/category.html +++ b/nummi/main/templates/main/category.html @@ -1,9 +1,11 @@ {% extends "main/base.html" %} {% load static %} +{% load main_extras %} {% block link %} {{ block.super }} + {% endblock %} {% block body %} @@ -23,15 +25,36 @@ {% if transactions %} -

Transactions ({{ transactions|length }})

- +

Transactions

+ +
+
+ Date + Nom + Valeur + Commerçant + Catégorie + Description +
+ {% for trans in transactions %} +
+ {{ trans.date|date:"Y-m-d" }} + {{ trans.name }} + {{ trans.value|floatformat:"2g"|pm }} € + {{ trans.trader|default_if_none:"–" }} + + {% if trans.category %} + + + {{ trans.category }} + + {% else %} + – + {% endif %} + + {{ trans.description }} +
+ {% endfor %} +
{% endif %} {% endblock %}