Create table for accounts

This commit is contained in:
Edgar P. Burkhart 2024-01-03 14:40:48 +01:00
parent 9927cbbab4
commit d48818e455
Signed by: edpibu
GPG Key ID: 9833D3C5A25BD227
8 changed files with 86 additions and 56 deletions

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-02 15:52+0100\n" "POT-Creation-Date: 2024-01-03 14:32+0100\n"
"PO-Revision-Date: 2023-04-23 08:03+0200\n" "PO-Revision-Date: 2023-04-23 08:03+0200\n"
"Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n" "Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n"
"Language-Team: \n" "Language-Team: \n"
@ -29,11 +29,11 @@ msgstr "Aller au contenu principal"
msgid "Home" msgid "Home"
msgstr "Accueil" msgstr "Accueil"
#: .\main\templates\main\base.html:39 .\main\templates\main\index.html:43 #: .\main\templates\main\base.html:39 .\main\templates\main\index.html:60
msgid "Statements" msgid "Statements"
msgstr "Relevés" msgstr "Relevés"
#: .\main\templates\main\base.html:45 .\main\templates\main\index.html:23 #: .\main\templates\main\base.html:45 .\main\templates\main\index.html:40
msgid "Transactions" msgid "Transactions"
msgstr "Transactions" msgstr "Transactions"
@ -113,15 +113,23 @@ msgstr "Comptes"
msgid "No account" msgid "No account"
msgstr "Aucun compte" msgstr "Aucun compte"
#: .\main\templates\main\index.html:29 #: .\main\templates\main\index.html:23
msgid "Account"
msgstr "Compte"
#: .\main\templates\main\index.html:24
msgid "Balance"
msgstr "Solde"
#: .\main\templates\main\index.html:46
msgid "Categories" msgid "Categories"
msgstr "Catégories" msgstr "Catégories"
#: .\main\templates\main\index.html:35 #: .\main\templates\main\index.html:52
msgid "No category" msgid "No category"
msgstr "Aucune catégorie" msgstr "Aucune catégorie"
#: .\main\templates\main\index.html:49 #: .\main\templates\main\index.html:66
msgid "History" msgid "History"
msgstr "Historique" msgstr "Historique"

View File

@ -26,11 +26,9 @@ table {
tbody &:where(:nth-of-type(even)) { tbody &:where(:nth-of-type(even)) {
background: #eeeeff; background: #eeeeff;
} }
tfoot &.more, &.more,
thead &.new { &.new {
text-align: center; text-align: center;
}
tfoot &.more {
border-style: dashed; border-style: dashed;
} }
} }

View File

@ -10,13 +10,36 @@
{% block body %} {% block body %}
<section> <section>
<h2>{% translate "Accounts" %}</h2> <h2>{% translate "Accounts" %}</h2>
<p> <table>
<thead>
<tr>
<th colspan="2">{% translate "Account" %}</th>
<th>{% translate "Balance" %}</th>
</tr>
</thead>
<tbody>
{% for acc in accounts %} {% for acc in accounts %}
<a class="big-link" href="{{ acc.get_absolute_url }}">{{ acc.icon|remix }}{{ acc }}</a> <tr>
<td>{{ acc.icon|remix }}</td>
<th class="l">
<a href="{{ acc.get_absolute_url }}">{{ acc }}</a>
</th>
<td>{{ acc.statement_set.first.value|value }}</td>
</tr>
{% empty %} {% empty %}
{% translate "No account" %} <tr>
<td class="empty" colspan="3">{% translate "No account" %}</td>
</tr>
{% endfor %} {% endfor %}
</p> </tbody>
<tfoot>
<tr class="new">
<td colspan="3">
<a href="{% url "new_account" %}">{% translate "Create account" %}</a>
</td>
</tr>
</tfoot>
</table>
</section> </section>
{% if transactions %} {% if transactions %}
<section> <section>

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-02 15:52+0100\n" "POT-Creation-Date: 2024-01-03 14:32+0100\n"
"PO-Revision-Date: 2023-04-22 15:22+0200\n" "PO-Revision-Date: 2023-04-22 15:22+0200\n"
"Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n" "Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n"
"Language-Team: \n" "Language-Team: \n"
@ -38,7 +38,7 @@ msgid "Start value"
msgstr "Valeur initiale" msgstr "Valeur initiale"
#: .\statement\models.py:29 #: .\statement\models.py:29
#: .\statement\templates\statement\statement_table.html:28 #: .\statement\templates\statement\statement_table.html:23
msgid "Difference" msgid "Difference"
msgstr "Différence" msgstr "Différence"
@ -66,7 +66,7 @@ msgid "Statements"
msgstr "Relevés" msgstr "Relevés"
#: .\statement\templates\statement\statement_form.html:4 #: .\statement\templates\statement\statement_form.html:4
#: .\statement\templates\statement\statement_table.html:5 #: .\statement\templates\statement\statement_table.html:29
msgid "Create statement" msgid "Create statement"
msgstr "Créer un relevé" msgstr "Créer un relevé"
@ -79,27 +79,27 @@ msgid "Categories"
msgstr "Catégories" msgstr "Catégories"
#: .\statement\templates\statement\statement_form.html:27 #: .\statement\templates\statement\statement_form.html:27
#: .\statement\templates\statement\statement_table.html:29 #: .\statement\templates\statement\statement_table.html:24
msgid "Transactions" msgid "Transactions"
msgstr "Transactions" msgstr "Transactions"
#: .\statement\templates\statement\statement_table.html:23 #: .\statement\templates\statement\statement_table.html:18
msgid "Date" msgid "Date"
msgstr "Date" msgstr "Date"
#: .\statement\templates\statement\statement_table.html:25 #: .\statement\templates\statement\statement_table.html:20
msgid "Account" msgid "Account"
msgstr "Compte" msgstr "Compte"
#: .\statement\templates\statement\statement_table.html:27 #: .\statement\templates\statement\statement_table.html:22
msgid "Value" msgid "Value"
msgstr "Valeur" msgstr "Valeur"
#: .\statement\templates\statement\statement_table.html:60 #: .\statement\templates\statement\statement_table.html:62
msgid "No statement" msgid "No statement"
msgstr "Aucun relevé" msgstr "Aucun relevé"
#: .\statement\templates\statement\statement_table.html:68 #: .\statement\templates\statement\statement_table.html:70
msgid "View all statements" msgid "View all statements"
msgstr "Voir tous les relevés" msgstr "Voir tous les relevés"

View File

@ -12,6 +12,13 @@
<col class="value" span="3"> <col class="value" span="3">
</colgroup> </colgroup>
<thead> <thead>
{% if new_statement_url %}
<tr class="new">
<td colspan="{% if account %}6{% else %}8{% endif %}">
<a href="{{ new_statement_url }}">{% translate "Create statement" %}</a>
</td>
</tr>
{% endif %}
<tr> <tr>
<th>{{ "check"|remix }}</th> <th>{{ "check"|remix }}</th>
<th>{{ "attachment"|remix }}</th> <th>{{ "attachment"|remix }}</th>
@ -23,13 +30,6 @@
<th>{% translate "Difference" %}</th> <th>{% translate "Difference" %}</th>
<th>{% translate "Transactions" %}</th> <th>{% translate "Transactions" %}</th>
</tr> </tr>
{% if new_statement_url %}
<tr class="new">
<td colspan="{% if account %}6{% else %}8{% endif %}">
<a href="{{ new_statement_url }}">{% translate "Create statement" %}</a>
</td>
</tr>
{% endif %}
</thead> </thead>
<tbody> <tbody>
{% for snap in statements %} {% for snap in statements %}

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-02 15:52+0100\n" "POT-Creation-Date: 2024-01-03 14:32+0100\n"
"PO-Revision-Date: 2023-04-23 08:03+0200\n" "PO-Revision-Date: 2023-04-23 08:03+0200\n"
"Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n" "Last-Translator: Edgar P. Burkhart <traduction@edgarpierre.fr>\n"
"Language-Team: \n" "Language-Team: \n"
@ -23,7 +23,7 @@ msgstr "Transaction"
#: .\transaction\models.py:19 .\transaction\models.py:89 #: .\transaction\models.py:19 .\transaction\models.py:89
#: .\transaction\templates\transaction\invoice_table.html:10 #: .\transaction\templates\transaction\invoice_table.html:10
#: .\transaction\templates\transaction\transaction_table.html:29 #: .\transaction\templates\transaction\transaction_table.html:24
msgid "Name" msgid "Name"
msgstr "Nom" msgstr "Nom"
@ -32,12 +32,12 @@ msgid "Description"
msgstr "Description" msgstr "Description"
#: .\transaction\models.py:23 #: .\transaction\models.py:23
#: .\transaction\templates\transaction\transaction_table.html:30 #: .\transaction\templates\transaction\transaction_table.html:25
msgid "Value" msgid "Value"
msgstr "Valeur" msgstr "Valeur"
#: .\transaction\models.py:25 #: .\transaction\models.py:25
#: .\transaction\templates\transaction\transaction_table.html:28 #: .\transaction\templates\transaction\transaction_table.html:23
msgid "Date" msgid "Date"
msgstr "Date" msgstr "Date"
@ -46,7 +46,7 @@ msgid "Real date"
msgstr "Date réelle" msgstr "Date réelle"
#: .\transaction\models.py:28 #: .\transaction\models.py:28
#: .\transaction\templates\transaction\transaction_table.html:31 #: .\transaction\templates\transaction\transaction_table.html:26
msgid "Trader" msgid "Trader"
msgstr "Commerçant" msgstr "Commerçant"
@ -55,7 +55,7 @@ msgid "Payment"
msgstr "Paiement" msgstr "Paiement"
#: .\transaction\models.py:38 #: .\transaction\models.py:38
#: .\transaction\templates\transaction\transaction_table.html:33 #: .\transaction\templates\transaction\transaction_table.html:28
msgid "Category" msgid "Category"
msgstr "Catégorie" msgstr "Catégorie"
@ -64,13 +64,13 @@ msgid "Statement"
msgstr "Relevé" msgstr "Relevé"
#: .\transaction\models.py:48 #: .\transaction\models.py:48
#: .\transaction\templates\transaction\transaction_table.html:36 #: .\transaction\templates\transaction\transaction_table.html:31
msgid "Account" msgid "Account"
msgstr "Compte" msgstr "Compte"
#: .\transaction\models.py:83 #: .\transaction\models.py:83
#: .\transaction\templates\transaction\transaction_archive_month.html:24 #: .\transaction\templates\transaction\transaction_archive_month.html:27
#: .\transaction\templates\transaction\transaction_archive_year.html:23 #: .\transaction\templates\transaction\transaction_archive_year.html:31
#: .\transaction\templates\transaction\transaction_list.html:4 #: .\transaction\templates\transaction\transaction_list.html:4
#: .\transaction\templates\transaction\transaction_list.html:7 #: .\transaction\templates\transaction\transaction_list.html:7
msgid "Transactions" msgid "Transactions"
@ -109,21 +109,22 @@ msgstr "Supprimer"
msgid "No invoice" msgid "No invoice"
msgstr "Aucune facture" msgstr "Aucune facture"
#: .\transaction\templates\transaction\transaction_archive_month.html:12 #: .\transaction\templates\transaction\transaction_archive_month.html:14
#: .\transaction\templates\transaction\transaction_archive_year.html:13
msgid "Back" msgid "Back"
msgstr "Retour" msgstr "Retour"
#: .\transaction\templates\transaction\transaction_archive_month.html:19 #: .\transaction\templates\transaction\transaction_archive_month.html:22
#: .\transaction\templates\transaction\transaction_archive_year.html:18 #: .\transaction\templates\transaction\transaction_archive_year.html:26
msgid "Categories" msgid "Categories"
msgstr "Catégories" msgstr "Catégories"
#: .\transaction\templates\transaction\transaction_archive_year.html:12 #: .\transaction\templates\transaction\transaction_archive_year.html:20
msgid "History" msgid "History"
msgstr "Historique" msgstr "Historique"
#: .\transaction\templates\transaction\transaction_form.html:5 #: .\transaction\templates\transaction\transaction_form.html:5
#: .\transaction\templates\transaction\transaction_table.html:5 #: .\transaction\templates\transaction\transaction_table.html:37
msgid "Create transaction" msgid "Create transaction"
msgstr "Créer une transaction" msgstr "Créer une transaction"
@ -131,10 +132,10 @@ msgstr "Créer une transaction"
msgid "New transaction" msgid "New transaction"
msgstr "Nouvelle transaction" msgstr "Nouvelle transaction"
#: .\transaction\templates\transaction\transaction_table.html:75 #: .\transaction\templates\transaction\transaction_table.html:77
msgid "No transaction" msgid "No transaction"
msgstr "Aucune transaction" msgstr "Aucune transaction"
#: .\transaction\templates\transaction\transaction_table.html:84 #: .\transaction\templates\transaction\transaction_table.html:86
msgid "View all transactions" msgid "View all transactions"
msgstr "Voir toutes les transactions" msgstr "Voir toutes les transactions"

View File

@ -18,6 +18,13 @@
{% endif %} {% endif %}
</colgroup> </colgroup>
<thead> <thead>
{% if new_transaction_url %}
<tr class="new">
<td colspan="{% if category and account %}5{% elif category or account %}7{% else %}9{% endif %}">
<a href="{{ new_transaction_url }}">{% translate "Create transaction" %}</a>
</td>
</tr>
{% endif %}
<tr> <tr>
<th>{{ "attachment"|remix }}</th> <th>{{ "attachment"|remix }}</th>
<th>{% translate "Date" %}</th> <th>{% translate "Date" %}</th>
@ -31,13 +38,6 @@
<th colspan="2">{% translate "Account" %}</th> <th colspan="2">{% translate "Account" %}</th>
{% endif %} {% endif %}
</tr> </tr>
{% if new_transaction_url %}
<tr class="new">
<td colspan="{% if category and account %}5{% elif category or account %}7{% else %}9{% endif %}">
<a href="{{ new_transaction_url }}">{% translate "Create transaction" %}</a>
</td>
</tr>
{% endif %}
</thead> </thead>
<tbody> <tbody>
{% for trans in transactions %} {% for trans in transactions %}