#20 Multiple laws

* refactors law field from ForeignKey to ManyToManyField to support multiple laws being added to one LegalData object
* added funding data to EMA detail view
This commit is contained in:
mipel
2021-09-20 13:33:07 +02:00
parent 6bd68967c0
commit b39e96c495
4 changed files with 22 additions and 13 deletions

View File

@@ -34,9 +34,14 @@
<th scope="row">{% trans 'Process type' %}</th>
<td class="align-middle">{{intervention.legal.process_type|default_if_none:""}}</td>
</tr>
<tr {% if not intervention.legal.law %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<tr {% if intervention.legal.laws.count == 0 %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Law' %}</th>
<td class="align-middle">{{intervention.legal.law|default_if_none:""}}</td>
<td class="align-middle">
{% for law in intervention.legal.laws.all %}
<div class="badge pill-badge rlp-r-outline">{{law.short_name}} - {{law.long_name}}</div>
<br>
{% endfor %}
</td>
</tr>
<tr {% if not intervention.responsible.registration_office %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Registration office' %}</th>