[Compensation] Conservation office #5

* keeps responsible data in compensation model for potential future purposes
* refactors registration_office and conservation_office to map onto KonovaCodes instead of own Organization model
* adds str_as_office property-method to KonovaCode to provide an easy way of rendering template data
* adds missing highlighting in case of missing information about registration office and conservation office
This commit is contained in:
mipel
2021-08-27 09:44:23 +02:00
parent b20ce0fdbc
commit e35dc6f2a5
5 changed files with 42 additions and 11 deletions

View File

@@ -52,9 +52,9 @@
{% endif %}
</td>
</tr>
<tr>
<tr {% if not obj.responsible.conservation_office %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Conservation office' %}</th>
<td class="align-middle">{{obj.responsible.conservation_office|default_if_none:""}}</td>
<td class="align-middle">{{obj.responsible.conservation_office.str_as_office|default_if_none:""}}</td>
</tr>
<tr {% if not obj.responsible.conservation_file_number %}class="alert alert-danger" title="{% trans 'Missing' %}" {% endif %}>
<th scope="row">{% trans 'Conversation office file number' %}</th>