Code

Ticket #1485: django_1485.diff

File django_1485.diff, 2.0 KB (added by Christopher Lenz <cmlenz@…>, 8 years ago)

Fixes to admin templates related to LogEntry

Line 
1Index: django/contrib/admin/templates/admin/object_history.html
2===================================================================
3--- django/contrib/admin/templates/admin/object_history.html    (revision 129)
4+++ django/contrib/admin/templates/admin/object_history.html    (working copy)
5@@ -24,7 +24,7 @@
6         {% for action in action_list %}
7         <tr>
8             <th>{{ action.action_time|date:_("DATE_WITH_TIME_FULL") }}</th>
9-            <td>{{ action.get_user.username }}{% if action.get_user.first_name %} ({{ action.get_user.first_name }} {{ action.get_user.last_name }}){% endif %}</td>
10+            <td>{{ action.user.username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %}</td>
11             <td>{{ action.change_message}}</td>
12         </tr>
13         {% endfor %}
14Index: django/contrib/admin/templates/admin/index.html
15===================================================================
16--- django/contrib/admin/templates/admin/index.html     (revision 129)
17+++ django/contrib/admin/templates/admin/index.html     (working copy)
18@@ -57,7 +57,7 @@
19             {% else %}
20             <ul class="actionlist">
21             {% for entry in admin_log %}
22-                <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{{ entry.object_repr|escape }}{% if not entry.is_deletion %}</a>{% endif %}<br /><span class="mini quiet">{{ entry.get_content_type.name|capfirst }}</span></li>
23+                <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{{ entry.object_repr|escape }}{% if not entry.is_deletion %}</a>{% endif %}<br /><span class="mini quiet">{{ entry.content_type.name|capfirst }}</span></li>
24             {% endfor %}
25             </ul>
26             {% endif %}