Code

Ticket #1102: django_admin_html_patch_1.diff

File django_admin_html_patch_1.diff, 1.7 KB (added by L.Plant.98@…, 9 years ago)

patch

Line 
1Index: django/contrib/admin/templates/admin/search_form.html
2===================================================================
3--- django/contrib/admin/templates/admin/search_form.html       (revision 1616)
4+++ django/contrib/admin/templates/admin/search_form.html       (working copy)
5@@ -2,7 +2,8 @@
6 {% load i18n %}
7 {% if cl.lookup_opts.admin.search_fields %}
8 <div id="toolbar"><form id="changelist-search" action="" method="get">
9-<label><img src="{% admin_media_prefix %}img/admin/icon_searchbox.png" /></label>
10+<div>
11+<label><img src="{% admin_media_prefix %}img/admin/icon_searchbox.png" alt="Search"/></label>
12 <input type="text" size="40" name="{{ search_var }}" value="{{ cl.query|escape }}" id="searchbar" />
13 <input type="submit" value="{% trans 'Go' %}" />
14 {% if show_result_count %}
15@@ -11,6 +12,7 @@
16 {% for pair in cl.params.items %}
17     {% ifnotequal pair.0 search_var %}<input type="hidden" name="{{ pair.0|escape }}" value="{{ pair.1|escape }}"/>{% endifnotequal %}
18 {% endfor %}
19+</div>
20 </form></div>
21 <script type="text/javascript">document.getElementById("searchbar").focus();</script>
22 {% endif %}
23Index: django/contrib/admin/templates/admin/change_list_results.html
24===================================================================
25--- django/contrib/admin/templates/admin/change_list_results.html       (revision 1616)
26+++ django/contrib/admin/templates/admin/change_list_results.html       (working copy)
27@@ -1,3 +1,4 @@
28+{% if results %}
29 <table cellspacing="0">
30 <thead>
31 <tr>
32@@ -7,7 +8,10 @@
33 {% if header.sortable %}</a>{% endif %}</th>{% endfor %}
34 </tr>
35 </thead>
36+<tbody>
37 {% for result in results %}
38 <tr class="{% cycle row1,row2 %}">{% for item in result %}{{ item }}{% endfor %}</tr>
39 {% endfor %}
40+</tbody>
41 </table>
42+{% endif %}
43\ No newline at end of file