Ticket #6396: better_patch-6396.diff
File better_patch-6396.diff, 2.3 KB (added by , 16 years ago) |
---|
-
Users/mwdiers/Documents/workspace/django-trunk/django/contrib/admin/templates/admin/change_list_results.html
10 10 </thead> 11 11 <tbody> 12 12 {% for result in results %} 13 <tr class="{% cycle 'row1' 'row2' %}">{% for item in result %}{{ item }}{% endfor %}</tr> 13 <tr class="{% cycle 'row1' 'row2' %}"> 14 {% for item in result %}<{{ item.table_tag }} {{ item.row_class }}>{% if item.url %}<a href="{{ item.url }}" {{ item.event }}>{{ item.result }}</a>{% else %}{{ item.result }}{% endif %}</{{ item.table_tag }}>{% endfor %} 15 </tr> 14 16 {% endfor %} 15 17 </tbody> 16 18 </table> -
Users/mwdiers/Documents/workspace/django-trunk/django/contrib/admin/templatetags/admin_list.py
196 196 # Convert the pk to something that can be used in Javascript. 197 197 # Problem cases are long ints (23L) and non-ASCII strings. 198 198 result_id = repr(force_unicode(getattr(result, pk)))[1:] 199 yield mark_safe(u'<%s%s><a href="%s"%s>%s</a></%s>' % \ 200 (table_tag, row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %s); return false;"' % result_id or ''), conditional_escape(result_repr), table_tag)) 199 yield {'row_class': row_class, 'url': url, 'event': (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %s); return false;"' % result_id or ''), 'result': conditional_escape(result_repr), 'table_tag': table_tag} 201 200 else: 202 yield mark_safe(u'<td%s>%s</td>' % (row_class, conditional_escape(result_repr)))201 yield {'row_class': row_class, 'url': '', 'event': '', 'result': conditional_escape(result_repr), 'table_tag': 'td'} 203 202 204 203 def results(cl): 205 204 for res in cl.result_list: