/core/templates/admin/change_list.html

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