Compare commits

...

3 commits

6 changed files with 85 additions and 85 deletions

View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 0.0.1\n" "Project-Id-Version: 0.0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-18 18:30+0200\n" "POT-Creation-Date: 2023-04-20 09:39+0200\n"
"PO-Revision-Date: 2022-12-21 17:30+0100\n" "PO-Revision-Date: 2022-12-21 17:30+0100\n"
"Last-Translator: edpibu <git@edgarpierre.fr>\n" "Last-Translator: edpibu <git@edgarpierre.fr>\n"
"Language-Team: edpibu <git@edgarpierre.fr>\n" "Language-Team: edpibu <git@edgarpierre.fr>\n"
@ -21,143 +21,144 @@ msgstr ""
msgid "Add transactions" msgid "Add transactions"
msgstr "Ajouter des transactions" msgstr "Ajouter des transactions"
#: .\forms.py:108 .\templates\main\base.html:87 #: .\forms.py:108 .\templates\main\base.html:76
#: .\templates\main\form\search.html:5 .\templates\main\list\transaction.html:9 #: .\templates\main\form\search.html:5 .\templates\main\list\transaction.html:9
#: .\templates\main\list\transaction.html:26 .\templates\main\search.html:6 #: .\templates\main\list\transaction.html:26 .\templates\main\search.html:6
#: .\templates\main\search.html:18 #: .\templates\main\search.html:18
msgid "Search" msgid "Search"
msgstr "Rechercher" msgstr "Rechercher"
#: .\models.py:17 #: .\models.py:19
msgid "User" msgid "User"
msgstr "Utilisateur" msgstr "Utilisateur"
#: .\models.py:45 .\models.py:79 .\models.py:87 .\models.py:237 #: .\models.py:38 .\models.py:72 .\models.py:80 .\models.py:230
#: .\templates\main\table\snapshot.html:28 #: .\templates\main\table\snapshot.html:24
#: .\templates\main\table\transaction.html:37 #: .\templates\main\table\transaction.html:35
msgid "Account" msgid "Account"
msgstr "Compte" msgstr "Compte"
#: .\models.py:45 .\models.py:97 .\models.py:208 .\models.py:278 #: .\models.py:38 .\models.py:90 .\models.py:201 .\models.py:271
#: .\templates\main\table\invoice.html:9 #: .\templates\main\table\invoice.html:9
#: .\templates\main\table\transaction.html:30 #: .\templates\main\table\transaction.html:28
msgid "Name" msgid "Name"
msgstr "Nom" msgstr "Nom"
#: .\models.py:49 .\models.py:102 #: .\models.py:42 .\models.py:95
msgid "Icon" msgid "Icon"
msgstr "Icône" msgstr "Icône"
#: .\models.py:51 #: .\models.py:44
msgid "Default" msgid "Default"
msgstr "Défaut" msgstr "Défaut"
#: .\models.py:80 .\templates\main\index.html:19 #: .\models.py:73 .\templates\main\index.html:16
msgid "Accounts" msgid "Accounts"
msgstr "Comptes" msgstr "Comptes"
#: .\models.py:97 .\models.py:121 .\models.py:227 #: .\models.py:90 .\models.py:114 .\models.py:220
#: .\templates\main\plot\category.html:14 #: .\templates\main\plot\category.html:14
#: .\templates\main\table\transaction.html:34 #: .\templates\main\table\transaction.html:32
msgid "Category" msgid "Category"
msgstr "Catégorie" msgstr "Catégorie"
#: .\models.py:104 #: .\models.py:97
msgid "Budget" msgid "Budget"
msgstr "Budget" msgstr "Budget"
#: .\models.py:122 .\templates\main\form\snapshot.html:35 #: .\models.py:115 .\templates\main\form\snapshot.html:29
#: .\templates\main\index.html:35 #: .\templates\main\index.html:32
msgid "Categories" msgid "Categories"
msgstr "Catégories" msgstr "Catégories"
#: .\models.py:127 #: .\models.py:120
msgid "End date" msgid "End date"
msgstr "Date de fin" msgstr "Date de fin"
#: .\models.py:129 #: .\models.py:122
msgid "Start date" msgid "Start date"
msgstr "Date de début" msgstr "Date de début"
#: .\models.py:132 #: .\models.py:125
msgid "End value" msgid "End value"
msgstr "Valeur de fin" msgstr "Valeur de fin"
#: .\models.py:135 #: .\models.py:128
msgid "Start value" msgid "Start value"
msgstr "Valeur de début" msgstr "Valeur de début"
#: .\models.py:141 .\templates\main\table\snapshot.html:31 #: .\models.py:134 .\templates\main\table\snapshot.html:27
msgid "Difference" msgid "Difference"
msgstr "Différence" msgstr "Différence"
#: .\models.py:148 #: .\models.py:141
msgid "Transaction difference" msgid "Transaction difference"
msgstr "Différence des transactions" msgstr "Différence des transactions"
#: .\models.py:154 .\models.py:283 .\templates\main\table\invoice.html:10 #: .\models.py:147 .\models.py:276 .\templates\main\form\fileinput.html:8
#: .\templates\main\table\invoice.html:10
#: .\templates\main\table\invoice.html:21 #: .\templates\main\table\invoice.html:21
msgid "File" msgid "File"
msgstr "Fichier" msgstr "Fichier"
#: .\models.py:161 #: .\models.py:154
#, python-format #, python-format
msgid "%(date)s statement" msgid "%(date)s statement"
msgstr "Relevé du %(date)s" msgstr "Relevé du %(date)s"
#: .\models.py:201 .\models.py:232 #: .\models.py:194 .\models.py:225
msgid "Statement" msgid "Statement"
msgstr "Relevé" msgstr "Relevé"
#: .\models.py:202 .\templates\main\form\account.html:27 #: .\models.py:195 .\templates\main\form\account.html:25
#: .\templates\main\list\snapshot.html:6 .\templates\main\list\snapshot.html:20 #: .\templates\main\list\snapshot.html:6 .\templates\main\list\snapshot.html:20
msgid "Statements" msgid "Statements"
msgstr "Relevés" msgstr "Relevés"
#: .\models.py:208 .\models.py:271 #: .\models.py:201 .\models.py:264
msgid "Transaction" msgid "Transaction"
msgstr "Transaction" msgstr "Transaction"
#: .\models.py:210 #: .\models.py:203
msgid "Description" msgid "Description"
msgstr "Description" msgstr "Description"
#: .\models.py:212 .\templates\main\table\snapshot.html:30 #: .\models.py:205 .\templates\main\table\snapshot.html:26
#: .\templates\main\table\transaction.html:31 #: .\templates\main\table\transaction.html:29
msgid "Value" msgid "Value"
msgstr "Valeur" msgstr "Valeur"
#: .\models.py:214 .\templates\main\table\snapshot.html:26 #: .\models.py:207 .\templates\main\table\snapshot.html:22
#: .\templates\main\table\transaction.html:29 #: .\templates\main\table\transaction.html:27
msgid "Date" msgid "Date"
msgstr "Date" msgstr "Date"
#: .\models.py:215 #: .\models.py:208
msgid "Real date" msgid "Real date"
msgstr "Date réelle" msgstr "Date réelle"
#: .\models.py:217 .\templates\main\table\transaction.html:32 #: .\models.py:210 .\templates\main\table\transaction.html:30
msgid "Trader" msgid "Trader"
msgstr "Commerçant" msgstr "Commerçant"
#: .\models.py:220 #: .\models.py:213
msgid "Payment" msgid "Payment"
msgstr "Paiement" msgstr "Paiement"
#: .\models.py:272 .\templates\main\base.html:52 #: .\models.py:265 .\templates\main\base.html:50
#: .\templates\main\form\account.html:31 .\templates\main\form\category.html:27 #: .\templates\main\form\account.html:29 .\templates\main\form\category.html:25
#: .\templates\main\form\snapshot.html:39 .\templates\main\index.html:29 #: .\templates\main\form\snapshot.html:33 .\templates\main\index.html:26
#: .\templates\main\list\transaction.html:6 #: .\templates\main\list\transaction.html:6
#: .\templates\main\list\transaction.html:23 #: .\templates\main\list\transaction.html:23
#: .\templates\main\table\snapshot.html:32 #: .\templates\main\table\snapshot.html:28
msgid "Transactions" msgid "Transactions"
msgstr "Transactions" msgstr "Transactions"
#: .\models.py:278 .\models.py:317 #: .\models.py:271 .\models.py:308
msgid "Invoice" msgid "Invoice"
msgstr "Facture" msgstr "Facture"
#: .\models.py:318 .\templates\main\form\transaction.html:24 #: .\models.py:309 .\templates\main\form\transaction.html:24
msgid "Invoices" msgid "Invoices"
msgstr "Factures" msgstr "Factures"
@ -165,35 +166,35 @@ msgstr "Factures"
msgid "Skip to main content" msgid "Skip to main content"
msgstr "Aller au contenu principal" msgstr "Aller au contenu principal"
#: .\templates\main\base.html:40 #: .\templates\main\base.html:39
msgid "Home" msgid "Home"
msgstr "Accueil" msgstr "Accueil"
#: .\templates\main\base.html:46 .\templates\main\index.html:45 #: .\templates\main\base.html:44 .\templates\main\index.html:42
msgid "Snapshots" msgid "Snapshots"
msgstr "Relevés" msgstr "Relevés"
#: .\templates\main\base.html:59 #: .\templates\main\base.html:56
msgid "New account" msgid "New account"
msgstr "Nouveau compte" msgstr "Nouveau compte"
#: .\templates\main\base.html:66 #: .\templates\main\base.html:61
msgid "New snapshot" msgid "New snapshot"
msgstr "Nouveau relevé" msgstr "Nouveau relevé"
#: .\templates\main\base.html:73 #: .\templates\main\base.html:66
msgid "New category" msgid "New category"
msgstr "Nouvelle catégorie" msgstr "Nouvelle catégorie"
#: .\templates\main\base.html:80 .\templates\main\table\transaction.html:5 #: .\templates\main\base.html:71 .\templates\main\table\transaction.html:5
msgid "New transaction" msgid "New transaction"
msgstr "Nouvelle transaction" msgstr "Nouvelle transaction"
#: .\templates\main\base.html:91 #: .\templates\main\base.html:79
msgid "Log out" msgid "Log out"
msgstr "Se déconnecter" msgstr "Se déconnecter"
#: .\templates\main\base.html:96 .\templates\main\form\login.html:7 #: .\templates\main\base.html:84 .\templates\main\form\login.html:7
msgid "Log in" msgid "Log in"
msgstr "Se connecter" msgstr "Se connecter"
@ -210,22 +211,25 @@ msgstr "Annuler"
msgid "Confirm" msgid "Confirm"
msgstr "Confirmer" msgstr "Confirmer"
#: .\templates\main\form\account.html:33 .\templates\main\form\category.html:29 #: .\templates\main\form\account.html:31 .\templates\main\form\category.html:27
#: .\templates\main\index.html:31 #: .\templates\main\index.html:28
msgid "History" msgid "History"
msgstr "Historique" msgstr "Historique"
#: .\templates\main\form\base.html:29 .\templates\main\table\invoice.html:11 #: .\templates\main\form\base.html:27
msgid "Add another"
msgstr "Continuer à ajouter"
#: .\templates\main\form\base.html:38 .\templates\main\table\invoice.html:11
#: .\templates\main\table\invoice.html:24 #: .\templates\main\table\invoice.html:24
#: .\templates\main\tag\form_buttons.html:4
msgid "Delete" msgid "Delete"
msgstr "Supprimer" msgstr "Supprimer"
#: .\templates\main\form\base.html:31 #: .\templates\main\form\base.html:40
msgid "Reset" msgid "Reset"
msgstr "Réinitialiser" msgstr "Réinitialiser"
#: .\templates\main\form\base.html:32 .\templates\main\tag\form_buttons.html:8 #: .\templates\main\form\base.html:41
msgid "Save" msgid "Save"
msgstr "Enregistrer" msgstr "Enregistrer"
@ -241,15 +245,15 @@ msgstr "Aucune transaction à afficher"
msgid "Log In" msgid "Log In"
msgstr "Se connecter" msgstr "Se connecter"
#: .\templates\main\plot\category.html:15 .\templates\main\plot\history.html:14 #: .\templates\main\plot\category.html:15 .\templates\main\plot\history.html:16
msgid "Expenses" msgid "Expenses"
msgstr "Dépenses" msgstr "Dépenses"
#: .\templates\main\plot\category.html:16 .\templates\main\plot\history.html:15 #: .\templates\main\plot\category.html:16 .\templates\main\plot\history.html:17
msgid "Income" msgid "Income"
msgstr "Revenus" msgstr "Revenus"
#: .\templates\main\plot\history.html:13 #: .\templates\main\plot\history.html:15
msgid "Month" msgid "Month"
msgstr "Mois" msgstr "Mois"
@ -265,11 +269,11 @@ msgstr "Nouvelle facture"
msgid "New statement" msgid "New statement"
msgstr "Nouveau relevé" msgstr "Nouveau relevé"
#: .\templates\main\table\snapshot.html:68 #: .\templates\main\table\snapshot.html:60
msgid "View all statements" msgid "View all statements"
msgstr "Voir tous les relevés" msgstr "Voir tous les relevés"
#: .\templates\main\table\transaction.html:83 #: .\templates\main\table\transaction.html:73
msgid "View all transactions" msgid "View all transactions"
msgstr "Voir toutes les transactions" msgstr "Voir toutes les transactions"

View file

@ -22,6 +22,15 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
<tfoot class="buttons"> <tfoot class="buttons">
<tr>
<td colspan="2">
<label for="addmore">{% translate "Add another" %}</label>
<input type="checkbox"
name="addmore"
id="addmore"
{% if form.instance.adding %}checked{% endif %} />
</td>
</tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
{% block buttons %} {% block buttons %}

View file

@ -13,11 +13,16 @@
type="text/css" /> type="text/css" />
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<h1>{{ form.instance }}</h1> {% with invoice=form.instance %}
<h1>{{ invoice }}</h1>
<p>
<a href="{{ invoice.transaction.get_absolute_url }}">{{ invoice.transaction }}</a>
</p>
{% spaceless %} {% spaceless %}
<form id="transaction" method="post" enctype="multipart/form-data"> <form id="transaction" method="post" enctype="multipart/form-data">
{% csrf_token %} {% csrf_token %}
{{ form }} {{ form }}
</form> </form>
{% endspaceless %} {% endspaceless %}
{% endwith %}
{% endblock %} {% endblock %}

View file

@ -1,9 +0,0 @@
{% load i18n %}
<div class="buttons">
{% if not adding %}
{% translate "Delete" as del %}
<a class="btn del" href="{% url del_url instance.id %}">{{ del }}</a>
{% endif %}
<input type="reset" />
<input type="submit" value="{% translate 'Save' %}" />
</div>

View file

@ -33,15 +33,6 @@ def pmrvalue(val):
return value(val, True, r=0) return value(val, True, r=0)
@register.inclusion_tag("main/tag/form_buttons.html")
def form_buttons(instance):
return {
"instance": instance,
"adding": instance._state.adding,
"del_url": f"del_{instance.__class__.__name__.lower()}",
}
@register.filter @register.filter
def remix(icon): def remix(icon):
return mark_safe(f"""<span class="ri-{icon}-line"></span>""") return mark_safe(f"""<span class="ri-{icon}-line"></span>""")