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 {
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;

View file

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

View file

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

View file

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

View file

@ -22,23 +22,6 @@
{% endspaceless %}
{% if not form.instance.adding %}
<h2>{% translate "Invoices" %}</h2>
<div id="invoices" class="table col1-1-1">
<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>
{% include "main/table/invoice.html" %}
{% endif %}
{% endblock %}