mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 23:43:47 +00:00
Affiche des infos sur certains type d'event
This commit is contained in:
parent
5e2e5169d6
commit
22bba5c335
1 changed files with 21 additions and 13 deletions
|
@ -31,31 +31,39 @@ 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></th>
|
||||||
<th>Date de modification</th>
|
|
||||||
<th>Commentaire</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 %}
|
||||||
<tr>
|
{% if reversion.content_type.name in 'ban,whitelist,user,vente,interface'|slice:',' %}
|
||||||
<td>{{ reversion.object|truncatechars:20 }}</td>
|
<tr>
|
||||||
<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' %}
|
||||||
{% if is_bureau %}
|
<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>
|
<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 %}">
|
||||||
<i class="glyphicon glyphicon-remove"></i>
|
<i class="glyphicon glyphicon-remove"></i>
|
||||||
Annuler
|
Annuler
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue