change_list.html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. {% extends "admin/base_site.html" %}
  2. {% load i18n admin_urls admin_static admin_list jet_tags %}
  3. {% block content_title %}{% endblock %}
  4. {% block extrastyle %}
  5. {{ block.super }}
  6. {% if cl.formset or action_form %}
  7. <script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
  8. {% endif %}
  9. {{ media.css }}
  10. {% endblock %}
  11. {% block extrahead %}
  12. {{ block.super }}
  13. {{ media.js }}
  14. {% if action_form %}{% if actions_on_top or actions_on_bottom %}
  15. <script type="text/javascript">
  16. (function($) {
  17. $(document).ready(function($) {
  18. $("tr input.action-select").actions();
  19. });
  20. })(django.jQuery);
  21. </script>
  22. {% endif %}{% endif %}
  23. {% endblock %}
  24. {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list{% endblock %}
  25. {% if not is_popup %}
  26. {% block breadcrumbs %}
  27. <div class="breadcrumbs">
  28. <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
  29. &rsaquo; <a href="{% url 'admin:app_list' app_label=cl.opts.app_label %}">{% if cl.opts.app_config.verbose_name %}{{ cl.opts.app_config.verbose_name }}{% else %}{% trans app_label as app_label %}{{ app_label|capfirst|escape }}{% endif %}</a>
  30. &rsaquo; {{ cl.opts.verbose_name_plural|capfirst }}
  31. </div>
  32. {% endblock %}
  33. {% endif %}
  34. {% block coltype %}flex{% endblock %}
  35. {% block content %}
  36. <div id="content-main">
  37. {% block object-tools %}
  38. {% if has_add_permission %}
  39. <ul class="object-tools fr">
  40. {% block object-tools-items %}
  41. <li>
  42. {% url cl.opts|admin_urlname:'add' as add_url %}
  43. <a href="{% jet_add_preserved_filters add_url is_popup to_field %}" class="addlink">
  44. {% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
  45. </a>
  46. </li>
  47. {% endblock %}
  48. </ul>
  49. {% endif %}
  50. {% endblock %}
  51. {% if cl.formset.errors %}
  52. <p class="errornote">
  53. {% if cl.formset.total_error_count == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
  54. </p>
  55. {{ cl.formset.non_form_errors }}
  56. {% endif %}
  57. <div class="{% if cl.has_filters %} filtered{% endif %}" id="changelist">
  58. <div class="cf">
  59. <div id="changelist-filter" class="changelist-filter background-form">
  60. {% block search %}{% search_form cl %}{% endblock %}
  61. {% block date_hierarchy %}{% date_hierarchy cl %}{% endblock %}
  62. </div>
  63. </div>
  64. <form id="changelist-form" action="" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>{% csrf_token %}
  65. {% if cl.formset %}
  66. <div>{{ cl.formset.management_form }}</div>
  67. {% endif %}
  68. {% block result_list %}
  69. {% result_list cl %}
  70. {% if cl.full_result_count %}
  71. <div class="changelist-footer background-form{% if is_popup %} popup{% endif %}">
  72. {% if action_form and cl.show_admin_actions != False and actions_on_top or actions_on_bottom %}{% admin_actions %}{% endif %}
  73. <div class="fr">
  74. {% block pagination %}{% pagination cl %}{% endblock %}
  75. </div>
  76. </div>
  77. {% endif %}
  78. {% endblock %}
  79. </form>
  80. </div>
  81. </div>
  82. {% endblock %}