django-unfold 0.42.0__py3-none-any.whl → 0.44.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.42.0.dist-info → django_unfold-0.44.0.dist-info}/METADATA +1 -1
- django_unfold-0.44.0.dist-info/RECORD +227 -0
- {django_unfold-0.42.0.dist-info → django_unfold-0.44.0.dist-info}/WHEEL +1 -1
- unfold/admin.py +2 -0
- unfold/components.py +47 -0
- unfold/contrib/filters/admin.py +5 -5
- unfold/contrib/filters/templates/unfold/filters/filters_date_range.html +1 -1
- unfold/contrib/filters/templates/unfold/filters/filters_datetime_range.html +1 -1
- unfold/contrib/filters/templates/unfold/filters/filters_numeric_range.html +1 -1
- unfold/contrib/filters/templates/unfold/filters/filters_numeric_single.html +1 -1
- unfold/contrib/filters/templates/unfold/filters/filters_numeric_slider.html +3 -3
- unfold/contrib/forms/templates/unfold/forms/array.html +3 -3
- unfold/contrib/forms/templates/unfold/forms/helpers/toolbar.html +25 -25
- unfold/contrib/forms/widgets.py +5 -5
- 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 +2 -2
- unfold/contrib/guardian/templates/admin/guardian/model/obj_perms_manage_user.html +2 -2
- unfold/contrib/guardian/templates/unfold/guardian/group_form.html +8 -8
- unfold/contrib/guardian/templates/unfold/guardian/user_form.html +8 -8
- unfold/contrib/import_export/templates/admin/import_export/change_form.html +1 -1
- unfold/contrib/import_export/templates/admin/import_export/export.html +4 -4
- unfold/contrib/import_export/templates/admin/import_export/import_confirm.html +4 -4
- unfold/contrib/import_export/templates/admin/import_export/import_errors.html +2 -2
- unfold/contrib/import_export/templates/admin/import_export/import_form.html +2 -2
- unfold/contrib/import_export/templates/admin/import_export/import_preview.html +5 -5
- unfold/contrib/import_export/templates/admin/import_export/import_validation.html +30 -25
- unfold/contrib/import_export/templates/admin/import_export/resource_fields_list.html +5 -3
- unfold/contrib/simple_history/templates/simple_history/object_history.html +2 -2
- unfold/contrib/simple_history/templates/simple_history/object_history_form.html +1 -1
- unfold/contrib/simple_history/templates/simple_history/object_history_list.html +9 -9
- unfold/contrib/simple_history/templates/simple_history/submit_line.html +4 -4
- unfold/forms.py +13 -2
- unfold/settings.py +20 -7
- unfold/sites.py +23 -8
- unfold/static/admin/js/inlines.js +2 -2
- unfold/static/unfold/css/styles.css +1 -1
- unfold/static/unfold/js/alpine.resize.js +1 -0
- unfold/static/unfold/js/app.js +52 -71
- unfold/static/unfold/js/htmx.js +1 -1
- unfold/styles.css +67 -71
- unfold/templates/admin/actions.html +19 -17
- unfold/templates/admin/app_list.html +3 -3
- unfold/templates/admin/auth/user/add_form.html +1 -1
- unfold/templates/admin/auth/user/change_password.html +2 -2
- unfold/templates/admin/base.html +1 -1
- unfold/templates/admin/change_form.html +8 -0
- unfold/templates/admin/change_list.html +24 -30
- unfold/templates/admin/change_list_results.html +40 -6
- unfold/templates/admin/date_hierarchy.html +1 -1
- unfold/templates/admin/delete_confirmation.html +7 -7
- unfold/templates/admin/delete_selected_confirmation.html +7 -7
- unfold/templates/admin/edit_inline/stacked.html +4 -4
- unfold/templates/admin/edit_inline/tabular.html +8 -151
- unfold/templates/admin/filter.html +7 -7
- unfold/templates/admin/includes/fieldset.html +2 -2
- unfold/templates/admin/includes/object_delete_summary.html +1 -1
- unfold/templates/admin/login.html +4 -4
- unfold/templates/admin/nav_sidebar.html +1 -17
- unfold/templates/admin/object_history.html +7 -7
- unfold/templates/admin/pagination.html +36 -30
- unfold/templates/admin/search_form.html +11 -9
- unfold/templates/admin/submit_line.html +11 -11
- unfold/templates/auth/widgets/read_only_password_hash.html +1 -1
- unfold/templates/registration/logged_out.html +3 -3
- unfold/templates/registration/password_change_done.html +1 -1
- unfold/templates/registration/password_change_form.html +1 -1
- unfold/templates/unfold/components/button.html +1 -1
- unfold/templates/unfold/components/card.html +4 -4
- unfold/templates/unfold/components/chart/cohort.html +59 -0
- unfold/templates/unfold/components/navigation.html +2 -2
- unfold/templates/unfold/components/separator.html +1 -1
- unfold/templates/unfold/components/table.html +6 -6
- unfold/templates/unfold/components/tracker.html +5 -0
- unfold/templates/unfold/helpers/account_links.html +6 -6
- unfold/templates/unfold/helpers/actions_row.html +5 -5
- unfold/templates/unfold/helpers/add_link.html +1 -1
- unfold/templates/unfold/helpers/app_list.html +10 -10
- unfold/templates/unfold/helpers/app_list_default.html +10 -10
- unfold/templates/unfold/helpers/boolean.html +1 -1
- unfold/templates/unfold/helpers/breadcrumb_item.html +1 -1
- unfold/templates/unfold/helpers/change_list_actions.html +13 -0
- unfold/templates/unfold/helpers/change_list_filter.html +31 -0
- unfold/templates/unfold/helpers/change_list_filter_actions.html +23 -0
- unfold/templates/unfold/helpers/delete_submit_line.html +2 -2
- unfold/templates/unfold/helpers/display_header.html +3 -3
- unfold/templates/unfold/helpers/edit_inline/tabular_delete.html +13 -0
- unfold/templates/unfold/helpers/edit_inline/tabular_error.html +8 -0
- unfold/templates/unfold/helpers/edit_inline/tabular_field.html +25 -0
- unfold/templates/unfold/helpers/edit_inline/tabular_heading.html +25 -0
- unfold/templates/unfold/helpers/edit_inline/tabular_row.html +27 -0
- unfold/templates/unfold/helpers/edit_inline/tabular_title.html +49 -0
- unfold/templates/unfold/helpers/field_readonly.html +1 -1
- unfold/templates/unfold/helpers/field_readonly_value.html +1 -1
- unfold/templates/unfold/helpers/fieldset_row.html +5 -73
- unfold/templates/unfold/helpers/fieldset_row_checkbox.html +45 -0
- unfold/templates/unfold/helpers/fieldset_row_field.html +21 -0
- unfold/templates/unfold/helpers/fieldsets_tabs.html +2 -2
- unfold/templates/unfold/helpers/header.html +1 -1
- unfold/templates/unfold/helpers/history.html +4 -4
- unfold/templates/unfold/helpers/label.html +1 -1
- unfold/templates/unfold/helpers/language_switch.html +3 -3
- unfold/templates/unfold/helpers/messages/debug.html +3 -0
- unfold/templates/unfold/helpers/messages/error.html +5 -3
- unfold/templates/unfold/helpers/messages/errornote.html +1 -1
- unfold/templates/unfold/helpers/messages/info.html +2 -2
- unfold/templates/unfold/helpers/messages/success.html +3 -0
- unfold/templates/unfold/helpers/messages/warning.html +3 -0
- unfold/templates/unfold/helpers/messages.html +13 -14
- unfold/templates/unfold/helpers/navigation.html +3 -11
- unfold/templates/unfold/helpers/navigation_header.html +13 -0
- unfold/templates/unfold/helpers/pagination_ellipsis.html +1 -1
- unfold/templates/unfold/helpers/search.html +5 -5
- unfold/templates/unfold/helpers/search_results.html +2 -2
- unfold/templates/unfold/helpers/site_icon.html +7 -5
- unfold/templates/unfold/helpers/site_logo.html +1 -1
- unfold/templates/unfold/helpers/submit.html +1 -1
- unfold/templates/unfold/helpers/tab_action.html +2 -2
- unfold/templates/unfold/helpers/tab_list.html +9 -9
- unfold/templates/unfold/helpers/theme_switch.html +5 -5
- unfold/templates/unfold/helpers/userlinks.html +4 -0
- unfold/templates/unfold/helpers/welcomemsg.html +13 -1
- unfold/templates/unfold/layouts/base_simple.html +2 -2
- unfold/templates/unfold/layouts/skeleton.html +12 -6
- unfold/templates/unfold/widgets/clearable_file_input.html +6 -6
- unfold/templates/unfold/widgets/clearable_file_input_small.html +7 -7
- unfold/templates/unfold/widgets/foreign_key_raw_id.html +1 -1
- unfold/templates/unfold/widgets/radio.html +1 -1
- unfold/templates/unfold/widgets/range.html +1 -1
- unfold/templates/unfold/widgets/related_widget_wrapper.html +4 -4
- unfold/templates/unfold/widgets/textarea_expandable.html +1 -1
- unfold/templatetags/unfold.py +130 -7
- unfold/templatetags/unfold_list.py +9 -4
- unfold/widgets.py +31 -28
- django_unfold-0.42.0.dist-info/RECORD +0 -209
- unfold/templates/unfold/change_list_filter.html +0 -59
- {django_unfold-0.42.0.dist-info → django_unfold-0.44.0.dist-info}/LICENSE.md +0 -0
@@ -32,7 +32,7 @@
|
|
32
32
|
{% endif %}{% endblock %}
|
33
33
|
|
34
34
|
{% block content %}
|
35
|
-
<div class="border border-
|
35
|
+
<div class="border border-base-200 overflow-hidden rounded p-3 shadow-sm dark:border-base-800">
|
36
36
|
<form method="post">
|
37
37
|
{% csrf_token %}
|
38
38
|
|
@@ -44,7 +44,7 @@
|
|
44
44
|
|
45
45
|
{% include "unfold/helpers/field.html" with field=form.permissions %}
|
46
46
|
|
47
|
-
<div class="bg-
|
47
|
+
<div class="bg-base-50 border-t flex flex-row -m-3 p-3 dark:bg-white/[.02] dark:border-base-800">
|
48
48
|
<div class="ml-auto">
|
49
49
|
{% trans "Save" as title %}
|
50
50
|
{% include "unfold/helpers/submit.html" with title=title %}
|
@@ -33,7 +33,7 @@
|
|
33
33
|
{% endif %}{% endblock %}
|
34
34
|
|
35
35
|
{% block content %}
|
36
|
-
<div class="border border-
|
36
|
+
<div class="border border-base-200 overflow-hidden rounded p-3 shadow-sm dark:border-base-800">
|
37
37
|
<form method="post">
|
38
38
|
{% csrf_token %}
|
39
39
|
|
@@ -45,7 +45,7 @@
|
|
45
45
|
|
46
46
|
{% include "unfold/helpers/field.html" with field=form.permissions %}
|
47
47
|
|
48
|
-
<div class="bg-
|
48
|
+
<div class="bg-base-50 border-t flex flex-row -m-3 p-3 dark:bg-white/[.02] dark:border-base-800">
|
49
49
|
<div class="ml-auto">
|
50
50
|
{% trans "Save" as title %}
|
51
51
|
{% include "unfold/helpers/submit.html" with title=title %}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</h2>
|
9
9
|
|
10
10
|
{% if groups_perms.items %}
|
11
|
-
<table id="group-permissions" class="border-
|
11
|
+
<table id="group-permissions" class="border-base-200 border-spacing-none border-separate mb-6 w-full lg:border lg:rounded lg:shadow-sm lg:dark:border-base-800">
|
12
12
|
<thead class="hidden lg:table-header-group text-font-important-light dark:text-font-important-dark">
|
13
13
|
<tr>
|
14
14
|
<th class="align-middle font-semibold px-3 py-2 text-left">
|
@@ -29,15 +29,15 @@
|
|
29
29
|
|
30
30
|
<tbody>
|
31
31
|
{% for group, group_perms in groups_perms.items %}
|
32
|
-
<tr class="block border mb-3 rounded
|
33
|
-
<th class="align-middle flex border-t border-
|
32
|
+
<tr class="block border mb-3 rounded shadow-sm lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-base-800">
|
33
|
+
<th class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{% trans "User" %}">
|
34
34
|
<span>
|
35
35
|
{{ group }}
|
36
36
|
</span>
|
37
37
|
</th>
|
38
38
|
|
39
39
|
{% for perm in model_perms %}
|
40
|
-
<td class="align-middle flex border-t border-
|
40
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{{ perm.name }}">
|
41
41
|
{% if perm.codename in group_perms %}
|
42
42
|
{% include "unfold/helpers/boolean.html" with value=True %}
|
43
43
|
{% else %}
|
@@ -46,8 +46,8 @@
|
|
46
46
|
</td>
|
47
47
|
{% endfor %}
|
48
48
|
|
49
|
-
<td class="align-middle flex border-t border-
|
50
|
-
<a href="group-manage/{{ group.id|safe }}/" class="hover:text-
|
49
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-right before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{% trans "Action" %}">
|
50
|
+
<a href="group-manage/{{ group.id|safe }}/" class="hover:text-base-700 dark:hover:text-white">
|
51
51
|
{% trans "Edit" %}
|
52
52
|
</a>
|
53
53
|
</td>
|
@@ -57,12 +57,12 @@
|
|
57
57
|
</table>
|
58
58
|
{% endif %}
|
59
59
|
|
60
|
-
<div class="border border-
|
60
|
+
<div class="border border-base-200 overflow-hidden rounded p-3 shadow-sm dark:border-base-800">
|
61
61
|
{% for field in group_form %}
|
62
62
|
{% include "admin/guardian/model/field.html" %}
|
63
63
|
{% endfor %}
|
64
64
|
|
65
|
-
<div class="bg-
|
65
|
+
<div class="bg-base-50 border-t flex flex-row -m-3 p-3 dark:bg-white/[.02] dark:border-base-800">
|
66
66
|
<div class="ml-auto">
|
67
67
|
{% trans "Manage group" as title %}
|
68
68
|
{% include "unfold/helpers/submit.html" with title=title name="submit_manage_group" %}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</h2>
|
9
9
|
|
10
10
|
{% if users_perms.items %}
|
11
|
-
<table id="user-permissions" class="border-
|
11
|
+
<table id="user-permissions" class="border-base-200 border-spacing-none border-separate mb-6 w-full lg:border lg:rounded lg:shadow-sm lg:dark:border-base-800">
|
12
12
|
<thead class="hidden lg:table-header-group text-font-important-light dark:text-font-important-dark">
|
13
13
|
<tr>
|
14
14
|
<th class="align-middle font-semibold px-3 py-2 text-left">
|
@@ -29,15 +29,15 @@
|
|
29
29
|
|
30
30
|
<tbody>
|
31
31
|
{% for user, user_perms in users_perms.items %}
|
32
|
-
<tr class="block border mb-3 rounded
|
33
|
-
<th class="align-middle flex border-t border-
|
32
|
+
<tr class="block border mb-3 rounded shadow-sm lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-base-800">
|
33
|
+
<th class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{% trans "User" %}">
|
34
34
|
<span>
|
35
35
|
{{ user }}
|
36
36
|
</span>
|
37
37
|
</th>
|
38
38
|
|
39
39
|
{% for perm in model_perms %}
|
40
|
-
<td class="align-middle flex border-t border-
|
40
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{{ perm.name }}">
|
41
41
|
{% if perm.codename in user_perms %}
|
42
42
|
{% include "unfold/helpers/boolean.html" with value=True %}
|
43
43
|
{% else %}
|
@@ -46,8 +46,8 @@
|
|
46
46
|
</td>
|
47
47
|
{% endfor %}
|
48
48
|
|
49
|
-
<td class="align-middle flex border-t border-
|
50
|
-
<a href="user-manage/{{ user.id|safe }}/" class="hover:text-
|
49
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-right before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{% trans "Action" %}">
|
50
|
+
<a href="user-manage/{{ user.id|safe }}/" class="hover:text-base-700 dark:hover:text-white">
|
51
51
|
{% trans "Edit" %}
|
52
52
|
</a>
|
53
53
|
</td>
|
@@ -57,12 +57,12 @@
|
|
57
57
|
</table>
|
58
58
|
{% endif %}
|
59
59
|
|
60
|
-
<div class="border border-
|
60
|
+
<div class="border border-base-200 overflow-hidden rounded p-3 shadow-sm dark:border-base-800">
|
61
61
|
{% for field in user_form %}
|
62
62
|
{% include "admin/guardian/model/field.html" %}
|
63
63
|
{% endfor %}
|
64
64
|
|
65
|
-
<div class="bg-
|
65
|
+
<div class="bg-base-50 border-t flex flex-row -m-3 p-3 dark:bg-white/[.02] dark:border-base-800">
|
66
66
|
<div class="ml-auto">
|
67
67
|
{% trans "Manage user" as title %}
|
68
68
|
{% include "unfold/helpers/submit.html" with title=title name="submit_manage_user" %}
|
@@ -5,6 +5,6 @@
|
|
5
5
|
{{ block.super }}
|
6
6
|
|
7
7
|
{% if show_change_form_export %}
|
8
|
-
<input type="submit" value="{% translate 'Export' %}" name="_export-item" class="bg-white text-
|
8
|
+
<input type="submit" value="{% translate 'Export' %}" name="_export-item" class="bg-white text-base-500 border cursor-pointer flex font-medium items-center px-3 py-2 mr-3 rounded shadow-sm text-sm dark:bg-base-900 dark:border dark:border-base-700 dark:text-font-default-dark">
|
9
9
|
{% endif %}
|
10
10
|
{% endblock %}
|
@@ -37,7 +37,7 @@
|
|
37
37
|
{% csrf_token %}
|
38
38
|
|
39
39
|
{% if form.initial.export_items %}
|
40
|
-
<p class="bg-blue-50 mb-4 text-blue-500 px-3 py-3 rounded
|
40
|
+
<p class="bg-blue-50 mb-4 text-blue-500 px-3 py-3 rounded text-sm dark:bg-blue-500/20 dark:border-blue-500/10">
|
41
41
|
{% blocktranslate count len=form.initial.export_items|length %}
|
42
42
|
Export {{ len }} selected item.
|
43
43
|
{% plural %}
|
@@ -52,11 +52,11 @@
|
|
52
52
|
|
53
53
|
{{ form.non_field_errors }}
|
54
54
|
|
55
|
-
<fieldset class="border border-
|
55
|
+
<fieldset class="border border-base-200 mb-4 rounded pt-3 px-3 shadow-sm dark:border-base-800">
|
56
56
|
{% for field in form.visible_fields %}
|
57
57
|
<div {% if field.field.is_selectable_field %}class="selectable-field-export-row" resource-index="{{ field.field.resource_index }}"{% endif %}>
|
58
58
|
{% if field.field.initial_field %}
|
59
|
-
<p class="block font-medium mb-2 text-
|
59
|
+
<p class="block font-medium mb-2 text-base-900 text-sm dark:text-base-200">
|
60
60
|
{% trans "This exporter will export the following fields" %}
|
61
61
|
</p>
|
62
62
|
{% endif %}
|
@@ -75,7 +75,7 @@
|
|
75
75
|
{% endfor %}
|
76
76
|
</fieldset>
|
77
77
|
|
78
|
-
<button type="submit" class="bg-primary-600 border border-transparent font-medium px-3 py-2 rounded
|
78
|
+
<button type="submit" class="bg-primary-600 border border-transparent font-medium px-3 py-2 rounded text-sm text-white">
|
79
79
|
{% translate 'Submit' %}
|
80
80
|
</button>
|
81
81
|
</form>
|
@@ -1,17 +1,17 @@
|
|
1
1
|
{% load admin_urls i18n import_export_tags %}
|
2
2
|
|
3
3
|
{% block confirm_import_form %}
|
4
|
-
<form action="{% url opts|admin_urlname:"process_import" %}" method="post" class="border border-
|
4
|
+
<form action="{% url opts|admin_urlname:"process_import" %}" method="post" class="border border-base-200 mb-8 rounded shadow-sm dark:border-base-800">
|
5
5
|
{% csrf_token %}
|
6
6
|
|
7
7
|
{{ confirm_form.as_p }}
|
8
8
|
|
9
|
-
<p class="font-semibold p-4 text-sm text-
|
9
|
+
<p class="font-semibold p-4 text-sm text-base-900 dark:text-base-100">
|
10
10
|
{% trans "Below is a preview of data to be imported. If you are satisfied with the results, click 'Confirm import'" %}
|
11
11
|
</p>
|
12
12
|
|
13
|
-
<div class="border-t border-
|
14
|
-
<button type="submit" class="bg-primary-600 border border-transparent font-medium ml-auto px-3 py-2 rounded
|
13
|
+
<div class="border-t border-base-200 flex flex-row px-4 py-3 dark:border-base-800">
|
14
|
+
<button type="submit" class="bg-primary-600 border border-transparent font-medium ml-auto px-3 py-2 rounded text-sm text-white">
|
15
15
|
{% translate 'Confirm import' %}
|
16
16
|
</button>
|
17
17
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{% load i18n %}
|
2
2
|
|
3
3
|
{% block errors %}
|
4
|
-
<hr class="dark:border-
|
4
|
+
<hr class="dark:border-base-800 my-8">
|
5
5
|
|
6
6
|
<ul>
|
7
7
|
{% for error in result.base_errors %}
|
@@ -26,7 +26,7 @@
|
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
|
29
|
-
<div class="block border leading-relaxed mb-4 rounded p-4 traceback dark:border-
|
29
|
+
<div class="block border border-base-200 leading-relaxed mb-4 rounded p-4 traceback dark:border-base-800 dark:text-font-default-dark " x-show="open">
|
30
30
|
{{ error.traceback|linebreaks }}
|
31
31
|
</div>
|
32
32
|
</li>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
{% include "admin/import_export/resource_fields_list.html" with import_or_export="import" %}
|
8
8
|
|
9
|
-
<fieldset class="border border-
|
9
|
+
<fieldset class="border border-base-200 mb-8 rounded pt-3 px-3 shadow-sm dark:border-base-800">
|
10
10
|
{% for field in form %}
|
11
11
|
{% if field.field.widget.attrs.readonly %}
|
12
12
|
{% include "unfold/helpers/field_readonly.html" with title=field.label value=field.field.value %}
|
@@ -17,7 +17,7 @@
|
|
17
17
|
{% endfor %}
|
18
18
|
</fieldset>
|
19
19
|
|
20
|
-
<button type="submit" class="bg-primary-600 border border-transparent font-medium px-3 py-2 rounded
|
20
|
+
<button type="submit" class="bg-primary-600 border border-transparent font-medium px-3 py-2 rounded text-sm text-white">
|
21
21
|
{% translate 'Submit' %}
|
22
22
|
</button>
|
23
23
|
</form>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
{% load admin_urls i18n import_export_tags unfold %}
|
2
2
|
|
3
3
|
{% block preview %}
|
4
|
-
<table class="border-
|
5
|
-
<thead class="hidden lg:table-header-group text-
|
4
|
+
<table class="border-base-200 border-spacing-none border-separate w-full lg:border lg:rounded lg:shadow-sm lg:dark:border-base-800">
|
5
|
+
<thead class="hidden lg:table-header-group text-base-900 dark:text-base-100">
|
6
6
|
<tr>
|
7
7
|
<th class="align-middle capitalize font-semibold px-3 py-2 text-left"></th>
|
8
8
|
|
@@ -16,8 +16,8 @@
|
|
16
16
|
|
17
17
|
<tbody>
|
18
18
|
{% for row in result.valid_rows %}
|
19
|
-
<tr class="{{ row.import_type }} {% cycle '' 'bg-
|
20
|
-
<td class="align-middle flex border-t border-
|
19
|
+
<tr class="{{ row.import_type }} {% cycle '' 'bg-base-50 dark:bg-white/[.02]' %} block border mb-3 rounded shadow-sm lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-base-800">
|
20
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-base-800">
|
21
21
|
{% if row.import_type == 'new' %}
|
22
22
|
{% trans "New" %}
|
23
23
|
{% elif row.import_type == 'skip' %}
|
@@ -30,7 +30,7 @@
|
|
30
30
|
</td>
|
31
31
|
|
32
32
|
{% for field in row.diff %}
|
33
|
-
<td data-label="{{ result.diff_headers|index:forloop.counter0 }}" class="align-middle flex border-t border-
|
33
|
+
<td data-label="{{ result.diff_headers|index:forloop.counter0 }}" class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-base-800">
|
34
34
|
{{ field }}
|
35
35
|
</td>
|
36
36
|
{% endfor %}
|
@@ -1,22 +1,22 @@
|
|
1
1
|
{% load i18n unfold %}
|
2
2
|
|
3
3
|
{% block validation_errors %}
|
4
|
-
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
</h2>
|
9
|
-
</div>
|
4
|
+
{% capture as import_error silent %}
|
5
|
+
<span class="block font-semibold mb-2">
|
6
|
+
{% trans "Some rows failed to validate" %}
|
7
|
+
</span>
|
10
8
|
|
11
|
-
<
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
<span class="block">
|
10
|
+
{% trans "Please correct these errors in your data where possible, then reupload it using the form above." %}
|
11
|
+
</span>
|
12
|
+
{% endcapture %}
|
13
|
+
|
14
|
+
<div class="mt-8">
|
15
|
+
{% include "unfold/helpers/messages/error.html" with error=import_error %}
|
16
16
|
</div>
|
17
17
|
|
18
|
-
<table class="border-
|
19
|
-
<thead class="hidden lg:table-header-group font-semibold text-
|
18
|
+
<table class="import-preview border-base-200 border-spacing-none border-separate w-full lg:border lg:rounded lg:shadow-sm lg:dark:border-base-800">
|
19
|
+
<thead class="hidden lg:table-header-group font-semibold text-base-900 dark:text-base-100">
|
20
20
|
<tr>
|
21
21
|
<th class="align-middle capitalize px-3 py-2 text-left">
|
22
22
|
{% trans "Row" %}
|
@@ -36,24 +36,29 @@
|
|
36
36
|
|
37
37
|
<tbody>
|
38
38
|
{% for row in result.invalid_rows %}
|
39
|
-
<tr class="{% cycle '' 'bg-
|
40
|
-
<td data-label="{% trans "Row" %}" class="align-middle flex border-t border-
|
39
|
+
<tr class="{% cycle '' 'bg-base-50 dark:bg-white/[.02]' %} block border border-base-200 mb-3 rounded shadow-sm lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-base-800">
|
40
|
+
<td data-label="{% trans "Row" %}" class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-base-800">
|
41
41
|
{{ row.number }}
|
42
42
|
</td>
|
43
43
|
|
44
|
-
<td data-label="{% trans "Errors" %}" class="align-middle flex border-t border-
|
45
|
-
<
|
46
|
-
<span class="bg-red-600 font-semibold ml-2 px-1 rounded-sm text-xs text-white">{{ row.error_count }}</span>
|
47
|
-
</div>
|
44
|
+
<td data-label="{% trans "Errors" %}" class="errors align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-base-800">
|
45
|
+
<span class="validation-error-count bg-red-600 font-semibold ml-2 px-1 rounded text-xs text-white">{{ row.error_count }}</span>
|
48
46
|
|
49
|
-
<div class="validation-error-container">
|
47
|
+
<div class="validation-error-container rounded !bg-white border border-base-200 left-12 !m-0 !p-0 !top-3 dark:!bg-base-800 dark:!border-base-700 min-w-72">
|
50
48
|
<ul class="validation-error-list">
|
51
49
|
{% for field_name, error_list in row.field_specific_errors.items %}
|
52
|
-
<li>
|
53
|
-
<span class="validation-error-field-label
|
54
|
-
|
50
|
+
<li class="p-3">
|
51
|
+
<span class="validation-error-field-label !border-0 font-semibold mb-1 !text-font-important-light dark:!text-font-important-dark">
|
52
|
+
{{ field_name }}
|
53
|
+
</span>
|
54
|
+
|
55
|
+
<ul class="text-xs !m-0">
|
55
56
|
{% for error in error_list %}
|
56
|
-
<li
|
57
|
+
<li class="!m-0">
|
58
|
+
<p class="leading-normal">
|
59
|
+
{{ error }}
|
60
|
+
</p>
|
61
|
+
</li>
|
57
62
|
{% endfor %}
|
58
63
|
</ul>
|
59
64
|
</li>
|
@@ -77,7 +82,7 @@
|
|
77
82
|
</td>
|
78
83
|
|
79
84
|
{% for field in row.values %}
|
80
|
-
<td data-label="{{ result.diff_headers|index:forloop.counter0 }}" class="align-middle flex border-t border-
|
85
|
+
<td data-label="{{ result.diff_headers|index:forloop.counter0 }}" class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left text-sm before:block before:capitalize before:content-[attr(data-label)] before:mr-auto lg:before:hidden lg:py-3 lg:table-cell dark:border-base-800">
|
81
86
|
{{ field }}
|
82
87
|
</td>
|
83
88
|
{% endfor %}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
{% load i18n %}
|
1
|
+
{% load unfold i18n %}
|
2
2
|
|
3
3
|
{% block fields_help %}
|
4
|
-
|
4
|
+
{% capture as fields_help silent %}
|
5
5
|
{% if import_or_export == "export" %}
|
6
6
|
{% trans "This exporter will export the following fields: " %}
|
7
7
|
{% elif import_or_export == "import" %}
|
@@ -20,5 +20,7 @@
|
|
20
20
|
{% endfor %}
|
21
21
|
</dl>
|
22
22
|
{% endif %}
|
23
|
-
|
23
|
+
{% endcapture %}
|
24
|
+
|
25
|
+
{% include "unfold/helpers/messages/info.html" with message=fields_help %}
|
24
26
|
{% endblock %}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
{% block content %}
|
6
6
|
{% if not revert_disabled %}
|
7
|
-
<p class="px-3 py-3 rounded
|
7
|
+
<p class="px-3 py-3 rounded text-sm last:mb-8 mb-8 bg-blue-100 text-blue-700 dark:bg-blue-500/20 dark:text-blue-400">
|
8
8
|
{% blocktrans %}Choose a date from the list below to revert to a previous version of this object.{% endblocktrans %}
|
9
9
|
</p>
|
10
10
|
{% endif %}
|
@@ -12,7 +12,7 @@
|
|
12
12
|
{% if historical_records %}
|
13
13
|
{% include object_history_list_template %}
|
14
14
|
{% else %}
|
15
|
-
<p class="mb-3 px-3 py-3 rounded
|
15
|
+
<p class="mb-3 px-3 py-3 rounded text-sm last:mb-8 bg-amber-100 text-amber-600 dark:bg-amber-600/20 dark:border-amber-600/10">
|
16
16
|
{% trans "This object doesn't have a change history." %}
|
17
17
|
</p>
|
18
18
|
{% endif %}
|
@@ -43,7 +43,7 @@
|
|
43
43
|
{% endblock %}
|
44
44
|
|
45
45
|
{% block form_top %}
|
46
|
-
<p class="px-3 py-3 rounded
|
46
|
+
<p class="px-3 py-3 rounded text-sm last:mb-8 er-amber-600/10 bg-blue-50 mb-8 text-blue-500 dark:bg-blue-500/20 dark:border-blue-500/10">
|
47
47
|
{% if not revert_disabled %}
|
48
48
|
{% blocktrans %}Press the 'Revert' button below to revert to this version of the object.{% endblocktrans %}
|
49
49
|
{% endif %}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
{% load admin_urls %}
|
4
4
|
{% load getattribute from getattributes %}
|
5
5
|
|
6
|
-
<table id="change-history" class="border-
|
6
|
+
<table id="change-history" class="border-base-200 border-spacing-none border-separate mb-6 w-full lg:border lg:rounded lg:shadow-sm lg:dark:border-base-800">
|
7
7
|
<thead class="hidden text-font-important-light lg:table-header-group dark:text-font-important-dark">
|
8
8
|
<tr>
|
9
9
|
<th class="align-middle font-semibold px-3 py-2 text-left ">
|
@@ -40,28 +40,28 @@
|
|
40
40
|
|
41
41
|
<tbody>
|
42
42
|
{% for record in historical_records %}
|
43
|
-
<tr class="block border mb-3 rounded
|
44
|
-
<td class="align-middle flex border-t border-
|
43
|
+
<tr class="block border mb-3 rounded shadow-sm lg:table-row lg:border-none lg:mb-0 lg:shadow-none dark:border-base-800">
|
44
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{% trans 'Object' %}">
|
45
45
|
<a href="{% url opts|admin_urlname:'simple_history' object.pk record.pk %}">
|
46
46
|
{{ record.history_object }}
|
47
47
|
</a>
|
48
48
|
</td>
|
49
49
|
|
50
50
|
{% for column in history_list_display %}
|
51
|
-
<td class="align-middle flex border-t border-
|
51
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{% trans column %}">
|
52
52
|
{{ record|getattribute:column }}
|
53
53
|
</th>
|
54
54
|
{% endfor %}
|
55
55
|
|
56
|
-
<td class="align-middle flex border-t border-
|
56
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{% trans 'Date/time' %}">
|
57
57
|
{{ record.history_date }}
|
58
58
|
</td>
|
59
59
|
|
60
|
-
<td class="align-middle flex border-t border-
|
60
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{% trans 'Comment' %}">
|
61
61
|
{{ record.get_history_type_display }}
|
62
62
|
</td>
|
63
63
|
|
64
|
-
<td class="align-middle flex border-t border-
|
64
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{% trans 'Changed by' %}">
|
65
65
|
{% if record.history_user %}
|
66
66
|
{% url admin_user_view record.history_user_id as admin_user_url %}
|
67
67
|
|
@@ -75,11 +75,11 @@
|
|
75
75
|
{% endif %}
|
76
76
|
</td>
|
77
77
|
|
78
|
-
<td class="align-middle flex border-t border-
|
78
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{% trans 'Change reason' %}">
|
79
79
|
{{ record.history_change_reason }}
|
80
80
|
</td>
|
81
81
|
|
82
|
-
<td class="align-middle flex border-t border-
|
82
|
+
<td class="align-middle flex border-t border-base-200 font-normal px-3 py-2 text-left before:flex before:capitalize before:content-[attr(data-label)] before:items-center before:mr-auto first:border-t-0 lg:before:hidden lg:first:border-t lg:py-3 lg:table-cell dark:border-base-800" data-label="{% trans 'Changes' %}">
|
83
83
|
{% block history_delta_changes %}
|
84
84
|
{% if record.history_delta_changes %}
|
85
85
|
<ul>
|
@@ -2,21 +2,21 @@
|
|
2
2
|
|
3
3
|
<div {% if not is_popup %}id="submit-row"{% endif %} class="relative z-20 {% if not is_popup %} mt-20 lg:mt-8{% endif %}">
|
4
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-
|
5
|
+
<div class="bg-white dark:bg-base-900 {% if not is_popup %}border-t border-base-200 px-4 py-4 relative scrollable-top lg:px-8 dark:border-base-800{% endif %}">
|
6
6
|
<div class="container flex flex-col-reverse gap-3 items-center mx-auto lg:flex-row-reverse">
|
7
7
|
{% if not revert_disabled %}
|
8
|
-
<button type="submit" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded
|
8
|
+
<button type="submit" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded text-sm text-white w-full lg:w-auto" name="_save" {{ onclick_attrib }}>
|
9
9
|
{% trans 'Revert' %}
|
10
10
|
</button>
|
11
11
|
{% endif %}
|
12
12
|
|
13
13
|
{% if change_history %}
|
14
|
-
<button type="submit" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded
|
14
|
+
<button type="submit" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded text-sm text-white w-full lg:w-auto" name="_change_history" {{ onclick_attrib }}>
|
15
15
|
{% trans 'Change History' %}
|
16
16
|
</button>
|
17
17
|
{% endif %}
|
18
18
|
|
19
|
-
<a href="{{ history_url }}" class="border font-medium mr-auto px-3 py-2 rounded
|
19
|
+
<a href="{{ history_url }}" class="border border-base-200 font-medium mr-auto px-3 py-2 rounded text-sm text-base-500 text-center transition-all w-full hover:bg-base-50 lg:block lg:w-auto dark:border-base-700 dark:text-font-default-dark dark:hover:text-base-200 dark:hover:bg-base-900">
|
20
20
|
{% trans 'Close' %}
|
21
21
|
</a>
|
22
22
|
</div>
|
unfold/forms.py
CHANGED
@@ -25,7 +25,6 @@ from django.utils.translation import gettext_lazy as _
|
|
25
25
|
from .widgets import (
|
26
26
|
BASE_INPUT_CLASSES,
|
27
27
|
INPUT_CLASSES,
|
28
|
-
SELECT_CLASSES,
|
29
28
|
UnfoldAdminPasswordInput,
|
30
29
|
UnfoldAdminRadioSelectWidget,
|
31
30
|
)
|
@@ -40,7 +39,19 @@ class ActionForm(forms.Form):
|
|
40
39
|
label="",
|
41
40
|
widget=forms.Select(
|
42
41
|
{
|
43
|
-
"class": " ".join(
|
42
|
+
"class": " ".join(
|
43
|
+
[
|
44
|
+
"appearance-none",
|
45
|
+
"bg-white/20",
|
46
|
+
"font-medium",
|
47
|
+
"grow",
|
48
|
+
"px-3",
|
49
|
+
"py-2",
|
50
|
+
"pr-8",
|
51
|
+
"rounded",
|
52
|
+
"lg:min-w-72",
|
53
|
+
]
|
54
|
+
),
|
44
55
|
"aria-label": _("Select action to run"),
|
45
56
|
"x-model": "action",
|
46
57
|
}
|
unfold/settings.py
CHANGED
@@ -14,13 +14,18 @@ CONFIG_DEFAULTS = {
|
|
14
14
|
"SHOW_VIEW_ON_SITE": True,
|
15
15
|
"SHOW_LANGUAGES": False,
|
16
16
|
"COLORS": {
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"
|
17
|
+
"base": {
|
18
|
+
"50": "249 250 251",
|
19
|
+
"100": "243 244 246",
|
20
|
+
"200": "229 231 235",
|
21
|
+
"300": "209 213 219",
|
22
|
+
"400": "156 163 175",
|
23
|
+
"500": "107 114 128",
|
24
|
+
"600": "75 85 99",
|
25
|
+
"700": "55 65 81",
|
26
|
+
"800": "31 41 55",
|
27
|
+
"900": "17 24 39",
|
28
|
+
"950": "3 7 18",
|
24
29
|
},
|
25
30
|
"primary": {
|
26
31
|
"50": "250 245 255",
|
@@ -35,6 +40,14 @@ CONFIG_DEFAULTS = {
|
|
35
40
|
"900": "88 28 135",
|
36
41
|
"950": "59 7 100",
|
37
42
|
},
|
43
|
+
"font": {
|
44
|
+
"subtle-light": "var(--color-base-500)", # text-base-500
|
45
|
+
"subtle-dark": "var(--color-base-400)", # text-base-400
|
46
|
+
"default-light": "var(--color-base-600)", # text-base-600
|
47
|
+
"default-dark": "var(--color-base-300)", # text-base-300
|
48
|
+
"important-light": "var(--color-base-900)", # text-base-900
|
49
|
+
"important-dark": "var(--color-base-100)", # text-base-100
|
50
|
+
},
|
38
51
|
},
|
39
52
|
"DASHBOARD_CALLBACK": None,
|
40
53
|
"ENVIRONMENT": None,
|