8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-22 19:33:11 +00:00

Handle empty objects in event logs view

This commit is contained in:
Jean-Romain Garnier 2020-04-24 17:48:48 +02:00 committed by Gabriel Detraz
parent ed086ae255
commit 3c61a4cd04

View file

@ -46,14 +46,22 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% for version in revision.versions %} {% for version in revision.versions %}
<tr> <tr>
<td> <td>
{% if version.object_id %}
<a href="{% url 'logs:history' version.application version.model_name version.object_id %}" title="{% trans "History" %}"> <a href="{% url 'logs:history' version.application version.model_name version.object_id %}" title="{% trans "History" %}">
{{ version.name }} {{ version.name }}
</a> </a>
{% else %}
{{ version.name }}
{% endif %}
</td> </td>
<td> <td>
{% if revision.performed_by %}
<a href="{% url 'users:profil' userid=revision.performed_by.id %}" title=tr_view_the_profile> <a href="{% url 'users:profil' userid=revision.performed_by.id %}" title=tr_view_the_profile>
{{ revision.performed_by }} {{ revision.performed_by }}
</a> </a>
{% else %}
{{ revision.performed_by }}
{% endif %}
</td> </td>
<td>{{ revision.date_created }}</td> <td>{{ revision.date_created }}</td>
<td>{{ revision.comment }}</td> <td>{{ revision.comment }}</td>