8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-30 08:32:26 +00:00

Logs des controles

This commit is contained in:
Dalahro 2017-01-08 13:41:01 +01:00 committed by root
parent 38e2507230
commit 9a1d2d4d71
2 changed files with 18 additions and 16 deletions

View file

@ -28,7 +28,7 @@ class Facture(models.Model):
return name return name
def __str__(self): def __str__(self):
return str(self.date) + ' ' + str(self.user) return str(self.user) + ' ' + str(self.date)
@receiver(post_save, sender=Facture) @receiver(post_save, sender=Facture)
def facture_post_save(sender, **kwargs): def facture_post_save(sender, **kwargs):

View file

@ -16,20 +16,22 @@
</tr> </tr>
</thead> </thead>
{% for revision in revisions_list %} {% for revision in revisions_list %}
<tr> {% for reversion in revision.version_set.all %}
<td>{% for reversion in revision.version_set.all %}{{ reversion.object|truncatechars:20 }}{% endfor %}</td> <tr>
<td>{% for reversion in revision.version_set.all %}{{ reversion.object|classname }}{% endfor %}</td> <td>{{ reversion.object|truncatechars:20 }}</td>
<td>{{ revision.user }}</td> <td>{{ reversion.object|classname }}</td>
<td>{{ revision.date_created }}</td> <td>{{ revision.user }}</td>
<td>{{ revision.comment }}</td> <td>{{ revision.date_created }}</td>
{% if is_bureau %} <td>{{ revision.comment }}</td>
<td> {% if is_bureau %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' revision.id %}"> <td>
<i class="glyphicon glyphicon-remove"></i> <a class="btn btn-danger btn-sm" role="button" href="{% url 'logs:revert-action' revision.id %}">
Annuler <i class="glyphicon glyphicon-remove"></i>
</a> Annuler
</td> </a>
{% endif %} </td>
</tr> {% endif %}
</tr>
{% endfor %}
{% endfor %} {% endfor %}
</table> </table>