object_history.html 1.5 KB

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