django-unfold 0.30.0__py3-none-any.whl → 0.32.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.30.0.dist-info → django_unfold-0.32.0.dist-info}/METADATA +101 -31
- {django_unfold-0.30.0.dist-info → django_unfold-0.32.0.dist-info}/RECORD +76 -73
- unfold/admin.py +30 -11
- unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html +3 -3
- unfold/contrib/forms/templates/unfold/forms/array.html +3 -1
- unfold/contrib/forms/templates/unfold/forms/helpers/toolbar.html +6 -6
- unfold/contrib/forms/templates/unfold/forms/wysiwyg.html +1 -1
- unfold/contrib/forms/widgets.py +22 -11
- unfold/contrib/guardian/templates/unfold/guardian/group_form.html +4 -4
- unfold/contrib/guardian/templates/unfold/guardian/user_form.html +4 -4
- unfold/contrib/import_export/templates/admin/import_export/change_form.html +1 -1
- unfold/contrib/import_export/templates/admin/import_export/import_errors.html +1 -1
- unfold/contrib/import_export/templates/admin/import_export/import_preview.html +3 -3
- unfold/contrib/import_export/templates/admin/import_export/import_validation.html +4 -4
- unfold/contrib/inlines/forms.py +1 -2
- unfold/contrib/simple_history/templates/simple_history/object_history_list.html +9 -9
- unfold/contrib/simple_history/templates/simple_history/submit_line.html +1 -1
- unfold/dataclasses.py +10 -1
- unfold/fields.py +1 -1
- unfold/settings.py +1 -0
- unfold/sites.py +39 -15
- unfold/static/unfold/css/styles.css +1 -1
- unfold/static/unfold/js/alpine.anchor.js +1 -0
- unfold/static/unfold/js/alpine.js +2 -2
- unfold/static/unfold/js/alpine.persist.js +1 -1
- unfold/static/unfold/js/app.js +26 -3
- unfold/styles.css +10 -10
- unfold/templates/admin/actions.html +1 -1
- unfold/templates/admin/app_list.html +1 -1
- unfold/templates/admin/base.html +4 -4
- unfold/templates/admin/change_list.html +2 -2
- unfold/templates/admin/change_list_results.html +2 -2
- unfold/templates/admin/delete_confirmation.html +4 -4
- unfold/templates/admin/delete_selected_confirmation.html +4 -4
- unfold/templates/admin/edit_inline/stacked.html +2 -2
- unfold/templates/admin/edit_inline/tabular.html +3 -3
- unfold/templates/admin/filter.html +2 -2
- unfold/templates/admin/includes/fieldset.html +1 -1
- unfold/templates/admin/includes/object_delete_summary.html +1 -1
- unfold/templates/admin/login.html +8 -8
- unfold/templates/admin/object_history.html +4 -4
- unfold/templates/admin/search_form.html +1 -1
- unfold/templates/admin/submit_line.html +7 -5
- unfold/templates/auth/widgets/read_only_password_hash.html +1 -1
- unfold/templates/registration/logged_out.html +1 -1
- unfold/templates/unfold/change_list_filter.html +9 -1
- unfold/templates/unfold/components/card.html +7 -3
- unfold/templates/unfold/components/icon.html +1 -0
- unfold/templates/unfold/components/separator.html +1 -1
- unfold/templates/unfold/components/table.html +31 -0
- unfold/templates/unfold/helpers/account_links.html +2 -2
- unfold/templates/unfold/helpers/actions_row.html +4 -4
- unfold/templates/unfold/helpers/app_list.html +48 -38
- unfold/templates/unfold/helpers/app_list_default.html +4 -4
- unfold/templates/unfold/helpers/breadcrumb_item.html +1 -1
- unfold/templates/unfold/helpers/field_readonly_value.html +1 -1
- unfold/templates/unfold/helpers/fieldset_row.html +6 -6
- unfold/templates/unfold/helpers/fieldsets_tabs.html +2 -2
- unfold/templates/unfold/helpers/header.html +1 -1
- unfold/templates/unfold/helpers/help_text.html +1 -1
- unfold/templates/unfold/helpers/history.html +1 -1
- unfold/templates/unfold/helpers/label.html +2 -3
- unfold/templates/unfold/helpers/search.html +7 -4
- unfold/templates/unfold/helpers/search_results.html +2 -2
- unfold/templates/unfold/helpers/tab_action.html +1 -1
- unfold/templates/unfold/helpers/tab_list.html +27 -5
- unfold/templates/unfold/helpers/theme_switch.html +2 -2
- unfold/templates/unfold/layouts/skeleton.html +6 -1
- unfold/templates/unfold/widgets/clearable_file_input.html +14 -6
- unfold/templates/unfold/widgets/clearable_file_input_small.html +4 -4
- unfold/templates/unfold/widgets/split_datetime.html +2 -2
- unfold/templatetags/unfold.py +33 -12
- unfold/templatetags/unfold_list.py +16 -6
- unfold/widgets.py +2 -2
- {django_unfold-0.30.0.dist-info → django_unfold-0.32.0.dist-info}/LICENSE.md +0 -0
- {django_unfold-0.30.0.dist-info → django_unfold-0.32.0.dist-info}/WHEEL +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
{% load unfold %}
|
2
2
|
|
3
|
-
<fieldset class="module{% if fieldset.classes %} {{ fieldset.classes }}{% endif %}">
|
3
|
+
<fieldset class="module{% if fieldset.classes %} {{ fieldset.classes }}{% endif %}" {% if stacked != 1 %}x-show="activeTab == 'general'"{% endif %}>
|
4
4
|
{% if fieldset.name and "tab" not in fieldset.classes %}
|
5
5
|
<h2 class="bg-gray-100 border border-transparent font-semibold mb-6 px-4 py-3 rounded-md text-gray-700 text-sm lg:-mx-4 dark:bg-white/[.02] dark:border dark:border-gray-800 dark:text-gray-200">
|
6
6
|
{{ fieldset.name }}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
{% translate "Summary" %}
|
6
6
|
</h2>
|
7
7
|
|
8
|
-
<ul class="leading-relaxed text-gray-500 text-sm dark:text-gray-
|
8
|
+
<ul class="leading-relaxed text-gray-500 text-sm dark:text-gray-300">
|
9
9
|
{% for model_name, object_count in model_count %}
|
10
10
|
<li>
|
11
11
|
{{ model_name|capfirst }}: {{ object_count }}
|
@@ -56,14 +56,6 @@
|
|
56
56
|
|
57
57
|
{% url 'admin_password_reset' as password_reset_url %}
|
58
58
|
|
59
|
-
{% if password_reset_url %}
|
60
|
-
<div class="password-reset-link">
|
61
|
-
<a href="{{ password_reset_url }}">
|
62
|
-
{% translate 'Forgotten your password or username?' %}
|
63
|
-
</a>
|
64
|
-
</div>
|
65
|
-
{% endif %}
|
66
|
-
|
67
59
|
<div class="submit-row">
|
68
60
|
<button type="submit" class="bg-primary-600 border border-transparent flex flex-row font-semibold group items-center justify-center py-2 rounded-md text-sm text-white w-full">
|
69
61
|
{% translate 'Log in' %}
|
@@ -71,6 +63,14 @@
|
|
71
63
|
<i class="material-symbols-outlined ml-2 relative right-0 text-lg transition-all group-hover:-right-1">arrow_forward</i>
|
72
64
|
</button>
|
73
65
|
</div>
|
66
|
+
|
67
|
+
{% if password_reset_url %}
|
68
|
+
<div class="password-reset-link">
|
69
|
+
<a href="{{ password_reset_url }}" class="border font-medium hidden mt-4 px-3 py-2 rounded-md text-center text-sm text-gray-500 transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:text-gray-300 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
70
|
+
{% translate 'Forgotten your password or username?' %}
|
71
|
+
</a>
|
72
|
+
</div>
|
73
|
+
{% endif %}
|
74
74
|
</form>
|
75
75
|
|
76
76
|
{% block login_after %}{% endblock %}
|
@@ -27,7 +27,7 @@
|
|
27
27
|
|
28
28
|
{% block content %}
|
29
29
|
{% if action_list %}
|
30
|
-
<table class="border-gray-200 border-spacing-none border-separate mb-6 text-gray-700 w-full dark:text-gray-
|
30
|
+
<table class="border-gray-200 border-spacing-none border-separate mb-6 text-gray-700 w-full dark:text-gray-300 lg:border lg:rounded-md lg:shadow-sm lg:dark:border-gray-800">
|
31
31
|
<thead class="hidden lg:table-header-group">
|
32
32
|
<tr>
|
33
33
|
<th class="align-middle font-medium px-3 py-2 text-left text-gray-400 text-sm">
|
@@ -47,15 +47,15 @@
|
|
47
47
|
<tbody>
|
48
48
|
{% for action in action_list %}
|
49
49
|
<tr class="block border mb-3 rounded-md shadow-sm lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-gray-800">
|
50
|
-
<th class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-
|
50
|
+
<th class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-300 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% translate 'Date/time' %}">
|
51
51
|
{{ action.action_time|date:"DATETIME_FORMAT" }}
|
52
52
|
</th>
|
53
53
|
|
54
|
-
<td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-
|
54
|
+
<td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-300 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% translate 'User' %}">
|
55
55
|
{{ action.user.get_username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %}
|
56
56
|
</td>
|
57
57
|
|
58
|
-
<td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-
|
58
|
+
<td class="align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-300 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800" data-label="{% translate 'Action' %}">
|
59
59
|
{{ action.get_change_message }}
|
60
60
|
</td>
|
61
61
|
</tr>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
{% if cl.search_fields %}
|
4
4
|
<div id="toolbar">
|
5
5
|
<div class="bg-white border flex rounded-md overflow-hidden shadow-sm lg:w-64 focus-within:ring focus-within:ring-primary-300 focus-within:border-primary-600 dark:bg-gray-900 dark:border-gray-700 dark:focus-within:border-primary-600 dark:focus-within:ring-primary-700 dark:focus-within:ring-opacity-50">
|
6
|
-
<input class="font-medium grow min-w-0 h-9 px-3 text-gray-500 text-sm focus:outline-none dark:bg-gray-900 dark:text-gray-
|
6
|
+
<input class="font-medium grow min-w-0 h-9 px-3 text-gray-500 text-sm focus:outline-none dark:bg-gray-900 dark:text-gray-300" type="text" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar" placeholder="{% if cl.search_help_text %}{{ cl.search_help_text }}{% else %}{% trans "Type to search" %}{% endif %}" />
|
7
7
|
|
8
8
|
<button type="submit" class="flex items-center px-2 focus:outline-none" id="searchbar-submit">
|
9
9
|
<span class="material-symbols-outlined md-18 text-gray-400 dark:text-gray-500">search</span>
|
@@ -12,13 +12,13 @@
|
|
12
12
|
{% endif %}
|
13
13
|
|
14
14
|
{% for action in actions_submit_line %}
|
15
|
-
<button type="submit" {% if not action.attrs.name %}name="{{ action.action_name }}"{% endif %} class="border font-medium px-3 py-2 rounded-md text-sm text-gray-500 transition-all w-full hover:bg-gray-50 lg:w-auto dark:border-gray-700 dark:text-gray-
|
15
|
+
<button type="submit" {% if not action.attrs.name %}name="{{ action.action_name }}"{% endif %} class="border font-medium px-3 py-2 rounded-md text-sm text-gray-500 transition-all w-full hover:bg-gray-50 lg:w-auto dark:border-gray-700 dark:text-gray-300 dark:hover:text-gray-200 dark:hover:bg-gray-900" {% include "unfold/helpers/attrs.html" with attrs=action.attrs %}>
|
16
16
|
{{ action.description }}
|
17
17
|
</button>
|
18
18
|
{% endfor %}
|
19
19
|
|
20
20
|
{% if show_save_and_continue %}
|
21
|
-
<button type="submit" name="_continue" class="border font-medium hidden px-3 py-2 rounded-md text-sm text-gray-500 transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:text-gray-
|
21
|
+
<button type="submit" name="_continue" class="border font-medium hidden px-3 py-2 rounded-md text-sm text-gray-500 transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:text-gray-300 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 %}
|
@@ -28,19 +28,21 @@
|
|
28
28
|
{% endif %}
|
29
29
|
|
30
30
|
{% if show_close %}
|
31
|
-
|
31
|
+
{% url opts|admin_urlname:'changelist' as changelist_url %}
|
32
|
+
|
33
|
+
<a href="{% add_preserved_filters changelist_url %}" class="border font-medium hidden px-3 py-2 rounded-md text-sm text-gray-500 transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:text-gray-300 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
32
34
|
{% translate 'Close' %}
|
33
35
|
</a>
|
34
36
|
{% endif %}
|
35
37
|
|
36
38
|
{% if show_save_and_add_another %}
|
37
|
-
<button type="submit" name="_addanother" class="border font-medium hidden px-3 py-2 rounded-md text-sm text-gray-500 transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:text-gray-
|
39
|
+
<button type="submit" name="_addanother" class="border font-medium hidden px-3 py-2 rounded-md text-sm text-gray-500 transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:text-gray-300 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
38
40
|
{% translate 'Save and add another' %}
|
39
41
|
</button>
|
40
42
|
{% endif %}
|
41
43
|
|
42
44
|
{% if show_save_as_new %}
|
43
|
-
<button type="submit" name="_saveasnew" class="border font-medium px-3 py-2 rounded-md text-sm text-gray-500 transition-all w-full hover:bg-gray-50 dark:border-gray-700 dark:text-gray-
|
45
|
+
<button type="submit" name="_saveasnew" class="border font-medium px-3 py-2 rounded-md text-sm text-gray-500 transition-all w-full hover:bg-gray-50 dark:border-gray-700 dark:text-gray-300 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
44
46
|
{% translate 'Save as new' %}
|
45
47
|
</button>
|
46
48
|
{% endif %}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="table table-fixed w-full">
|
2
|
-
<div class="readonly bg-gray-50 border font-medium max-w-2xl px-3 py-2 rounded-md shadow-sm text-gray-500 text-sm dark:bg-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-
|
2
|
+
<div class="readonly bg-gray-50 border font-medium max-w-2xl px-3 py-2 rounded-md shadow-sm text-gray-500 text-sm dark:bg-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300{% if summary|length > 1 %} text-ellipsis overflow-hidden whitespace-nowrap w-full{% endif %}" {% include 'django/forms/widgets/attrs.html' %}>
|
3
3
|
{% if summary|length > 1 %}
|
4
4
|
{% for entry in summary %}
|
5
5
|
<strong class="font-semibold text-gray-900 dark:text-gray-200">{{ entry.label }}</strong>{% if entry.value %}: {{ entry.value }}{% endif %}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
</a>
|
15
15
|
{% endif %}
|
16
16
|
|
17
|
-
<a class="cursor-pointer material-symbols-outlined md-18 ml-auto pl-4 text-gray-400 transition-colors hover:text-gray-700 dark:text-gray-
|
17
|
+
<a class="cursor-pointer material-symbols-outlined md-18 ml-auto pl-4 text-gray-400 transition-colors hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-200" x-on:click="filterOpen = false">
|
18
18
|
close
|
19
19
|
</a>
|
20
20
|
</h3>
|
@@ -22,6 +22,14 @@
|
|
22
22
|
<div class="px-6{% if cl.model_admin.list_filter_submit %} pb-16{% endif %}">
|
23
23
|
{% if cl.model_admin.list_filter_submit %}
|
24
24
|
<form id="filter-form" method="get">
|
25
|
+
|
26
|
+
{% if request.GET.q %}
|
27
|
+
<input type="hidden" name="q" value="{{ request.GET.q }}">
|
28
|
+
{% endif %}
|
29
|
+
|
30
|
+
{% if request.GET.o %}
|
31
|
+
<input type="hidden" name="o" value="{{ request.GET.o }}">
|
32
|
+
{% endif %}
|
25
33
|
{% endif %}
|
26
34
|
|
27
35
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<div class="border flex flex-col flex-grow p-6 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
|
-
<h2 class="border-b font-
|
3
|
+
<h2 class="border-b font-semibold mb-6 -mt-2 -mx-6 pb-4 px-6 text-sm text-gray-700 dark:text-gray-200 dark:border-gray-800">
|
4
4
|
{{ title }}
|
5
5
|
</h2>
|
6
6
|
{% endif %}
|
7
7
|
|
8
|
-
<div class="flex-grow relative">
|
8
|
+
<div class="flex-grow relative {% if icon %} pl-6{% endif %}">
|
9
9
|
{{ children }}
|
10
10
|
|
11
11
|
{% if label %}
|
@@ -13,6 +13,10 @@
|
|
13
13
|
{% include "unfold/helpers/label.html" with text=label type="primary" %}
|
14
14
|
</div>
|
15
15
|
{% endif %}
|
16
|
+
|
17
|
+
{% if icon %}
|
18
|
+
<span class="material-symbols-outlined absolute -left-6 text-gray-300 top-1/2 -translate-x-1/3 -translate-y-1/2 !text-6xl dark:text-gray-500">{{ icon }}</span>
|
19
|
+
{% endif %}
|
16
20
|
</div>
|
17
21
|
|
18
22
|
{% if footer %}
|
@@ -0,0 +1 @@
|
|
1
|
+
<span class="material-symbols-outlined{% if class %} {{ class }}{% endif %}">{{ children }}</span>
|
@@ -1 +1 @@
|
|
1
|
-
<
|
1
|
+
<div class="bg-gray-200 dark:bg-gray-800 dark:border-gray-800 {% if vertical == 1 %}mx-8 w-px{% else%}h-px my-8{% endif %}{% if class %} {{ class }}{% endif %}"></div>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{% load unfold %}
|
2
|
+
|
3
|
+
<div class="{% if card_included == 1 %}-m-6{% else %}lg:border lg:rounded-md lg:shadow-sm{% endif %} overflow-x-auto lg:dark:border-gray-800">
|
4
|
+
<table class="block border-gray-200 border-spacing-none border-separate text-gray-700 w-full dark:text-gray-300 lg:table">
|
5
|
+
{% if table.headers %}
|
6
|
+
<thead>
|
7
|
+
<tr class="bg-gray-50 dark:bg-white/[.02]">
|
8
|
+
{% for header in table.headers %}
|
9
|
+
<th class="align-middle font-medium py-2 text-left text-gray-400 text-sm whitespace-nowrap sortable column-description hidden px-3 lg:table-cell {% if card_included == 1 %}first:pl-6 last:pr-6{% endif %}">
|
10
|
+
{{ header }}
|
11
|
+
</th>
|
12
|
+
{% endfor %}
|
13
|
+
</tr>
|
14
|
+
</thead>
|
15
|
+
{% endif %}
|
16
|
+
|
17
|
+
{% if table.rows %}
|
18
|
+
<tbody class="block lg:table-row-group">
|
19
|
+
{% for row in table.rows %}
|
20
|
+
<tr class="{% if striped == 1 %}{% cycle '' 'bg-gray-50 dark:bg-white/[.02]' %}{% endif %} block {% if not card_included == 1 %}border mb-3 rounded-md shadow-sm{% else %}border-t{% endif %} lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-gray-800">
|
21
|
+
{% for cell in row %}
|
22
|
+
<td class="px-3 py-2 align-middle flex border-t border-gray-200 font-normal gap-4 min-w-0 overflow-hidden text-left text-gray-500 text-sm before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto before:text-gray-500 first:border-t-0 dark:before:text-gray-300 dark:text-gray-300 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-gray-800 {% if card_included == 1 %}lg:first:pl-6 lg:last:pr-6{% endif %}" {% if table.headers %}data-label="{{ table.headers|index:forloop.counter0 }}"{% endif %}>
|
23
|
+
{{ cell }}
|
24
|
+
</td>
|
25
|
+
{% endfor %}
|
26
|
+
</tr>
|
27
|
+
{% endfor %}
|
28
|
+
</tbody>
|
29
|
+
{% endif %}
|
30
|
+
</table>
|
31
|
+
</div>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
{% load i18n %}
|
2
2
|
|
3
3
|
<div class="relative" x-data="{ openUserLinks: false }">
|
4
|
-
<a class="block cursor-pointer hover:text-gray-700 dark:text-gray-
|
4
|
+
<a class="block cursor-pointer hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-200" @click="openUserLinks = !openUserLinks">
|
5
5
|
<span class="material-symbols-outlined">person</span>
|
6
6
|
</a>
|
7
7
|
|
8
|
-
<nav class="absolute bg-white border flex flex-col leading-none overflow-hidden py-1 -right-2 rounded shadow-lg text-sm text-gray-500 top-7 w-52 z-50 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-
|
8
|
+
<nav class="absolute bg-white border flex flex-col leading-none overflow-hidden py-1 -right-2 rounded shadow-lg text-sm text-gray-500 top-7 w-52 z-50 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-300" x-cloak x-show="openUserLinks" @click.outside="openUserLinks = false">
|
9
9
|
<div class="border-b border-gray-100 flex flex-row flex-shrink-0 items-start justify-start mb-1 pb-1 dark:border-gray-700">
|
10
10
|
<span class="block mx-1 px-3 py-2 truncate">
|
11
11
|
{% firstof user.get_short_name user.get_username %}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
{% load i18n %}
|
2
2
|
|
3
3
|
{% if actions %}
|
4
|
-
<td data-label="{% trans "More actions" %}" class="field-actions_holder align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:block before:capitalize before:content-[attr(data-label)] before:mr-auto before:text-gray-500 dark:before:text-gray-
|
5
|
-
<div class="group leading-none relative" x-data="{ openActionsId
|
6
|
-
<span class="cursor-pointer flex h-7 material-symbols-outlined md-18 -my-1 !leading-7 rounded text-center text-gray-400 w-7 group-hover:bg-gray-100 group-hover:text-gray-700 dark:text-gray-
|
4
|
+
<td data-label="{% trans "More actions" %}" class="field-actions_holder align-middle flex border-t border-gray-200 font-normal px-3 py-2 text-left text-sm before:block before:capitalize before:content-[attr(data-label)] before:mr-auto before:text-gray-500 dark:before:text-gray-300 lg:before:hidden lg:py-3 lg:table-cell dark:border-gray-800 lg:w-px">
|
5
|
+
<div class="group leading-none relative" x-data="{ openActionsId: false }">
|
6
|
+
<span x-ref="rowDropdown{{ instance_pk }}" class="cursor-pointer flex h-7 material-symbols-outlined md-18 -my-1 !leading-7 rounded text-center text-gray-400 w-7 group-hover:bg-gray-100 group-hover:text-gray-700 dark:text-gray-300 group-hover:dark:bg-gray-800 group-hover:dark:text-white" @click="openActionsId{{ instance.pk }} = !openActionsId{{ instance.pk }}">
|
7
7
|
more_horiz
|
8
8
|
</span>
|
9
9
|
|
10
|
-
<nav class="
|
10
|
+
<nav x-anchor.offset.4="$refs.rowDropdown{{ instance_pk }}" class="bg-white border flex flex-col leading-none py-1 rounded-md shadow-lg text-gray-500 text-sm top-7 z-50 w-48 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-300" x-cloak x-show="openActionsId" @click.outside="openActionsId{{ instance.pk }} = false">
|
11
11
|
{% for action in actions %}
|
12
12
|
<a href="{% url action.raw_path instance_pk %}" class="mx-1 px-3 py-2 rounded-md truncate whitespace-nowrap hover:bg-gray-100 dark:hover:bg-gray-700 dark:hover:text-gray-200"{% for attr_name, attr_value in action.attrs.items %} {{ attr_name }}="{{ attr_value }}"{% endfor %}>
|
13
13
|
{{ action.title }}
|
@@ -1,55 +1,65 @@
|
|
1
|
-
{% load i18n %}
|
1
|
+
{% load i18n unfold %}
|
2
2
|
|
3
3
|
{% if sidebar_navigation %}
|
4
4
|
<div class="h-0 flex-grow overflow-auto" data-simplebar>
|
5
5
|
{% for group in sidebar_navigation %}
|
6
6
|
{% if group.items %}
|
7
|
-
{%
|
8
|
-
<hr class="border-t border-gray-200 mx-6 my-2 dark:border-gray-800" />
|
9
|
-
{% endif %}
|
7
|
+
{% has_nav_item_active group.items as has_active %}
|
10
8
|
|
11
|
-
{% if group.
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
{% endif %}
|
9
|
+
<div class="mb-3" {% if group.collapsible %}x-data="{navigationOpen: {% if has_active %}true{% else %}false{% endif %}}"{% endif %}>
|
10
|
+
{% if group.separator %}
|
11
|
+
<hr class="border-t border-gray-200 mx-6 my-2 dark:border-gray-800" />
|
12
|
+
{% endif %}
|
16
13
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
14
|
+
{% if group.title %}
|
15
|
+
<h3 class="font-medium flex flex-row items-center mb-1 mx-3 py-1.5 px-3 select-none text-gray-900 text-sm dark:text-gray-200 {% if group.collapsible %}cursor-pointer{% endif %}" {% if group.collapsible %}x-on:click="navigationOpen = !navigationOpen"{% endif %}>
|
16
|
+
{{ group.title }}
|
17
|
+
|
18
|
+
{% if group.collapsible %}
|
19
|
+
<span class="material-symbols-outlined ml-auto text-gray-400 transition-all" x-bind:class="{'rotate-90': navigationOpen}">
|
20
|
+
chevron_right
|
21
|
+
</span>
|
22
|
+
{% endif %}
|
23
|
+
</h3>
|
24
|
+
{% endif %}
|
27
25
|
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
<ol class="px-6" {% if group.collapsible %}x-show="navigationOpen"{% endif %}>
|
27
|
+
{% for item in group.items %}
|
28
|
+
{% if item.has_permission %}
|
29
|
+
<li>
|
30
|
+
<a href="{% if item.link_callback %}{{ item.link_callback }}{% else %}{{ item.link }}{% endif %}" class="border border-transparent 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:border dark:border-gray-800 dark:bg-white/[.02] dark:text-primary-500{% else %}text-gray-500 hover:text-gray-700 dark:text-gray-300 hover:dark:text-gray-200{% endif %}">
|
31
|
+
{% if item.icon %}
|
32
|
+
<span class="material-symbols-outlined md-18 mr-3 w-4.5">
|
33
|
+
{{ item.icon }}
|
34
|
+
</span>
|
35
|
+
{% endif %}
|
31
36
|
|
32
|
-
|
33
|
-
|
34
|
-
{% if item.badge_callback %}
|
35
|
-
{{ item.badge_callback }}
|
36
|
-
{% else %}
|
37
|
-
{{ item.badge }}
|
38
|
-
{% endif %}
|
37
|
+
<span class="text-sm">
|
38
|
+
{{ item.title|safe }}
|
39
39
|
</span>
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
40
|
+
|
41
|
+
{% if item.badge %}
|
42
|
+
<span class="bg-red-600 font-semibold ml-2 px-1 rounded-sm text-xs text-white">
|
43
|
+
{% if item.badge_callback %}
|
44
|
+
{{ item.badge_callback }}
|
45
|
+
{% else %}
|
46
|
+
{{ item.badge }}
|
47
|
+
{% endif %}
|
48
|
+
</span>
|
49
|
+
{% endif %}
|
50
|
+
</a>
|
51
|
+
</li>
|
52
|
+
{% endif %}
|
53
|
+
{% endfor %}
|
54
|
+
</ol>
|
55
|
+
{% endif %}
|
56
|
+
</div>
|
47
57
|
{% endfor %}
|
48
58
|
</div>
|
49
59
|
|
50
60
|
{% if sidebar_show_all_applications %}
|
51
61
|
<div class="mt-auto" x-data="{ openAllApplications: false }">
|
52
|
-
<a class="cursor-pointer flex items-center px-6 py-3 text-gray-500 text-sm transition-all hover:text-gray-700 dark:text-gray-
|
62
|
+
<a class="cursor-pointer flex items-center px-6 py-3 text-gray-500 text-sm transition-all hover:text-gray-700 dark:text-gray-300 hover:dark:text-gray-200" x-on:click="openAllApplications = !openAllApplications">
|
53
63
|
<span class="material-symbols-outlined md-18 mr-3">
|
54
64
|
apps
|
55
65
|
</span>
|
@@ -72,7 +82,7 @@
|
|
72
82
|
<ul>
|
73
83
|
{% for model in app.models %}
|
74
84
|
<li class="block mb-4 last:mb-0">
|
75
|
-
<a href="{{ model.admin_url }}" class="block overflow-hidden text-ellipsis text-gray-500 transition-all whitespace-nowrap hover:text-gray-700 dark:text-gray-
|
85
|
+
<a href="{{ model.admin_url }}" class="block overflow-hidden text-ellipsis text-gray-500 transition-all whitespace-nowrap hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-200">
|
76
86
|
{{ model.name }}
|
77
87
|
</a>
|
78
88
|
</li>
|
@@ -20,7 +20,7 @@
|
|
20
20
|
</a>
|
21
21
|
</th>
|
22
22
|
{% else %}
|
23
|
-
<th scope="row" class="font-normal p-3 text-left dark:text-gray-
|
23
|
+
<th scope="row" class="font-normal p-3 text-left dark:text-gray-300 {% if not forloop.last %}border-b border-gray-100 dark:border-gray-800{% endif %}">
|
24
24
|
{{ model.name }}
|
25
25
|
</th>
|
26
26
|
{% endif %}
|
@@ -28,18 +28,18 @@
|
|
28
28
|
<td class="{% if not forloop.last %}border-b border-gray-100 dark:border-gray-800{% endif %} p-3 text-right">
|
29
29
|
<div class="flex flex-row items-center ml-auto gap-4 justify-end">
|
30
30
|
{% if model.add_url %}
|
31
|
-
<a href="{{ model.add_url }}" class="addlink block leading-none text-gray-400 transition-colors hover:text-gray-700 dark:text-gray-
|
31
|
+
<a href="{{ model.add_url }}" class="addlink block leading-none text-gray-400 transition-colors hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-200" title="{% translate 'Add' %}">
|
32
32
|
<span class="material-symbols-outlined">add</span>
|
33
33
|
</a>
|
34
34
|
{% endif %}
|
35
35
|
|
36
36
|
{% if model.admin_url and show_changelinks %}
|
37
37
|
{% if model.view_only %}
|
38
|
-
<a href="{{ model.admin_url }}" class="viewlink block leading-none text-gray-400 transition-colors hover:text-gray-700 dark:text-gray-
|
38
|
+
<a href="{{ model.admin_url }}" class="viewlink block leading-none text-gray-400 transition-colors hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-200" title="{% translate 'View' %} ">
|
39
39
|
<span class="material-symbols-outlined">visibility</span>
|
40
40
|
</a>
|
41
41
|
{% else %}
|
42
|
-
<a href="{{ model.admin_url }}" class="changelink block leading-none text-gray-400 transition-colors hover:text-gray-700 dark:text-gray-
|
42
|
+
<a href="{{ model.admin_url }}" class="changelink block leading-none text-gray-400 transition-colors hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-200" title="{% translate 'Change' %}">
|
43
43
|
<span class="material-symbols-outlined">edit_square</span>
|
44
44
|
</a>
|
45
45
|
{% endif %}
|
@@ -1 +1 @@
|
|
1
|
-
<div class="readonly font-medium max-w-4xl py-2 text-gray-500 text-sm dark:text-gray-
|
1
|
+
<div class="readonly font-medium max-w-4xl py-2 text-gray-500 text-sm dark:text-gray-300 *:rounded-md {% if not adminform.model_admin.compressed_fields and not field.is_image %}bg-gray-50 border 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>
|
@@ -24,9 +24,9 @@
|
|
24
24
|
</div>
|
25
25
|
|
26
26
|
{% if field.errors %}
|
27
|
-
<
|
27
|
+
<div class="mt-1 text-red-600 text-sm dark:text-red-500">
|
28
28
|
{{ field.errors }}
|
29
|
-
</
|
29
|
+
</div>
|
30
30
|
{% endif %}
|
31
31
|
</div>
|
32
32
|
</div>
|
@@ -44,9 +44,9 @@
|
|
44
44
|
{% endif %}
|
45
45
|
|
46
46
|
{% if field.errors %}
|
47
|
-
<
|
47
|
+
<div class="mt-1 text-red-600 text-sm dark:text-red-500">
|
48
48
|
{{ field.errors }}
|
49
|
-
</
|
49
|
+
</div>
|
50
50
|
{% endif %}
|
51
51
|
</div>
|
52
52
|
</div>
|
@@ -68,9 +68,9 @@
|
|
68
68
|
{% endif %}
|
69
69
|
|
70
70
|
{% if field.errors %}
|
71
|
-
<
|
71
|
+
<div class="mt-1 text-red-600 text-sm dark:text-red-500">
|
72
72
|
{{ field.errors }}
|
73
|
-
</
|
73
|
+
</div>
|
74
74
|
{% endif %}
|
75
75
|
</div>
|
76
76
|
{% endif %}
|
@@ -2,8 +2,8 @@
|
|
2
2
|
|
3
3
|
{% with tabs=adminform|tabs %}
|
4
4
|
{% if tabs %}
|
5
|
-
<div x-data="{openTab: null}">
|
6
|
-
<ul class="bg-gray-100 border border-transparent flex gap-10 mb-6 px-4 py-3 rounded-md text-gray-400 text-sm lg:-mx-4 dark:bg-white/[.02] dark:border dark:border-gray-800 dark:text-gray-
|
5
|
+
<div x-data="{openTab: null}" x-show="activeTab == 'general'">
|
6
|
+
<ul class="bg-gray-100 border border-transparent flex gap-10 mb-6 px-4 py-3 rounded-md text-gray-400 text-sm lg:-mx-4 dark:bg-white/[.02] dark:border dark:border-gray-800 dark:text-gray-300">
|
7
7
|
{% for fieldset in tabs %}
|
8
8
|
<li>
|
9
9
|
<a class="cursor-pointer font-semibold hover:text-gray-700 dark:hover:text-white"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{% if not is_popup %}
|
2
2
|
{% block header %}
|
3
3
|
<div class="border-b border-gray-200 mb-6 px-4 lg:px-12 dark:border-gray-800">
|
4
|
-
<div class="container flex items-center h-16 mx-auto py-4">
|
4
|
+
<div class="{% if not cl.model_admin.list_fullwidth %}container{% endif %} flex items-center h-16 mx-auto py-4">
|
5
5
|
<div id="header-inner" class="flex items-center w-full">
|
6
6
|
<div class="flex items-center w-full">
|
7
7
|
{% block usertools %}
|
@@ -20,7 +20,7 @@
|
|
20
20
|
{% endif %}
|
21
21
|
</div>
|
22
22
|
|
23
|
-
<div class="border-gray-100 border-t flex pt-3 text-gray-500 text-sm dark:border-gray-800 dark:text-gray-
|
23
|
+
<div class="border-gray-100 border-t flex pt-3 text-gray-500 text-sm dark:border-gray-800 dark:text-gray-300">
|
24
24
|
<div>
|
25
25
|
{% if entry.content_type %}
|
26
26
|
{% filter capfirst %}{{ entry.content_type.name }}{% endfilter %}
|
@@ -10,8 +10,7 @@
|
|
10
10
|
{% elif type == 'primary' %}
|
11
11
|
bg-primary-100 text-primary-500 dark:bg-primary-500/20
|
12
12
|
{% else %}
|
13
|
-
bg-gray-100 text-gray-500 dark:bg-gray-500/20 dark:text-gray-
|
14
|
-
{% endif %}
|
15
|
-
">
|
13
|
+
bg-gray-100 text-gray-500 dark:bg-gray-500/20 dark:text-gray-300
|
14
|
+
{% endif %}">
|
16
15
|
{{ text }}
|
17
16
|
</span>
|
@@ -1,23 +1,26 @@
|
|
1
1
|
{% load i18n %}
|
2
|
+
|
2
3
|
{% if sidebar_show_search %}
|
3
|
-
<div class="mb-5 mx-3 relative">
|
4
|
+
<div class="mb-5 mx-3 relative" x-data="{openSearchResults: false}">
|
4
5
|
<div class="bg-white border flex items-center overflow-hidden rounded-md shadow-sm focus-within:ring focus-within:ring-primary-300 focus-within:border-primary-600 dark:bg-gray-900 dark:border-gray-700 dark:focus-within:border-primary-600 dark:focus-within:ring-primary-700 dark:focus-within:ring-opacity-50">
|
5
6
|
<span class="material-symbols-outlined md-18 pl-3 text-gray-400">manage_search</span>
|
6
7
|
|
7
8
|
<input type="search"
|
8
9
|
id="nav-filter"
|
9
10
|
name="s"
|
11
|
+
x-on:blur="setTimeout(function() {openSearchResults = false}, 200)"
|
12
|
+
x-on:focus="openSearchResults=true"
|
10
13
|
hx-get="{% url "admin:search" %}"
|
11
14
|
hx-trigger="keyup changed delay:500ms, search"
|
12
15
|
hx-target="#search-results"
|
13
16
|
hx-indicator=".htmx-indicator"
|
14
|
-
class="flex-grow font-medium overflow-hidden pl-2 pr-3 py-2 text-gray-500 text-sm focus:outline-none dark:bg-gray-900 dark:text-gray-
|
17
|
+
class="flex-grow font-medium overflow-hidden pl-2 pr-3 py-2 text-gray-500 text-sm focus:outline-none dark:bg-gray-900 dark:text-gray-300"
|
15
18
|
placeholder="{% translate 'Search apps and models...' %}" aria-label="{% translate 'Filter navigation items' %}" />
|
16
|
-
<div class="absolute htmx-indicator mt-0.5
|
19
|
+
<div class="absolute opacity-0 htmx-indicator mt-0.5 right-2 top-2">
|
17
20
|
<span class="animate-spin material-symbols-outlined md-18 text-gray-300">sync</span>
|
18
21
|
</div>
|
19
22
|
</div>
|
20
23
|
|
21
|
-
<div id="search-results"></div>
|
24
|
+
<div id="search-results" x-show="openSearchResults"></div>
|
22
25
|
</div>
|
23
26
|
{% endif %}
|
@@ -3,8 +3,8 @@
|
|
3
3
|
{% for app in results %}
|
4
4
|
{% for model in app.models %}
|
5
5
|
<li>
|
6
|
-
<a href="{{ model.admin_url }}" class="block group overflow-hidden px-3 py-2 text-gray-500 text-ellipsis whitespace-nowrap hover:text-gray-700 dark:text-gray-
|
7
|
-
{{ app.name }} <span class="align-text-top material-symbols-outlined md-18 text-gray-300 group-hover:text-gray-
|
6
|
+
<a href="{{ model.admin_url }}" class="block group overflow-hidden px-3 py-2 text-gray-500 text-ellipsis whitespace-nowrap hover:text-gray-700 dark:text-gray-300 dark:hover:text-gray-200">
|
7
|
+
{{ app.name }} <span class="align-text-top material-symbols-outlined md-18 text-gray-300 group-hover:text-gray-300 dark:text-gray-600">arrow_right_alt</span> {{ model.name }}
|
8
8
|
</a>
|
9
9
|
</li>
|
10
10
|
{% endfor %}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<li class="border-b flex-grow text-center md:border-b-0 md:border-r last:border-0 dark:border-gray-800">
|
2
|
-
<a href="{{ link }}" class="block px-4 py-2 text-gray-500 text-left whitespace-nowrap hover:text-gray-700 dark:text-gray-
|
2
|
+
<a href="{{ link }}" class="block px-4 py-2 text-gray-500 text-left whitespace-nowrap hover:text-gray-700 dark:text-gray-300 hover:dark:text-gray-200"{% if blank %} target="_blank"{% endif %} {% include "unfold/helpers/attrs.html" with attrs=action.attrs %}>
|
3
3
|
{{ title }}
|
4
4
|
</a>
|
5
5
|
</li>
|