8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-27 01:13:46 +00:00

Affiche des infos sur certains type d'event

This commit is contained in:
Maël Kervella 2017-09-10 00:40:42 +00:00 committed by Pierre Cadart
parent 9613d00256
commit 2797ec29b6

View file

@ -31,22 +31,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
<table class="table table-striped"> <table class="table table-striped">
<thead> <thead>
<tr> <tr>
<th>Objet modifié</th> <th>Date</th>
<th>Type de l'objet</th> <th>Modification</th>
<th>Modification par</th>
<th>Date de modification</th>
<th>Commentaire</th>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
{% for revision in revisions_list %} {% for revision in revisions_list %}
{% for reversion in revision.version_set.all %} {% for reversion in revision.version_set.all %}
{% if reversion.content_type.name in 'ban,whitelist,user,vente,interface'|slice:',' %}
<tr> <tr>
<td>{{ reversion.object|truncatechars:20 }}</td>
<td>{{ reversion.object|classname }}</td>
<td>{{ revision.user }}</td>
<td>{{ revision.date_created }}</td> <td>{{ revision.date_created }}</td>
<td>{{ revision.comment }}</td> {% if reversion.content_type.name == 'ban' %}
<td>{{ revision.user.get_username }} a banni <a href="{% url 'users:profil' reversion.object.user_id %}">{{ reversion.object.user.get_username }}</a> (<i>{{ reversion.object.raison }}</i>)</td>
{% elif reversion.content_type.name == 'whitelist' %}
<td>{{ revision.user.get_username }} a autorisé gracieusement <a href="{% url 'users:profil' reversion.object.user_id %}">{{ reversion.object.user.get_username }}</a> (<i>{{ reversion.object.raison }}</i>)</td>
{% elif reversion.content_type.name == 'user' %}
<td>{{ revision.user.get_username }} a ajouté <a href="{% url 'users:profil' reversion.object.id %}">{{ reversion.object.get_username }}</a></td>
{% elif reversion.content_type.name == 'vente' %}
<td><a href="{% url 'users:profil' reversion.object.facture.user_id %}">{{ reversion.object.facture.user.get_username }}</a> a acheté {{ reversion.object.number }}x {{ reversion.object.name }}{% if reversion.object.iscotisation %} (<i>+{{ reversion.object.duration }} mois</i>){% endif %}</td>
{% elif reversion.content_type.name == 'interface' %}
<td>{{ revision.user.get_username }} a ajouté une interface à <a href="{% url 'users:profil' reversion.object.machine.user_id %}">{{ reversion.object.machine.user.get_username }}</a> (<i>MAC : {{ reversion.object.mac_bare }}</i>)</td>
{% endif %}
{% if is_bureau %} {% if is_bureau %}
<td> <td>
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' revision.id %}"> <a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' revision.id %}">
@ -56,6 +61,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
</td> </td>
{% endif %} {% endif %}
</tr> </tr>
{% endif %}
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
</table> </table>