73 lines
2.8 KiB
HTML
73 lines
2.8 KiB
HTML
{% load i18n l10n fontawesome_5 %}
|
|
<div id="revocation" class="card">
|
|
<div class="card-header rlp-r">
|
|
<div class="row">
|
|
<div class="col-sm-6">
|
|
<h5>
|
|
<span class="badge badge-light">{{obj.legal.revocations.count}}</span>
|
|
{% trans 'Revocations' %}
|
|
</h5>
|
|
</div>
|
|
<div class="col-sm-6">
|
|
<div class="d-flex justify-content-end">
|
|
{% comment %}
|
|
Only show add-button if no revocation exists, yet.
|
|
{% endcomment %}
|
|
{% if is_default_member and has_access and not obj.legal.revocation %}
|
|
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'intervention:new-revocation' obj.id %}" title="{% trans 'Add revocation' %}">
|
|
{% fa5_icon 'plus' %}
|
|
{% fa5_icon 'ban' %}
|
|
</button>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body scroll-300">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">
|
|
{% trans 'From' context 'Revocation' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Document' %}
|
|
</th>
|
|
<th scope="col">
|
|
{% trans 'Comment' %}
|
|
</th>
|
|
{% if is_default_member and has_access %}
|
|
<th scope="col">
|
|
{% trans 'Action' %}
|
|
</th>
|
|
{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% 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>
|
|
</div>
|