From 1b7cc543f003cdda796d944ad9fcf8bb9747329b Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 18 Apr 2023 10:48:29 +0200 Subject: [PATCH] Update invoice table --- nummi/main/static/main/css/table.css | 6 ++-- nummi/main/templates/main/plot/category.html | 2 +- nummi/main/templates/main/plot/history.html | 2 +- nummi/main/templates/main/table/invoice.html | 36 +++++++++++++++++++ nummi/main/templates/main/table/snapshot.html | 2 +- .../templates/main/table/transaction.html | 2 +- .../main/templates/main/transaction_form.html | 19 +--------- 7 files changed, 45 insertions(+), 24 deletions(-) create mode 100644 nummi/main/templates/main/table/invoice.html diff --git a/nummi/main/static/main/css/table.css b/nummi/main/static/main/css/table.css index 1b27340..c4d9c0f 100644 --- a/nummi/main/static/main/css/table.css +++ b/nummi/main/static/main/css/table.css @@ -1,12 +1,14 @@ table { border-collapse: collapse; +} +table.full-width { width: 100%; } thead { background: var(--bg-01); } -col {width: 8rem} -col.icon {width: 1ch} +table.full-width col {width: 8rem} +table col.icon {width: 1ch} tr { border: .1rem solid var(--gray); height: 2rem; diff --git a/nummi/main/templates/main/plot/category.html b/nummi/main/templates/main/plot/category.html index 8a15510..3f447b5 100644 --- a/nummi/main/templates/main/plot/category.html +++ b/nummi/main/templates/main/plot/category.html @@ -1,7 +1,7 @@ {% load main_extras %} {% load i18n %}
- +
diff --git a/nummi/main/templates/main/plot/history.html b/nummi/main/templates/main/plot/history.html index 56da292..73c80d4 100644 --- a/nummi/main/templates/main/plot/history.html +++ b/nummi/main/templates/main/plot/history.html @@ -1,7 +1,7 @@ {% load main_extras %} {% load i18n %}
-
+
diff --git a/nummi/main/templates/main/table/invoice.html b/nummi/main/templates/main/table/invoice.html new file mode 100644 index 0000000..482b3c8 --- /dev/null +++ b/nummi/main/templates/main/table/invoice.html @@ -0,0 +1,36 @@ +{% load main_extras %} +{% load i18n %} +
+
+ + + + + + + + + + {% for invoice in transaction.invoices %} + + + + + + {% endfor %} + + + + + + +
{% translate "Name" %}{% translate "File" %}{% translate "Delete" %}
+ {{ invoice.name }} + + {% translate "File" %} + + {% translate "Delete" %} +
+ {% translate "New invoice" %} +
+
diff --git a/nummi/main/templates/main/table/snapshot.html b/nummi/main/templates/main/table/snapshot.html index de5cd50..c07e6bd 100644 --- a/nummi/main/templates/main/table/snapshot.html +++ b/nummi/main/templates/main/table/snapshot.html @@ -1,7 +1,7 @@ {% load main_extras %} {% load i18n %}
- +
diff --git a/nummi/main/templates/main/table/transaction.html b/nummi/main/templates/main/table/transaction.html index 7d7ac59..0f6a137 100644 --- a/nummi/main/templates/main/table/transaction.html +++ b/nummi/main/templates/main/table/transaction.html @@ -1,7 +1,7 @@ {% load main_extras %} {% load i18n %}
-
+
diff --git a/nummi/main/templates/main/transaction_form.html b/nummi/main/templates/main/transaction_form.html index 47a65b6..9fa3cb6 100644 --- a/nummi/main/templates/main/transaction_form.html +++ b/nummi/main/templates/main/transaction_form.html @@ -22,23 +22,6 @@ {% endspaceless %} {% if not form.instance.adding %}

{% translate "Invoices" %}

-
-
- - {% translate "Name" %} - -
- {% for inv in transaction.invoices %} - - {% endfor %} - -
+ {% include "main/table/invoice.html" %} {% endif %} {% endblock %}