#86 Edit document

* adds support for editing of documents
* adds buttons for intervention
This commit is contained in:
2022-02-10 10:21:18 +01:00
parent 9915e6a450
commit a385420c57
14 changed files with 247 additions and 175 deletions

View File

@@ -27,7 +27,10 @@
<th scope="col">
{% trans 'Title' %}
</th>
<th class="w-50" scope="col">
<th scope="col">
{% trans 'Created on' %}
</th>
<th scope="col">
{% trans 'Comment' %}
</th>
{% if is_default_member and has_access %}
@@ -43,18 +46,26 @@
{% for doc in obj.documents.all %}
<tr>
<td>
<a href="{% url 'intervention:get-doc' doc.id %}">
<a href="{% url 'intervention:get-doc' obj.id doc.id %}">
{{ doc.title }}
</a>
</td>
<td>
<div class="scroll-150">
{{ doc.date_of_creation }}
</div>
</td>
<td>
<div class="scroll-150">
{{ doc.comment }}
</div>
</td>
<td>
<td class="align-middle float-right">
{% if is_default_member and has_access %}
<button data-form-url="{% url 'intervention:remove-doc' doc.id %}" class="btn btn-default btn-modal float-right" title="{% trans 'Remove document' %}">
<button data-form-url="{% url 'intervention:edit-doc' obj.id doc.id %}" class="btn btn-default btn-modal" title="{% trans 'Edit document' %}">
{% fa5_icon 'edit' %}
</button>
<button data-form-url="{% url 'intervention:remove-doc' obj.id doc.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove document' %}">
{% fa5_icon 'trash' %}
</button>
{% endif %}