#38 User requests
* implements 2) "Multiple revocations for interventions"
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<h5>
|
||||
<span class="badge badge-light">{% if obj.legal.revocation %}1{% else %}0{% endif %}</span>
|
||||
{% trans 'Revocation' %}
|
||||
<span class="badge badge-light">{{obj.legal.revocations.count}}</span>
|
||||
{% trans 'Revocations' %}
|
||||
</h5>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
@@ -44,30 +44,28 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if obj.legal.revocation %}
|
||||
{% with obj.legal.revocation as rev %}
|
||||
<tr>
|
||||
<td class="align-middle">
|
||||
{{ rev.date }}
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
{% if rev.document %}
|
||||
<a href="{% url 'intervention:get-doc-revocation' rev.document.id %}">
|
||||
{% trans 'Revocation' %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="align-middle">{{ rev.comment }}</td>
|
||||
<td>
|
||||
{% if is_default_member and has_access %}
|
||||
<button data-form-url="{% url 'intervention:remove-revocation' rev.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove revocation' %}">
|
||||
{% fa5_icon 'trash' %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% for rev in obj.legal.revocations.all %}
|
||||
<tr>
|
||||
<td class="align-middle">
|
||||
{{ rev.date }}
|
||||
</td>
|
||||
<td class="align-middle">
|
||||
{% if rev.document %}
|
||||
<a href="{% url 'intervention:get-doc-revocation' rev.document.id %}">
|
||||
{% trans 'Revocation' %}
|
||||
</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="align-middle">{{ rev.comment }}</td>
|
||||
<td>
|
||||
{% if is_default_member and has_access %}
|
||||
<button data-form-url="{% url 'intervention:remove-revocation' rev.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove revocation' %}">
|
||||
{% fa5_icon 'trash' %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -99,9 +99,9 @@
|
||||
<th scope="row">{% trans 'Binding on' %}</th>
|
||||
<td class="align-middle">{{obj.legal.binding_date|default_if_none:""}}</td>
|
||||
</tr>
|
||||
<tr {% if obj.legal.revocation %}class="alert alert-danger" title="{% trans 'Exists' %}" {% endif %}>
|
||||
<th scope="row">{% trans 'Revocation' %}</th>
|
||||
<td class="align-middle">{{obj.legal.revocation.date|naturalday|default_if_none:""}}</td>
|
||||
<tr {% if obj.legal.revocations.all %}class="alert alert-danger" title="{% trans 'Exists' %}" {% endif %}>
|
||||
<th scope="row">{% trans 'Revocations' %}</th>
|
||||
<td class="align-middle">{{obj.legal.revocations.count}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Last modified' %}</th>
|
||||
|
||||
Reference in New Issue
Block a user