HTML improvements
* refactors initializing and rendering of a map view into map/geom_form.html, which leads to simple includes on the detail views instead of redundant html * refactors django-autocomplete-light form media links and scripts into dal/scripts.html, which can be included on the header blocks of detail views to support form modals using dal easier without the need for form.media * changes filter behaviour on eco account index: instead of hiding recorded accounts (like in interventions), the filter option there has been replaced with "Show only unrecorded" which can be used to hide all recorded ones * background: eco accounts shall be visible when recorded, since they can only be used for withdrawing if they are recorded. Hiding the recorded ones does not make any sense, just like in interventions * updates some code documentation * adds/updates translations
This commit is contained in:
@@ -2,7 +2,13 @@
|
||||
{% load i18n l10n static fontawesome_5 humanize %}
|
||||
|
||||
{% block head %}
|
||||
|
||||
{% comment %}
|
||||
dal documentation (django-autocomplete-light) states using form.media for adding needed scripts.
|
||||
This does not work properly with modal forms, as the scripts are not loaded properly inside the modal.
|
||||
Therefore the script linkages from form.media have been extracted and put inside dal/scripts.html to ensure
|
||||
these scripts are loaded when needed.
|
||||
{% endcomment %}
|
||||
{% include 'dal/scripts.html' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
@@ -44,7 +50,7 @@
|
||||
<th scope="row">{% trans 'Conservation office' %}</th>
|
||||
<td class="align-middle">{{intervention.responsible.conservation_office|default_if_none:""}}</td>
|
||||
</tr>
|
||||
<tr{% if not intervention.responsible.conservation_file_number %}class="alert alert-danger"{% endif %}>
|
||||
<tr {% if not intervention.responsible.conservation_file_number %}class="alert alert-danger"{% endif %}>
|
||||
<th scope="row">{% trans 'Conversation office file number' %}</th>
|
||||
<td class="align-middle">{{intervention.responsible.conservation_file_number|default_if_none:""}}</td>
|
||||
</tr>
|
||||
@@ -112,11 +118,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-12 col-lg-6">
|
||||
{% if geom_form.area == 0 %}
|
||||
<div class="alert alert-info">{% trans 'No geometry added, yet.' %}</div>
|
||||
{% endif %}
|
||||
{{geom_form.media}}
|
||||
{{geom_form.geom}}
|
||||
{% include 'map/geom_form.html' %}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
Reference in New Issue
Block a user