No Description

object_history.html 1.4KB

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