From 1dc867587da6b66ca575eb26f4f65cb9d67ffdb3 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 4 Jan 2011 08:45:15 -0600 Subject: Add Admin log overview page This puts the admin log functionality to a bit more use and allows seeing the last 100 overall entries. You can also drill down to see actions on a per-user basis. Signed-off-by: Dan McGee --- templates/devel/admin_log.html | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 templates/devel/admin_log.html (limited to 'templates/devel') diff --git a/templates/devel/admin_log.html b/templates/devel/admin_log.html new file mode 100644 index 00000000..2de15bad --- /dev/null +++ b/templates/devel/admin_log.html @@ -0,0 +1,62 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block extrastyle %}{{ block.super }}{% endblock %} + +{% block breadcrumbs %}{% endblock %} + +{% block content %} +
+
+{% load log %} +{% if log_user %} +{% get_admin_log 100 as admin_log for_user log_user %} +{% else %} +{% get_admin_log 100 as admin_log %} +{% endif %} +{% if not admin_log %} +

{% trans 'None available' %}

+{% else %} + + + + + + + + + + + + {% for entry in admin_log %} + + + {% if log_user %} + + {% else %} + + {% endif %} + + + + + {% endfor %} + +
{% trans 'Date/time' %}{% trans 'User' %}TypeObject{% trans 'Action' %}
{{ entry.action_time|date:"DATETIME_FORMAT" }}{{ entry.user.username }}{% if entry.user.get_full_name %} ({{ entry.user.get_full_name }}){% endif %}{{ entry.user.username }}{% if entry.user.get_full_name %} ({{ entry.user.get_full_name }}){% endif %} + {% if entry.content_type %} + {% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %} + {% else %} + {% trans 'Unknown content' %} + {% endif %} + + + {% if entry.is_deletion %} + {{ entry.object_repr }} + {% else %} + {{ entry.object_repr }} + {% endif %} + {{ entry.change_message }}
+{% endif %} +
+
+{% endblock %} -- cgit v1.2.3-54-g00ecf