digitaleagenturnc/recoverdir/templates/recoverdir/rd_updates.html

115 lines
3.9 KiB
HTML

{% load counter_tag %}
<table class="table table-hover" id="updateTable" >
<thead>
<tr>
<th scope="col">Element</th>
<th scope="col">Version</th>
<th scope="col">Mitarbeiter</th>
<th scope="col">Handlung</th>
</tr>
</thead>
<!--
1 = Familien/Freundekontakt
2 = Vertrauensperson
3 = Handlungsleitfaden
4 = Persönliches Schreiben
5 = Handlungsleitfaden Vorsorge und Finanzen
6 = Vollmacht für Banken usw.
7 = ErgoVerDir
8 = OnlineBank
9 = Streaming-Abo
10 = Digitaler Account
11 = Personal
12 = Vertrag Bereich 7
-->
<tbody>
{% for ele in history %}
{% for rdele in ele.history.all %}
<tr>
<td>
{% getHistoryClassOfObject rdele as hisotryelementinfo %}
{% if hisotryelementinfo.1 == 1 %}
<a href="{% url 'recoverdir-contact-historysingle' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 2 %}
<!-- TASK: Hier Einzelansicht Vertrausneperson hinzufügen -->
<a href="{% url 'recoverdir-trust-historysingle' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 3 %}
<a href="{% url 'recoverdir-hl-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 4 %}
<a href="{% url 'recoverdir-plsingle' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 5 %}
<a href="{% url 'recoverdir-hlvf-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 6 %}
<a href="{% url 'recoverdir-deposithistory-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 7 %}
<a href="{% url 'recoverdir-ergohistory-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 8 %}
<a href="{% url 'recoverdir-onlinebankhistory-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 9 %}
<a href="{% url 'recoverdir-streaminghistory-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 10 %}
<a href="{% url 'recoverdir-digitalaccounthistory-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 11 %}
<a href="{% url 'recoverdir-personalhistory-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 12 %}
<a href="{% url 'recoverdir-contracthistory-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% elif hisotryelementinfo.1 == 20 %}
<a href="{% url 'recoverdir-elsehistory-single' ele.pk rdele.pk %}">{{hisotryelementinfo.0}}</a>
{% endif %}
</td>
<td>{{rdele.history_date|date:"d.m.Y H:i"}}</td>
<td>
{% gethistoryuser rdele.history_user_id as history_user %}
{% if history_user != None %}
{{history_user.get_full_name}}
{% else %}
Gelöschter Nutzer
{% endif %}
</td>
<td>{% if rdele.history_type == "~" %} Geändert {% elif rdele.history_type == "+" %} Erstellt {% elif rdele.history_type == "-"%} Gelöscht {% endif %}
</tr>
{% endfor %}
{% endfor %}
</tbody>
</table>
<script type="text/javascript">
$(document).ready(function(){
$('#updateTable').DataTable({
"language": {
"search" : "Suche",
"info": "Zeige _START_ bis _END_ von _TOTAL_ Einträgen",
"lengthMenu": "Zeige _MENU_ Einträge",
"zeroRecords": "Nichts gefunden",
"infoEmpty": "Keine Einträge",
"paginate": {
"first": "Erste",
"last": "Letzte",
"next": "Nächste",
"previous": "Zurück"
},
},
"pageLength": 50,
"buttons" : {
"className" : "btn-danger"
},
"order": [[ 1, "desc" ]]
});
});
</script>