#38 User requests

* implements 1) "Add titles to public reports, next to identifiers"
This commit is contained in:
mpeltriaux 2021-11-15 11:05:39 +01:00
parent fdcae500b1
commit e922b983dd
4 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@
<th scope="row">{% trans 'compensates intervention' %}</th>
<td class="align-middle">
<a href="{% url 'intervention:report' obj.intervention.id %}">
{{obj.intervention.identifier}}
{{obj.intervention.identifier}} - {{obj.intervention.title}}
</a>
</td>
</tr>

View File

@ -29,7 +29,7 @@
<td class="align-middle">
{% for deduction in deductions %}
<a href="{% url 'intervention:report' deduction.intervention__id %}">
{{deduction.intervention__identifier}}
{{deduction.intervention__identifier}} - {{deduction.intervention__title}}
</a>
<br>
{% empty %}

View File

@ -570,7 +570,7 @@ def report_view(request:HttpRequest, id: str):
deductions = acc.deductions.all()\
.distinct("intervention")\
.select_related("intervention")\
.values_list("intervention__id", "intervention__identifier", named=True)
.values_list("intervention__id", "intervention__identifier", "intervention__title", named=True)
context = {
"obj": acc,

View File

@ -50,7 +50,7 @@
<td class="align-middle">
{% for comp in obj.compensations.all %}
<a href="{% url 'compensation:report' comp.id %}">
{{comp.identifier}}
{{comp.identifier}} - {{comp.title}}
</a>
<br>
{% empty %}
@ -63,7 +63,7 @@
<td class="align-middle">
{% for deduction in deductions %}
<a href="{% url 'compensation:acc-report' deduction.account.id %}">
{{deduction.account.identifier}}
{{deduction.account.identifier}} - {{deduction.account.title}}
</a>
<br>
{% endfor %}