Updat transaction list in category with table
This commit is contained in:
parent
f3d0d3d746
commit
57ace376d8
1 changed files with 33 additions and 10 deletions
|
@ -1,9 +1,11 @@
|
||||||
{% extends "main/base.html" %}
|
{% extends "main/base.html" %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
{% load main_extras %}
|
||||||
|
|
||||||
{% block link %}
|
{% block link %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<link rel="stylesheet" href="{% static 'main/css/form.css' %}" type="text/css" />
|
<link rel="stylesheet" href="{% static 'main/css/form.css' %}" type="text/css" />
|
||||||
|
<link rel="stylesheet" href="{% static 'main/css/table.css' %}" type="text/css" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
|
@ -23,15 +25,36 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% if transactions %}
|
{% if transactions %}
|
||||||
<h2>Transactions ({{ transactions|length }})</h2>
|
<h2>Transactions</h2>
|
||||||
<ul>
|
|
||||||
{% for transaction in transactions %}
|
<div id="transactions" class="table col6">
|
||||||
<li>
|
<div class="header">
|
||||||
<a href="{% url 'transaction' transaction.id %}">
|
<strong class="date center">Date</strong>
|
||||||
{{ transaction }}
|
<strong class="name">Nom</strong>
|
||||||
|
<strong class="value center">Valeur</strong>
|
||||||
|
<strong class="trader center">Commerçant</strong>
|
||||||
|
<strong class="category center">Catégorie</strong>
|
||||||
|
<strong class="description">Description</strong>
|
||||||
|
</div>
|
||||||
|
{% for trans in transactions %}
|
||||||
|
<div class="transaction {% cycle 'w' 'g' %}">
|
||||||
|
<span class="date num center">{{ trans.date|date:"Y-m-d" }}</span>
|
||||||
|
<span class="name text"><a href="{% url 'transaction' trans.id %}">{{ trans.name }}</a></span>
|
||||||
|
<span class="value num right">{{ trans.value|floatformat:"2g"|pm }} €</span>
|
||||||
|
<span class="trader text center">{{ trans.trader|default_if_none:"–" }}</span>
|
||||||
|
<span class="category text center">
|
||||||
|
{% if trans.category %}
|
||||||
|
<i class="fa fa-{{ trans.category.icon }}"></i>
|
||||||
|
<a href="{% url 'category' trans.category.id %}">
|
||||||
|
{{ trans.category }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
{% else %}
|
||||||
|
–
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
<span class="description text">{{ trans.description }}</span>
|
||||||
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue