object_history.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {% extends "admin/base_site.html" %}
  2. {% load i18n %}
  3. {% load url from future %}
  4. {% load admin_urls %}
  5. {% block breadcrumbs %}
  6. <div class="breadcrumbs">
  7. <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
  8. &rsaquo; <a href="{% url 'admin:app_list' app_label=app_label %}">{{ app_label|capfirst|escape }}</a>
  9. &rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ module_name }}</a>
  10. &rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}{{ object.pk }}">{{ object|truncatewords:"18" }}</a>
  11. &rsaquo; {% trans 'History' %}
  12. </div>
  13. {% endblock %}
  14. {% block content %}
  15. <div id="content-main">
  16. <div class="module">
  17. {% if action_list %}
  18. <table id="change-history">
  19. <thead>
  20. <tr>
  21. <th scope="col">{% trans 'Date/time' %}</th>
  22. <th scope="col">{% trans 'User' %}</th>
  23. <th scope="col">{% trans 'Action' %}</th>
  24. </tr>
  25. </thead>
  26. <tbody>
  27. {% for action in action_list %}
  28. <tr>
  29. <th scope="row">{{ action.action_time|date:"DATETIME_FORMAT" }}</th>
  30. <td>{{ action.user.username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %}</td>
  31. <td>{{ action.change_message }}</td>
  32. </tr>
  33. {% endfor %}
  34. </tbody>
  35. </table>
  36. {% else %}
  37. <p>{% trans "This object doesn't have a change history. It probably wasn't added via this admin site." %}</p>
  38. {% endif %}
  39. </div>
  40. </div>
  41. {% endblock %}