Updated change_list template for Django 1.10 compatibility.
parent
b52761274a
commit
ec03f8d17b
|
|
@ -1,24 +1,40 @@
|
|||
{% extends 'admin/change_list.html' %}
|
||||
{% load admin_list i18n adminsortable_tags %}
|
||||
{% load static from staticfiles %}
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load i18n admin_urls static admin_list adminsortable_tags %}
|
||||
|
||||
{% block extrastyle %}
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
|
||||
{{ block.super }}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/changelists.css" %}" />
|
||||
{% if cl.formset %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}" />
|
||||
{% endif %}
|
||||
{% if cl.formset or action_form %}
|
||||
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
|
||||
{% endif %}
|
||||
{{ media.css }}
|
||||
{% if not actions_on_top and not actions_on_bottom %}
|
||||
<style>
|
||||
#changelist table thead th:first-child {width: inherit}
|
||||
</style>
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="{% static 'adminsortable/css/admin.sortable.css' %}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block extrahead %}
|
||||
{{ block.super }}
|
||||
<script src="{% static jquery_lib_path %}"></script>
|
||||
<script src="{% static 'admin/js/jquery.init.js' %}"></script>
|
||||
<script src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
||||
{% include 'adminsortable/csrf/jquery.django-csrf.html' with csrf_cookie_name=csrf_cookie_name %}
|
||||
<script src="{% static 'adminsortable/js/admin.sortable.js' %}"></script>
|
||||
{{ block.super }}
|
||||
{{ media.js }}
|
||||
<script src="{% static jquery_lib_path %}"></script>
|
||||
<script src="{% static 'admin/js/jquery.init.js' %}"></script>
|
||||
<script src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
||||
{% include 'adminsortable/csrf/jquery.django-csrf.html' with csrf_cookie_name=csrf_cookie_name %}
|
||||
<script src="{% static 'adminsortable/js/admin.sortable.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list{% endblock %}
|
||||
|
||||
{% block title %}{% blocktrans with opts.verbose_name_plural|capfirst as model %}Drag and drop {{ model }} to change display order{% endblocktrans %} | {% trans 'Django site admin' %}{% endblock %}
|
||||
|
||||
{% if not is_popup %}
|
||||
{% block breadcrumbs %}
|
||||
<div class="breadcrumbs">
|
||||
<a href="../../../">
|
||||
|
|
@ -32,6 +48,7 @@
|
|||
{% trans 'Reorder' %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
|
||||
{% block content_title %}
|
||||
<h1>
|
||||
|
|
@ -48,6 +65,8 @@
|
|||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block coltype %}flex{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="content-main">
|
||||
{% block object-tools %}
|
||||
|
|
@ -62,10 +81,11 @@
|
|||
{% if objects %}
|
||||
<div id="sortable">
|
||||
{% if group_expression %}
|
||||
{% render_nested_sortable_objects objects group_expression %}
|
||||
{% render_nested_sortable_objects objects group_expression %}
|
||||
{% else %}
|
||||
{% render_sortable_objects objects %}
|
||||
{% render_sortable_objects objects %}
|
||||
{% endif %}
|
||||
{% csrf_token %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue