Update invoice table

This commit is contained in:
Edgar P. Burkhart 2023-04-18 10:48:29 +02:00
parent a364b38651
commit 1b7cc543f0
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
7 changed files with 45 additions and 24 deletions

View file

@ -1,12 +1,14 @@
table { table {
border-collapse: collapse; border-collapse: collapse;
}
table.full-width {
width: 100%; width: 100%;
} }
thead { thead {
background: var(--bg-01); background: var(--bg-01);
} }
col {width: 8rem} table.full-width col {width: 8rem}
col.icon {width: 1ch} table col.icon {width: 1ch}
tr { tr {
border: .1rem solid var(--gray); border: .1rem solid var(--gray);
height: 2rem; height: 2rem;

View file

@ -1,7 +1,7 @@
{% load main_extras %} {% load main_extras %}
{% load i18n %} {% load i18n %}
<div class="plot"> <div class="plot">
<table> <table class="full-width">
<colgroup> <colgroup>
<col class="desc"> <col class="desc">
<col class="icon"> <col class="icon">

View file

@ -1,7 +1,7 @@
{% load main_extras %} {% load main_extras %}
{% load i18n %} {% load i18n %}
<div class="plot"> <div class="plot">
<table> <table class="full-width">
<colgroup> <colgroup>
<col class="desc"> <col class="desc">
<col class="value"> <col class="value">

View file

@ -0,0 +1,36 @@
{% load main_extras %}
{% load i18n %}
<div id="invoices">
<table>
<colgroup>
<col class="desc" span="3">
</colgroup>
<thead>
<th>{% translate "Name" %}</th>
<th>{% translate "File" %}</th>
<th>{% translate "Delete" %}</th>
</thead>
<tbody>
{% for invoice in transaction.invoices %}
<tr>
<th scope="row" class="l">
<a href="{{ invoice.get_absolute_url }}">{{ invoice.name }}</a>
</th>
<td>
<a href="{{ invoice.file.url }}">{% translate "File" %}</a>
</td>
<td>
<a href="{{ invoice.get_delete_url }}">{% translate "Delete" %}
</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<td colspan="3">
<a href="{% url "invoice" transaction.pk %}">{% translate "New invoice" %}</a>
</td>
</tr>
</tfoot>
</table>
</div>

View file

@ -1,7 +1,7 @@
{% load main_extras %} {% load main_extras %}
{% load i18n %} {% load i18n %}
<div id="snapshots"> <div id="snapshots">
<table> <table class="full-width">
<colgroup> <colgroup>
<col class="icon" span="2"> <col class="icon" span="2">
<col class="date"> <col class="date">

View file

@ -1,7 +1,7 @@
{% load main_extras %} {% load main_extras %}
{% load i18n %} {% load i18n %}
<div id="transactions"> <div id="transactions">
<table> <table class="full-width">
<colgroup> <colgroup>
<col class="icon"> <col class="icon">
<col class="date"> <col class="date">

View file

@ -22,23 +22,6 @@
{% endspaceless %} {% endspaceless %}
{% if not form.instance.adding %} {% if not form.instance.adding %}
<h2>{% translate "Invoices" %}</h2> <h2>{% translate "Invoices" %}</h2>
<div id="invoices" class="table col1-1-1"> {% include "main/table/invoice.html" %}
<div class="header">
<strong class="attach center"><i class="fa fa-file"></i></strong>
<strong class="name">{% translate "Name" %}</strong>
<strong class="attach right"><i class="fa fa-trash-can"></i></strong>
</div>
{% for inv in transaction.invoices %}
<div class="invoice">
<a href="{{ inv.file.url }}" class="center"><i class="fa-regular fa-file"></i></a>
<a href="{{ inv.get_absolute_url }}">{{ inv.name }}</a>
<a href="{{ inv.get_delete_url }}" class="right">{% translate "Delete" %}</a>
</div>
{% endfor %}
<div class="invoice new">
<span class="center"><i class="fa fa-file-circle-plus"></i></span>
<a href="{% url "invoice" transaction.pk %}">{% translate "New invoice" %}</a>
</div>
</div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}