mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-26 00:43:46 +00:00
Affiche des infos sur certains type d'event
This commit is contained in:
parent
9613d00256
commit
2797ec29b6
1 changed files with 21 additions and 13 deletions
|
@ -31,22 +31,27 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Objet modifié</th>
|
||||
<th>Type de l'objet</th>
|
||||
<th>Modification par</th>
|
||||
<th>Date de modification</th>
|
||||
<th>Commentaire</th>
|
||||
<th>Date</th>
|
||||
<th>Modification</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for revision in revisions_list %}
|
||||
{% for reversion in revision.version_set.all %}
|
||||
{% if reversion.content_type.name in 'ban,whitelist,user,vente,interface'|slice:',' %}
|
||||
<tr>
|
||||
<td>{{ reversion.object|truncatechars:20 }}</td>
|
||||
<td>{{ reversion.object|classname }}</td>
|
||||
<td>{{ revision.user }}</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 %}
|
||||
<td>
|
||||
<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>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue