django-unfold 0.39.0__py3-none-any.whl → 0.41.0__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- django_unfold-0.41.0.dist-info/METADATA +74 -0
- {django_unfold-0.39.0.dist-info → django_unfold-0.41.0.dist-info}/RECORD +53 -50
- {django_unfold-0.39.0.dist-info → django_unfold-0.41.0.dist-info}/WHEEL +1 -1
- unfold/admin.py +7 -0
- unfold/contrib/filters/forms.py +2 -2
- unfold/contrib/forms/templates/unfold/forms/array.html +2 -2
- unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage.html +1 -1
- unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_group.html +1 -1
- unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_user.html +1 -1
- unfold/contrib/guardian/templates/unfold/guardian/group_form.html +2 -2
- unfold/contrib/guardian/templates/unfold/guardian/user_form.html +3 -3
- unfold/contrib/import_export/templates/admin/import_export/export.html +1 -1
- unfold/contrib/import_export/templates/admin/import_export/import.html +1 -1
- unfold/contrib/simple_history/templates/simple_history/object_history_form.html +1 -1
- unfold/forms.py +7 -8
- unfold/sites.py +12 -0
- unfold/static/admin/js/inlines.js +439 -0
- unfold/static/unfold/css/styles.css +1 -1
- unfold/static/unfold/fonts/material-symbols/Material-Symbols-Outlined.woff2 +0 -0
- unfold/static/unfold/fonts/material-symbols/styles.css +1 -2
- unfold/static/unfold/js/alpine.sort.js +1 -0
- unfold/static/unfold/js/app.js +36 -10
- unfold/static/unfold/js/select2.init.js +1 -1
- unfold/styles.css +5 -1
- unfold/templates/admin/app_index.html +1 -1
- unfold/templates/admin/app_list.html +1 -1
- unfold/templates/admin/auth/user/change_password.html +1 -1
- unfold/templates/admin/base.html +1 -1
- unfold/templates/admin/change_form.html +1 -1
- unfold/templates/admin/change_list.html +48 -38
- unfold/templates/admin/delete_confirmation.html +4 -9
- unfold/templates/admin/delete_selected_confirmation.html +4 -8
- unfold/templates/admin/edit_inline/stacked.html +68 -66
- unfold/templates/admin/edit_inline/tabular.html +143 -134
- unfold/templates/admin/login.html +2 -0
- unfold/templates/admin/object_history.html +1 -1
- unfold/templates/admin/submit_line.html +8 -8
- unfold/templates/registration/password_change_done.html +1 -1
- unfold/templates/registration/password_change_form.html +1 -1
- unfold/templates/unfold/change_list_filter.html +7 -9
- unfold/templates/unfold/components/button.html +4 -3
- unfold/templates/unfold/components/card.html +1 -1
- unfold/templates/unfold/components/progress.html +15 -15
- unfold/templates/unfold/components/separator.html +1 -1
- unfold/templates/unfold/helpers/app_list.html +2 -2
- unfold/templates/unfold/helpers/delete_submit_line.html +11 -0
- unfold/templates/unfold/helpers/display_header.html +8 -3
- unfold/templates/unfold/helpers/field_readonly_value.html +1 -1
- unfold/templates/unfold/helpers/fieldset_row.html +2 -0
- unfold/templates/unfold/helpers/welcomemsg.html +1 -1
- unfold/templates/unfold/layouts/skeleton.html +1 -0
- unfold/templates/unfold/widgets/url.html +7 -5
- django_unfold-0.39.0.dist-info/METADATA +0 -70
- {django_unfold-0.39.0.dist-info → django_unfold-0.41.0.dist-info}/LICENSE.md +0 -0
@@ -15,154 +15,163 @@
|
|
15
15
|
|
16
16
|
{{ inline_admin_formset.formset.non_form_errors }}
|
17
17
|
|
18
|
-
<div>
|
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
|
-
|
18
|
+
<div class="border border-gray-200 mb-6 overflow-x-auto rounded-md shadow-sm dark:border-gray-800" data-simplebar data-simplebar-auto-hide="false">
|
19
|
+
<table class="border-spacing-none border-separate w-full"
|
20
|
+
{% if inline_admin_formset.opts.ordering_field %}
|
21
|
+
data-ordering-field="{{ inline_admin_formset.opts.ordering_field }}"
|
22
|
+
x-on:end="sortRecords"
|
23
|
+
x-sort.ghost
|
24
|
+
{% endif %}>
|
25
|
+
<thead class="hidden lg:table-header-group">
|
26
|
+
<tr>
|
27
|
+
{% for field in inline_admin_formset.fields %}
|
28
|
+
{% if not field.widget.is_hidden %}
|
29
|
+
<th class="column-{{ field.name }}{% if field.required %} required{% endif %} align-middle border-b border-gray-200 font-semibold px-3 py-2 text-left text-font-important-light text-sm whitespace-nowrap dark:text-font-important-dark dark:border-gray-800 {% if inline_admin_formset.opts.ordering_field and field.name == inline_admin_formset.opts.ordering_field and inline_admin_formset.opts.hide_ordering_field %}hidden{% endif %}">
|
30
|
+
<span class="flex flex-row items-center">
|
31
|
+
{{ field.label|capfirst }}
|
32
|
+
|
33
|
+
{% if field.help_text %}
|
34
|
+
<span class="cursor-pointer material-symbols-outlined ml-2 text-gray-400 dark:text-gray-500" title="{{ field.help_text|striptags }}">help</span>
|
35
|
+
{% endif %}
|
36
|
+
</span>
|
37
|
+
</th>
|
38
|
+
{% endif %}
|
39
|
+
{% endfor %}
|
40
|
+
|
41
|
+
{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}
|
42
|
+
<th class="align-middle border-b border-gray-200 font-semibold px-3 py-2 text-left text-font-important-light text-sm whitespace-nowrap lg:w-px dark:border-gray-800 dark:text-font-important-dark">
|
43
|
+
{% translate "Delete?" %}
|
44
|
+
</th>
|
45
|
+
{% endif %}
|
46
|
+
</tr>
|
47
|
+
</thead>
|
48
|
+
|
49
|
+
{% for inline_admin_form in inline_admin_formset %}
|
50
|
+
<tbody x-sort:item>
|
51
|
+
{% if inline_admin_form.form.non_field_errors %}
|
52
|
+
<tr class="row-form-errors group inline-tabular">
|
53
|
+
<td colspan="{{ inline_admin_form|cell_count }}">
|
54
|
+
{% include "unfold/helpers/messages/error.html" with errors=inline_admin_form.form.non_field_errors %}
|
55
|
+
</td>
|
47
56
|
</tr>
|
48
|
-
|
49
|
-
|
50
|
-
<tbody>
|
51
|
-
{% for inline_admin_form in inline_admin_formset %}
|
52
|
-
{% if inline_admin_form.form.non_field_errors %}
|
53
|
-
<tr class="row-form-errors group inline-tabular">
|
54
|
-
<td colspan="{{ inline_admin_form|cell_count }}">
|
55
|
-
{% include "unfold/helpers/messages/error.html" with errors=inline_admin_form.form.non_field_errors %}
|
56
|
-
</td>
|
57
|
-
</tr>
|
58
|
-
{% endif %}
|
57
|
+
{% endif %}
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
{% endif %}
|
84
|
-
</a>
|
59
|
+
{% if inline_admin_form.original or inline_admin_form.show_url %}
|
60
|
+
<tr>
|
61
|
+
<td class="original" colspan="{{ inline_admin_form|cell_count }}">
|
62
|
+
{% if not inline_admin_formset.opts.hide_title %}
|
63
|
+
{% if inline_admin_form.original or inline_admin_form.show_url %}
|
64
|
+
<p class="flex font-medium items-center px-3 pt-2 text-xs">
|
65
|
+
{% if inline_admin_form.original %}
|
66
|
+
<span>
|
67
|
+
{% with inline_title=inline_admin_form.original.get_inline_title %}
|
68
|
+
{% if inline_title %}
|
69
|
+
{{ inline_title }}
|
70
|
+
{% else %}
|
71
|
+
{{ inline_admin_form.original }}
|
72
|
+
{% endif %}
|
73
|
+
{% endwith %}
|
74
|
+
</span>
|
75
|
+
|
76
|
+
{% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %}
|
77
|
+
<a href="{% url inline_admin_form.model_admin.opts|admin_urlname:'change' inline_admin_form.original.pk|admin_urlquote %}" class="{{ inline_admin_formset.has_change_permission|yesno:'inlinechangelink,inlineviewlink' }} ml-2 text-primary-600 dark:text-primary-500">
|
78
|
+
{% if inline_admin_formset.has_change_permission %}
|
79
|
+
{% translate "Change" %}
|
80
|
+
{% else %}
|
81
|
+
{% translate "View" %}
|
85
82
|
{% endif %}
|
86
|
-
|
87
|
-
|
88
|
-
{% if inline_admin_form.show_url %}
|
89
|
-
<a href="{{ inline_admin_form.absolute_url }}" class="font-medium ml-2 text-primary-600 dark:text-primary-500">
|
90
|
-
{% translate "View on site" %}
|
91
|
-
</a>
|
92
|
-
{% endif %}
|
93
|
-
</p>
|
83
|
+
</a>
|
84
|
+
{% endif %}
|
94
85
|
{% endif %}
|
95
|
-
{% endif %}
|
96
86
|
|
97
|
-
|
98
|
-
|
99
|
-
|
87
|
+
{% if inline_admin_form.show_url %}
|
88
|
+
<a href="{{ inline_admin_form.absolute_url }}" class="font-medium ml-2 text-primary-600 dark:text-primary-500">
|
89
|
+
{% translate "View on site" %}
|
90
|
+
</a>
|
91
|
+
{% endif %}
|
92
|
+
</p>
|
93
|
+
{% endif %}
|
94
|
+
{% endif %}
|
100
95
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
</td>
|
105
|
-
</tr>
|
106
|
-
{% endif %}
|
96
|
+
{% if inline_admin_form.needs_explicit_pk_field %}
|
97
|
+
{{ inline_admin_form.pk_field.field }}
|
98
|
+
{% endif %}
|
107
99
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
100
|
+
{% if inline_admin_form.fk_field %}
|
101
|
+
{{ inline_admin_form.fk_field.field }}
|
102
|
+
{% endif %}
|
103
|
+
</td>
|
104
|
+
</tr>
|
105
|
+
{% endif %}
|
106
|
+
|
107
|
+
<tr class="lg:border-b-0 form-row {% if inline_admin_form.original or inline_admin_form.show_url %}has_original{% endif %}{% if forloop.last and inline_admin_formset.has_add_permission %} empty-form{% endif %}" id="{{ inline_admin_formset.formset.prefix }}-{% if not forloop.last %}{{ forloop.counter0 }}{% else %}empty{% endif %}">
|
108
|
+
{% spaceless %}
|
109
|
+
{% for fieldset in inline_admin_form %}
|
110
|
+
{% for line in fieldset %}
|
111
|
+
{% for field in line %}
|
112
|
+
{% if not field.is_readonly and field.field.is_hidden %}
|
113
|
+
{{ field.field }}
|
114
|
+
{% endif %}
|
118
115
|
{% endfor %}
|
119
|
-
{%
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
{% if
|
134
|
-
<
|
135
|
-
|
136
|
-
|
137
|
-
{% endfor %}
|
138
|
-
</div>
|
116
|
+
{% endfor %}
|
117
|
+
{% endfor %}
|
118
|
+
{% endspaceless %}
|
119
|
+
|
120
|
+
{% with is_last_row=forloop.last %}
|
121
|
+
{% for fieldset in inline_admin_form %}
|
122
|
+
{% for line in fieldset %}
|
123
|
+
{% with is_last_col=forloop.last %}
|
124
|
+
{% for field in line %}
|
125
|
+
{% if field.is_readonly or not field.field.is_hidden %}
|
126
|
+
<td{% if field.field.name %} class="field-{{ field.field.name }} group field-tabular {% if field.field.errors|length > 0 %} errors{% endif %}{% if inline_admin_form.original %} p-3 lg:py-3{% else %} py-3{% endif %}{% if field.is_checkbox %} align-middle{% else %} align-top{% endif %} {% if is_last_row and not inline_admin_formset.has_add_permission %}{% if is_last_col %}border-0 {% else %}border-b lg:border-0{% endif %}{% else %}border-b{% endif %} border-gray-200 flex items-center before:capitalize before:content-[attr(data-label)] before:mr-auto before:text-gray-500 before:pr-4 lg:before:hidden font-normal px-3 text-left text-sm lg:table-cell dark:border-gray-800 {% if field.field.is_hidden %} !hidden{% endif %} {% if inline_admin_formset.opts.ordering_field and field.field.name == inline_admin_formset.opts.ordering_field and inline_admin_formset.opts.hide_ordering_field %}!hidden{% endif %}"{% endif %} data-label="{{ field.field.label }}">
|
127
|
+
<div class="flex flex-row gap-3 items-center">
|
128
|
+
{% if forloop.parentloop.counter == 1 and forloop.counter == 1 %}
|
129
|
+
{% if inline_admin_formset.opts.ordering_field %}
|
130
|
+
{% if inline_admin_form.original %}
|
131
|
+
<span class="material-symbols-outlined cursor-pointer" x-sort:handle>drag_indicator</span>
|
132
|
+
{% else %}
|
133
|
+
<span class="-mr-3" x-sort:handle></span>
|
139
134
|
{% endif %}
|
140
135
|
{% endif %}
|
141
|
-
|
142
|
-
{% endif %}
|
143
|
-
{% endfor %}
|
144
|
-
{% endwith %}
|
145
|
-
{% endfor %}
|
146
|
-
{% endfor %}
|
136
|
+
{% endif %}
|
147
137
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
138
|
+
{% if field.is_readonly %}
|
139
|
+
{% include "unfold/helpers/field_readonly_value.html" with tabular=1 %}
|
140
|
+
{% else %}
|
141
|
+
{{ field.field }}
|
142
|
+
|
143
|
+
{% if field.field.errors|length > 0 %}
|
144
|
+
<div class="mt-1 text-red-600 text-sm dark:text-red-500">
|
145
|
+
{% for error in field.field.errors %}
|
146
|
+
{{ error }}
|
147
|
+
{% endfor %}
|
148
|
+
</div>
|
149
|
+
{% endif %}
|
150
|
+
{% endif %}
|
154
151
|
</div>
|
155
|
-
</
|
152
|
+
</td>
|
156
153
|
{% endif %}
|
157
|
-
|
154
|
+
{% endfor %}
|
155
|
+
{% endwith %}
|
156
|
+
{% endfor %}
|
157
|
+
{% endfor %}
|
158
|
+
|
159
|
+
{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}
|
160
|
+
<td class="delete {% if inline_admin_form.original %}p-3 lg:py-3{% else %}py-3{% endif %} text-left text-red-600 border-b border-gray-200 flex items-center before:capitalize before:content-[attr(data-label)] before:mr-auto before:text-gray-500 before:pr-4 lg:before:hidden font-normal px-3 text-sm lg:align-top lg:table-cell lg:w-px dark:border-gray-800" data-label="{% trans "Remove" %}">
|
161
|
+
{% if inline_admin_form.original %}
|
162
|
+
<div class="flex flex-row lg:mt-3">
|
163
|
+
<div class="ml-auto">
|
164
|
+
{{ inline_admin_form.deletion_field.field|add_css_class:form_classes.checkbox }}
|
165
|
+
</div>
|
166
|
+
</div>
|
158
167
|
{% endif %}
|
159
|
-
|
160
|
-
|
161
|
-
{%
|
162
|
-
</
|
163
|
-
</
|
164
|
-
|
165
|
-
|
168
|
+
</td>
|
169
|
+
{% endif %}
|
170
|
+
{% endwith %}
|
171
|
+
</tr>
|
172
|
+
</tbody>
|
173
|
+
{% endfor %}
|
174
|
+
</table>
|
166
175
|
</div>
|
167
176
|
</fieldset>
|
168
177
|
</div>
|
@@ -32,6 +32,8 @@
|
|
32
32
|
<span class="block text-primary-600 text-xl dark:text-primary-500">{{ site_title }}</span>
|
33
33
|
</h1>
|
34
34
|
|
35
|
+
{% include "unfold/helpers/messages.html" %}
|
36
|
+
|
35
37
|
{% include "unfold/helpers/messages/errornote.html" with errors=form.errors %}
|
36
38
|
|
37
39
|
{% include "unfold/helpers/messages/error.html" with errors=form.non_field_errors %}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
{% block breadcrumbs %}
|
5
5
|
<div class="px-4 lg:px-12">
|
6
6
|
<div class="container mb-12 mx-auto -my-3">
|
7
|
-
<ul class="flex">
|
7
|
+
<ul class="flex flex-wrap">
|
8
8
|
{% url 'admin:index' as link %}
|
9
9
|
{% trans 'Home' as name %}
|
10
10
|
{% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{% load i18n admin_urls %}
|
2
2
|
|
3
|
-
<div {% if not is_popup %}id="submit-row"{% endif %} class="relative z-20 {% if not is_popup %} mt-
|
4
|
-
<div class="{% if not is_popup %}bottom-0 fixed left-0 right-0{% endif %}" {% if not is_popup %}x-bind:class="{'xl:left-0': !sidebarDesktopOpen, 'xl:left-72': sidebarDesktopOpen}"{% endif %}>
|
5
|
-
<div class="bg-white dark:bg-gray-900 {% if not is_popup %}border-t
|
3
|
+
<div {% if not is_popup %}id="submit-row"{% endif %} class="relative z-20 {% if not is_popup %} mt-8{% endif %}">
|
4
|
+
<div class="{% if not is_popup %}lg:bottom-0 lg:fixed lg:left-0 lg:right-0{% endif %}" {% if not is_popup %}x-bind:class="{'xl:left-0': !sidebarDesktopOpen, 'xl:left-72': sidebarDesktopOpen}"{% endif %}>
|
5
|
+
<div class="bg-white dark:bg-gray-900 {% if not is_popup %}lg:border-t lg:py-4 relative scrollable-top lg:px-12 dark:border-gray-800{% endif %}">
|
6
6
|
<div class="container flex flex-col-reverse gap-3 items-center mx-auto lg:flex-row-reverse">
|
7
7
|
{% block submit-row %}
|
8
8
|
{% if show_save %}
|
@@ -18,7 +18,7 @@
|
|
18
18
|
{% endfor %}
|
19
19
|
|
20
20
|
{% if show_save_and_continue %}
|
21
|
-
<button type="submit" name="_continue" class="border font-medium
|
21
|
+
<button type="submit" name="_continue" class="border font-medium px-3 py-2 rounded-md transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
22
22
|
{% if can_change %}
|
23
23
|
{% translate 'Save and continue editing' %}
|
24
24
|
{% else %}
|
@@ -30,19 +30,19 @@
|
|
30
30
|
{% if show_close %}
|
31
31
|
{% url opts|admin_urlname:'changelist' as changelist_url %}
|
32
32
|
|
33
|
-
<a href="{% add_preserved_filters changelist_url %}" class="border font-medium
|
33
|
+
<a href="{% add_preserved_filters changelist_url %}" class="border font-medium px-3 py-2 rounded-md transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
34
34
|
{% translate 'Close' %}
|
35
35
|
</a>
|
36
36
|
{% endif %}
|
37
37
|
|
38
38
|
{% if show_save_and_add_another %}
|
39
|
-
<button type="submit" name="_addanother" class="border font-medium
|
39
|
+
<button type="submit" name="_addanother" class="border font-medium px-3 py-2 rounded-md transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
40
40
|
{% translate 'Save and add another' %}
|
41
41
|
</button>
|
42
42
|
{% endif %}
|
43
43
|
|
44
44
|
{% if show_save_as_new %}
|
45
|
-
<button type="submit" name="_saveasnew" class="border font-medium
|
45
|
+
<button type="submit" name="_saveasnew" class="border font-medium px-3 py-2 rounded-md transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
46
46
|
{% translate 'Save as new' %}
|
47
47
|
</button>
|
48
48
|
{% endif %}
|
@@ -51,7 +51,7 @@
|
|
51
51
|
{% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %}
|
52
52
|
|
53
53
|
<p class="deletelink-box mr-auto w-full lg:w-auto">
|
54
|
-
<a href="{% add_preserved_filters delete_url %}" class="
|
54
|
+
<a href="{% add_preserved_filters delete_url %}" class="bg-red-600 flex items-center justify-center font-medium h-9.5 ml-auto px-3 py-2 rounded-md text-white dark:bg-red-500/20 dark:text-red-500">
|
55
55
|
{% translate "Delete" %} {{ opts.verbose_name }}
|
56
56
|
</a>
|
57
57
|
</p>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
{% block breadcrumbs %}
|
8
8
|
<div class="px-12">
|
9
9
|
<div class="container mb-12 mx-auto -my-3">
|
10
|
-
<ul class="flex">
|
10
|
+
<ul class="flex flex-wrap">
|
11
11
|
{% url 'admin:index' as link %}
|
12
12
|
{% trans 'Home' as name %}
|
13
13
|
{% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
|
@@ -7,7 +7,7 @@
|
|
7
7
|
{% block breadcrumbs %}
|
8
8
|
<div class="px-12">
|
9
9
|
<div class="container mb-12 mx-auto -my-3">
|
10
|
-
<ul class="flex">
|
10
|
+
<ul class="flex flex-wrap">
|
11
11
|
{% url 'admin:index' as link %}
|
12
12
|
{% trans 'Home' as name %}
|
13
13
|
{% include 'unfold/helpers/breadcrumb_item.html' with link=link name=name %}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
{% load i18n admin_list %}
|
2
2
|
|
3
|
-
<div id="changelist-filter" class="backdrop-blur-sm bg-opacity-80 bg-gray-900 flex
|
4
|
-
<label for="show-filters" id="changelist-filter-close" class="flex-grow"></label>
|
3
|
+
<div id="changelist-filter" class="backdrop-blur-sm bg-opacity-80 bg-gray-900 flex inset-0 z-50 fixed {% if not cl.model_admin.list_filter_sheet %}2xl:bg-transparent 2xl:relative 2xl:!block 2xl:z-10{% endif %}" x-show="filterOpen">
|
4
|
+
<label for="show-filters" id="changelist-filter-close" class="flex-grow {% if not cl.model_admin.list_filter_sheet %}2xl:hidden{% endif %}" x-on:click="filterOpen = false"></label>
|
5
5
|
|
6
|
-
<div class="bg-white flex
|
6
|
+
<div class="bg-white flex m-4 overflow-hidden rounded shadow-sm w-80 dark:bg-gray-800 {% if not cl.model_admin.list_filter_sheet %} 2xl:border 2xl:sticky 2xl:top-4 2xl:dark:border-gray-800 2xl:bg-transparent 2xl:dark:!bg-transparent 2xl:m-0{% endif %}">
|
7
7
|
<div class="flex-grow h-full overflow-auto relative">
|
8
|
-
<h3 class="border-b flex font-semibold mb-
|
8
|
+
<h3 class="border-b flex font-semibold mb-4 px-4 py-4 text-font-important-light text-sm dark:text-font-important-dark dark:border-gray-800">
|
9
9
|
{% trans "Filter" %}
|
10
10
|
|
11
11
|
{% if cl.is_facets_optional %}
|
@@ -30,15 +30,14 @@
|
|
30
30
|
</a>
|
31
31
|
{% endif %}
|
32
32
|
|
33
|
-
<a class="cursor-pointer material-symbols-outlined md-18 ml-auto pl-4 text-gray-400 transition-colors hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400" x-on:click="filterOpen = false">
|
33
|
+
<a class="cursor-pointer material-symbols-outlined md-18 ml-auto pl-4 text-gray-400 transition-colors hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400 {% if not cl.model_admin.list_filter_sheet %}2xl:hidden{% endif %}" x-on:click="filterOpen = false">
|
34
34
|
close
|
35
35
|
</a>
|
36
36
|
</h3>
|
37
37
|
|
38
|
-
<div class="px-
|
38
|
+
<div class="px-4{% if cl.model_admin.list_filter_submit %} {% endif %}">
|
39
39
|
{% if cl.model_admin.list_filter_submit %}
|
40
40
|
<form id="filter-form" method="get">
|
41
|
-
|
42
41
|
{% if request.GET.q %}
|
43
42
|
<input type="hidden" name="q" value="{{ request.GET.q }}">
|
44
43
|
{% endif %}
|
@@ -48,13 +47,12 @@
|
|
48
47
|
{% endif %}
|
49
48
|
{% endif %}
|
50
49
|
|
51
|
-
|
52
50
|
{% for spec in cl.filter_specs %}
|
53
51
|
{% admin_list_filter cl spec %}
|
54
52
|
{% endfor %}
|
55
53
|
|
56
54
|
{% if cl.model_admin.list_filter_submit %}
|
57
|
-
<div class="
|
55
|
+
<div class="bottom-4 absolute left-4 right-4 {% if not cl.model_admin.list_filter_sheet %}2xl:left-0 2xl:right-0 2xl:relative 2xl:mt-8{% endif %}">
|
58
56
|
<button type="submit" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded-md self-end text-sm text-white w-full">
|
59
57
|
{% trans "Apply Filters" %}
|
60
58
|
</button>
|
@@ -1,3 +1,4 @@
|
|
1
|
-
<button {% if submit %}type="submit"{% endif%} {% if name %}name="{{ name }}"{% endif %}
|
2
|
-
|
3
|
-
|
1
|
+
<{% if href %}a href="{{ href }}"{% else %}button{% endif%} {% if submit %}type="submit"{% endif%} {% if name %}name="{{ name }}"{% endif %}
|
2
|
+
class="border font-medium px-3 py-2 rounded-md text-center whitespace-nowrap {% if variant == "default" %}bg-white dark:border-gray-700 dark:bg-transparent dark:text-white{% else %}bg-primary-600 border-transparent text-white{% endif %}{% if class %} {{ class }}{% endif %}">
|
3
|
+
{{ children }}
|
4
|
+
</{% if href %}a{% else %}button{% endif%}>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="border flex flex-col flex-grow overflow-hidden p-6 relative rounded-md shadow-sm dark:border-gray-800{% if class %} {{ class }}{% endif %}">
|
1
|
+
<div class="border flex flex-col flex-grow overflow-hidden p-6 relative rounded-md shadow-sm dark:border-gray-800 {% if class %} {{ class }}{% endif %}">
|
2
2
|
{% if title %}
|
3
3
|
<h2 class="border-b font-semibold mb-6 -mt-2 -mx-6 pb-4 px-6 text-font-important-light dark:text-font-important-dark dark:border-gray-800">
|
4
4
|
{{ title }}
|
@@ -1,21 +1,21 @@
|
|
1
1
|
<div class="{% if class %}{{ class }}{% endif %}">
|
2
|
-
<div class="
|
3
|
-
{% if
|
4
|
-
<
|
5
|
-
{{ title }}
|
6
|
-
</h3>
|
2
|
+
<div class="overflow-hidden relative px-2 py-1 text-sm">
|
3
|
+
{% if value %}
|
4
|
+
<div class="absolute bottom-0 left-0 rounded top-0 bg-primary-100 z-10 dark:bg-primary-500/20" style="width: {{ value }}%"></div>
|
7
5
|
{% endif %}
|
8
6
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
7
|
+
<div class="flex flex-row relative z-20">
|
8
|
+
{% if title %}
|
9
|
+
<h3 class="text-font-default-light dark:text-font-default-dark text-sm">
|
10
|
+
{{ title }}
|
11
|
+
</h3>
|
12
|
+
{% endif %}
|
15
13
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
{% if description %}
|
15
|
+
<strong class="font-semibold text-font-important-light ml-auto dark:text-font-important-dark">
|
16
|
+
{{ description }}
|
17
|
+
</strong>
|
18
|
+
{% endif %}
|
19
|
+
</div>
|
20
20
|
</div>
|
21
21
|
</div>
|
@@ -1 +1 @@
|
|
1
|
-
<div class="bg-gray-200 dark:bg-gray-800 dark:border-gray-800 {% if vertical == 1 %}mx-
|
1
|
+
<div class="bg-gray-200 dark:bg-gray-800 dark:border-gray-800 {% if vertical == 1 %}mx-6 w-px{% else%}h-px my-6{% endif %}{% if class %} {{ class }}{% endif %}"></div>
|
@@ -27,7 +27,7 @@
|
|
27
27
|
{% for item in group.items %}
|
28
28
|
{% if item.has_permission %}
|
29
29
|
<li>
|
30
|
-
<a href="{% if item.link_callback %}{{ item.link_callback }}{% else %}{{ item.link }}{% endif %}" class="flex h-11 items-center -mx-3 px-3 py-2 rounded-md {% if item.active %}bg-gray-100 font-semibold text-primary-600 dark:bg-white/[.06] dark:text-primary-500{% endif %}">
|
30
|
+
<a href="{% if item.link_callback %}{{ item.link_callback }}{% else %}{{ item.link }}{% endif %}" class="flex h-11 items-center -mx-3 px-3 py-2 rounded-md hover:text-primary-600 dark:hover:text-primary-500 {% if item.active %}bg-gray-100 font-semibold text-primary-600 dark:bg-white/[.06] dark:text-primary-500{% endif %}">
|
31
31
|
{% if item.icon %}
|
32
32
|
<span class="material-symbols-outlined md-18 mr-3 w-4.5">
|
33
33
|
{{ item.icon }}
|
@@ -39,7 +39,7 @@
|
|
39
39
|
</span>
|
40
40
|
|
41
41
|
{% if item.badge %}
|
42
|
-
<span class="bg-red-600 font-semibold ml-2 px-1 rounded-sm text-xs text-white">
|
42
|
+
<span class="bg-red-600 font-semibold ml-2 px-1 relative rounded-sm text-xs text-white">
|
43
43
|
{% if item.badge_callback %}
|
44
44
|
{{ item.badge_callback }}
|
45
45
|
{% else %}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{% load i18n %}
|
2
|
+
|
3
|
+
<div class="flex flex-col gap-3 items-center w-full lg:flex-row">
|
4
|
+
<a href="#" class="border cancel-link flex items-center justify-center font-medium px-3 py-2 rounded-md w-full hover:bg-gray-50 lg:block lg:mb-0 lg:w-auto dark:border-gray-700 dark:text-font-default-dark dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
5
|
+
{% translate "No, take me back" %}
|
6
|
+
</a>
|
7
|
+
|
8
|
+
<button type="submit" class="bg-red-600 cursor-pointer flex items-center justify-center font-medium h-9.5 ml-0 px-3 py-2 rounded-md text-white w-full lg:ml-auto lg:w-auto dark:bg-red-500/20 dark:text-red-500">
|
9
|
+
{% translate "Yes, I’m sure" %}
|
10
|
+
</button>
|
11
|
+
</div>
|
@@ -2,9 +2,14 @@
|
|
2
2
|
|
3
3
|
<span class="flex gap-4 items-center">
|
4
4
|
{% if value.3 and value.3.path %}
|
5
|
-
|
6
|
-
<
|
7
|
-
|
5
|
+
{% if value.3.as_background %}
|
6
|
+
<span class="block bg-center bg-contain bg-no-repeat {% if not value.3.width %}w-16{% endif %} {% if not value.3.height %}h-12{% endif %}" style="background-image: url({{ value.3.path }}); {% if value.3.height %}height: {{ value.3.height }}px;{% endif %} {% if value.3.width %}width: {{ value.3.width }}px;{% endif %}">
|
7
|
+
</span>
|
8
|
+
{% else %}
|
9
|
+
<span class="bg-center bg-cover bg-white flex font-medium justify-center overflow-hidden dark:bg-gray-900 dark:border-gray-700 {% if value.3.squared %}rounded-sm{% else %}rounded-full{% endif %}{% if not value.3.borderless %} border{% endif %}{% if not value.3.width or not value.3.height %} h-8 max-w-8 min-w-8{% endif %}">
|
10
|
+
<img loading="lazy" src="{{ value.3.path }}" class="max-w-none object-cover" {% if value.3.width %}width="{{ value.3.width }}"{% endif %} {% if value.3.height %}height="{{ value.3.height }}"{% endif %} alt="{% trans "Record picture" %}" />
|
11
|
+
</span>
|
12
|
+
{% endif %}
|
8
13
|
{% elif value.2 %}
|
9
14
|
<span class="bg-white border flex font-medium h-8 justify-center items-center rounded-full text-xs uppercase w-8 dark:bg-gray-900 dark:border-gray-700">
|
10
15
|
{{ value.2 }}
|
@@ -1 +1 @@
|
|
1
|
-
<div class="readonly max-w-4xl py-2 text-sm *:rounded-md {% if not adminform.model_admin.compressed_fields and not field.is_image %}bg-gray-50 border font-medium px-3 rounded-md shadow-sm dark:border-gray-700 dark:bg-gray-800{% endif %} {% if field.is_image %}inline-block [&_img]:rounded-md !py-0{% endif %}">{% if value %}{{ value }}{% elif field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>
|
1
|
+
<div class="readonly {% if field.is_json %}max-w-4xl{% else %}max-w-2xl{% endif %} py-2 text-sm *:rounded-md {% if not adminform.model_admin.compressed_fields and not field.is_image %}bg-gray-50 border font-medium px-3 rounded-md shadow-sm dark:border-gray-700 dark:bg-gray-800{% endif %} {% if field.is_image %}inline-block [&_img]:rounded-md !py-0{% endif %}">{% if value %}{{ value }}{% elif field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>
|
@@ -1,4 +1,6 @@
|
|
1
|
+
|
1
2
|
<div class="form-row
|
3
|
+
{% for field in line %}{% if inline_admin_formset.opts.ordering_field and field.field.name == inline_admin_formset.opts.ordering_field and inline_admin_formset.opts.hide_ordering_field %} hidden{% endif %}{% endfor %}
|
2
4
|
{% if adminform.model_admin.compressed_fields %} border-b border-gray-200 -mx-3 px-3 pt-3 first:pt-0 dark:border-gray-800 last:border-b-0{% endif %}
|
3
5
|
{% if not line.fields|length == 1 %} flex flex-row flex-wrap gap-x-8{% endif %}
|
4
6
|
{% if not line.has_visible_field %} hidden{% endif %}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
</span>
|
11
11
|
|
12
12
|
{% if cl and cl.full_result_count != cl.result_count %}
|
13
|
-
<span class="ml-2 text-sm">
|
13
|
+
<span class="font-medium ml-2 text-font-subtle-light text-sm dark:text-font-subtle-dark">
|
14
14
|
{% blocktranslate count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktranslate %} (<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% if cl.show_full_result_count %}{% blocktranslate with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktranslate %}{% else %}{% translate "Show all" %}{% endif %}</a>)
|
15
15
|
</span>
|
16
16
|
{% endif %}
|