Updated change_list template for Django 1.10 compatibility.
parent
b52761274a
commit
ec03f8d17b
|
|
@ -1,24 +1,40 @@
|
||||||
{% extends 'admin/change_list.html' %}
|
{% extends "admin/base_site.html" %}
|
||||||
{% load admin_list i18n adminsortable_tags %}
|
{% load i18n admin_urls static admin_list adminsortable_tags %}
|
||||||
{% load static from staticfiles %}
|
|
||||||
|
|
||||||
{% block extrastyle %}
|
{% block extrastyle %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
|
<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' %}" />
|
<link rel="stylesheet" href="{% static 'adminsortable/css/admin.sortable.css' %}" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extrahead %}
|
{% block extrahead %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
<script src="{% static jquery_lib_path %}"></script>
|
{{ media.js }}
|
||||||
<script src="{% static 'admin/js/jquery.init.js' %}"></script>
|
<script src="{% static jquery_lib_path %}"></script>
|
||||||
<script src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
<script src="{% static 'admin/js/jquery.init.js' %}"></script>
|
||||||
{% include 'adminsortable/csrf/jquery.django-csrf.html' with csrf_cookie_name=csrf_cookie_name %}
|
<script src="{% static 'adminsortable/js/jquery-ui-django-admin.min.js' %}"></script>
|
||||||
<script src="{% static 'adminsortable/js/admin.sortable.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 %}
|
{% 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 %}
|
{% 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 %}
|
{% block breadcrumbs %}
|
||||||
<div class="breadcrumbs">
|
<div class="breadcrumbs">
|
||||||
<a href="../../../">
|
<a href="../../../">
|
||||||
|
|
@ -32,6 +48,7 @@
|
||||||
{% trans 'Reorder' %}
|
{% trans 'Reorder' %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% block content_title %}
|
{% block content_title %}
|
||||||
<h1>
|
<h1>
|
||||||
|
|
@ -48,6 +65,8 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block coltype %}flex{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div id="content-main">
|
<div id="content-main">
|
||||||
{% block object-tools %}
|
{% block object-tools %}
|
||||||
|
|
@ -62,10 +81,11 @@
|
||||||
{% if objects %}
|
{% if objects %}
|
||||||
<div id="sortable">
|
<div id="sortable">
|
||||||
{% if group_expression %}
|
{% if group_expression %}
|
||||||
{% render_nested_sortable_objects objects group_expression %}
|
{% render_nested_sortable_objects objects group_expression %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% render_sortable_objects objects %}
|
{% render_sortable_objects objects %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% csrf_token %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue