Skip to content
Snippets Groups Projects
Verified Commit 2176ec0d authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Beautify and fix crud_events.html template snippet

parent f8b86682
No related branches found
No related tags found
1 merge request!385Resolve "Replace django-easy-audit"
Pipeline #4727 passed
{% load i18n data_helpers %} {% load i18n data_helpers %}
<ul class="collection"> <div class="collection">
{% for version in obj.versions %} {% for version in obj.versions %}
<li class="collection-item"> <div class="collection-item">
<strong>
{{ version.0.revision.get_comment }}
{{ version.0.revision.user.person }}
</strong>
<div class="left" style="margin-right: 10px;"> <div class="left" style="margin-right: 10px;">
{% if forloop.first %} {% if forloop.first %}
<i class="material-icons">add_circle</i> <i class="material-icons">add_circle</i>
...@@ -15,19 +10,23 @@ ...@@ -15,19 +10,23 @@
<i class="material-icons">edit</i> <i class="material-icons">edit</i>
{% endif %} {% endif %}
</div> </div>
<strong>
{{ version.0.revision.get_comment }}
{% trans "Changed by" %} {% firstof version.0.revision.user.person _("Unknown") %}
</strong>
<div class="right"> <div class="right">
{{ version.0.revision.date_created }} {{ version.0.revision.date_created }}
</div> </div>
{% if version.1 %} {% if version.1 %}
<ul> <ul>
{% for field, change in version.1.items %} {% for field, change in version.1.items %}
{% verbose_name version.0.revision.content_type.app_label version.0.revision.content_type.model field as verbose_name %} {% verbose_name version.0.content_type.app_label version.0.content_type.model field as verbose_name %}
<li> <li>
{{ verbose_name }}: <s>{{ change.0 }}</s> → {{ change.1 }} {{ verbose_name }}: <s>{{ change.0 }}</s> → {{ change.1 }}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
</li> </div>
{% endfor %} {% endfor %}
</ul> </div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment