/
change_list.html
143 lines (125 loc) · 4.48 KB
/
change_list.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{% extends "admin/base_site.html" %}
{% load adminmedia admin_list i18n pops bootstrap %}
{% load pops_forms %}
{% load url from future %}
{% block extrastyle %}
{{ block.super }}
{# <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/changelists.css" />#}
{% if cl.formset %}
{# <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}css/forms.css" />#}
{% endif %}
{% if cl.formset or action_form %}
{% url 'admin:jsi18n' as jsi18nurl %}
<script type="text/javascript" src="{{ jsi18nurl|default:'../../jsi18n/' }}"></script>
{% endif %}
{{ media.css }}
{% endblock %}
{% block extrahead %}
{{ block.super }}
{{ media.js }}
<script>
$(function() {
$("#changelist-filter .accordion-toggle").each(function(i, toggleLink) {
var $toggleLink = $(toggleLink);
$toggleLink.parent().each(function(i, parent) {
var $parent = $(parent);
if (!$parent.next().find("li").first().hasClass("active")) {
$toggleLink.click();
}
})
});
});
</script>
{% comment %}TODO: Clean this up{% endcomment %}
{% if action_form %}{% if actions_on_top or actions_on_bottom %}
<script type="text/javascript">
(function($) {
$(document).ready(function($) {
$("tr input.action-select").actions({
actionContainer: 'div.actions',
counterContainer: '.selection_info, .selection-info span.action-counter',
allContainer: '.selection-info, .selection-info span.all',
acrossQuestions: 'span.question',
acrossClears: 'span.clear',
acrossInput: "div.changelist-actions input.select-across"
});
});
})(django.jQuery);
</script>
{% endif %}{% endif %}
{% endblock %}
{% block bodyclass %}change-list{% endblock %}
{% block breadcrumbs %}
{% if not is_popup %}
../../|{% trans "Home" %}
../|{{ app_label|capfirst }}
{{ cl.opts.verbose_name_plural|capfirst }}
{% endif %}
{% endblock %}
{% block coltype %}flex{% endblock %}
{% block object-tools %}
{% if action_form or has_add_permission %}
<div class="subnav">
{% if has_add_permission %}
<div class="pull-right object-tools object-tools-right">
{% block object-tools-items %}
<a href="add/{% if is_popup %}?_popup=1{% endif %}" class="btn btn-primary">
<i class="icon-plus icon-white"></i>
{% blocktrans with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktrans %}
</a>
{% endblock %}
</div>
{% endif %}
{% if action_form and cl.full_result_count %}{% admin_actions %}{% endif %}
{% if cl %}
{% search_form cl %}
{% endif %}
</div>
{% endif %}
{% endblock %}
{% block search %}{% if cl %}{% search_form cl %}{% endif %}{% endblock %}
{% block messages %}
{{ block.super }}
{% if cl.formset.errors %}
<div class="alert alert-error{% if cl.formset.non_form_errors %} alert-block{% endif %}" data-alert="alert"><a class="close" href="#">x</a>
{% blocktrans count cl.formset.errors|length as counter %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktrans %}
{{ cl.formset.non_form_errors }}
</div>
{% endif %}
{% endblock %}
{% block content %}
<div id="content-main" class="row-fluid">
<div class="span1{% if cl.has_filters %}0{% else %}2{% endif %}" id="changelist">
{% block date_hierarchy %}{% date_hierarchy cl %}{% endblock %}
<form id="changelist-form" action="" method="post"{% if cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %}>{% csrf_token %}
{% if cl.formset %}
<div>{{ cl.formset.management_form }}</div>
{% endif %}
{% block result_list %}
{% result_list cl %}
{% endblock %}
{% block pagination %}{% bootstrap_pagination cl %}{% endblock %}
{% comment %}
Make sure that all of the actions form fields are here to be submitted
{% endcomment %}
{% if action_form %}
{% for field in action_form %}
{{ field|as_hidden_field }}
{% endfor %}
{% endif %}
</form>
</div>
{% block filters %}
{% if cl.has_filters %}
<div id="changelist-filter" class="span2">
<h4>{% trans 'Available Filters' %}</h4>
<ul class="nav nav-tabs nav-stacked">
{% for spec in cl.filter_specs %}
<li>{% admin_list_filter cl spec %}</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% endblock %}
</div>
{% endblock %}