/core/templates/admin/change_list.html
HTML | 109 lines | 97 code | 12 blank | 0 comment | 0 complexity | 790875a5edbec39fc0cf842d0d642b71 MD5 | raw file
1{% extends "admin/base_site.html" %} 2{% load adminmedia admin_list i18n %} 3 4{% block extrastyle %} 5 {{ block.super }} 6 <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/changelists.css" /> 7 {% if cl.formset %} 8 <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" /> 9 {% endif %} 10 {% if cl.formset or action_form %} 11 {% url admin:jsi18n as jsi18nurl %} 12 <script type="text/javascript" src="{{ jsi18nurl|default:'../../jsi18n/' }}"></script> 13 {% endif %} 14 {{ media.css }} 15 {% if not actions_on_top and not actions_on_bottom %} 16 <style> 17 #changelist table thead th:first-child {width: inherit} 18 </style> 19 {% endif %} 20{% endblock %} 21 22{% block extrahead %} 23 {{ block.super }} 24 {{ media.js }} 25 {% if action_form %} 26 {% if actions_on_top or actions_on_bottom %} 27 <script type="text/javascript"> 28 (function($) { 29 $(document).ready(function($) { 30 $("tr input.action-select").actions(); 31 }); 32 })(django.jQuery); 33 </script> 34 {% endif %} 35 {% endif %} 36{% endblock %} 37 38{% block bodyclass %}change-list{% endblock %} 39 40{% if not is_popup %} 41 {% block breadcrumbs %} 42 <div class="breadcrumbs"> 43 <a href="../../"> 44 {% trans "Home" %} 45 </a> 46 › 47 <a href="../"> 48 {{ app_label|capfirst }} 49 </a> 50 › 51 {{ cl.opts.verbose_name_plural|capfirst }} 52 </div> 53 {% endblock %} 54{% endif %} 55 56{% block coltype %}flex{% endblock %} 57 58{% block content %} 59 <div id="content-main"> 60 {% block object-tools %} 61 {% if has_add_permission %} 62 <ul class="object-tools"> 63 <li> 64 <a href="add/{% if is_popup %}?_popup=1{% endif %}" class="addlink"> 65 {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %} 66 </a> 67 </li> 68 </ul> 69 {% endif %} 70 {% endblock %} 71 72 {% if cl.formset.errors %} 73 <p class="errornote"> 74 {% blocktrans count cl.formset.errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %} 75 </p> 76 {{ cl.formset.non_form_errors }} 77 {% endif %} 78 79 <div class="module{% if cl.has_filters %} filtered{% endif %}" id="changelist"> 80 {% block search %}{% search_form cl %}{% endblock %} 81 {% block date_hierarchy %}{% date_hierarchy cl %}{% endblock %} 82 83 {% block filters %} 84 {% if cl.has_filters %} 85 <div id="changelist-filter"> 86 <h2>{% trans 'Filters' %}</h2> 87 {% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %} 88 </div> 89 {% endif %} 90 {% endblock %} 91 92 <form id="changelist-form" action="" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %}>{% csrf_token %} 93 {% if cl.formset %} 94 {{ cl.formset.management_form }} 95 {% endif %} 96 97 {% block result_list %} 98 {% if action_form and actions_on_top and cl.full_result_count %}{% admin_actions %}{% endif %} 99 {% result_list cl %} 100 {% if action_form and actions_on_bottom and cl.full_result_count %}{% admin_actions %}{% endif %} 101 {% endblock %} 102 103 {% block pagination %} 104 {% pagination cl %} 105 {% endblock %} 106 </form> 107 </div> 108 </div> 109{% endblock %}