django-unfold 0.43.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.43.0.dist-info → django_unfold-0.44.0.dist-info}/METADATA +1 -1
- {django_unfold-0.43.0.dist-info → django_unfold-0.44.0.dist-info}/RECORD +129 -117
- {django_unfold-0.43.0.dist-info → django_unfold-0.44.0.dist-info}/WHEEL +1 -1
- 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 +8 -8
- 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_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 -8
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- unfold/templates/unfold/helpers/messages/error.html +1 -1
- unfold/templates/unfold/helpers/messages/errornote.html +1 -1
- unfold/templates/unfold/helpers/messages/info.html +1 -1
- unfold/templates/unfold/helpers/messages/success.html +1 -1
- unfold/templates/unfold/helpers/messages/warning.html +1 -1
- 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 +7 -3
- unfold/templates/unfold/layouts/base_simple.html +2 -2
- unfold/templates/unfold/layouts/skeleton.html +11 -5
- 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 +104 -0
- unfold/templatetags/unfold_list.py +9 -4
- unfold/widgets.py +31 -28
- unfold/templates/unfold/change_list_filter.html +0 -57
- {django_unfold-0.43.0.dist-info → django_unfold-0.44.0.dist-info}/LICENSE.md +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
{% load i18n %}
|
2
2
|
|
3
3
|
<div class="flex items-center ">
|
4
|
-
<div class="block mr-3 outline rounded-full ml-1 h-1 w-1 {% if value == '' or value == None %}bg-
|
4
|
+
<div class="block mr-3 outline rounded-full ml-1 h-1 w-1 {% if value == '' or value == None %}bg-base-500 outline-gray-500/20{% elif value %}bg-green-500 outline-green-200 dark:outline-green-500/20{% else %}bg-red-500 outline-red-200 dark:outline-red-500/20{% endif %}"></div>
|
5
5
|
|
6
6
|
<span>
|
7
7
|
{% if value == '' or value == None %}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
<li class="text-xs">
|
3
3
|
{% if link %}
|
4
|
-
<a href="{{ link }}">{{ name }}</a> <span class="mx-2 text-
|
4
|
+
<a href="{{ link }}">{{ name }}</a> <span class="mx-2 text-base-200 dark:text-base-600">/</span>
|
5
5
|
{% else %}
|
6
6
|
{{ name }}
|
7
7
|
{% endif %}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{% load admin_list %}
|
2
|
+
|
3
|
+
{% if actions_on_top %}
|
4
|
+
{% if cl.search_fields or action_form or cl.has_filters %}
|
5
|
+
<div class="bottom-0 left-0 right-0 hidden bg-primary-600 group-has-[input.action-select:checked]:flex fixed gap-3 lg:h-[71px] items-center p-3 z-50 lg:flex-row dark:bg-primary-500">
|
6
|
+
<div id="changelist-actions-wrapper" class="flex-grow lg:px-4" {% if not is_popup %}x-bind:class="{'xl:ml-0': !sidebarDesktopOpen, 'xl:ml-72': sidebarDesktopOpen}"{% endif %}>
|
7
|
+
{% if action_form %}
|
8
|
+
{% admin_actions %}
|
9
|
+
{% endif %}
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
{% endif %}
|
13
|
+
{% endif %}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
{% load i18n admin_list unfold %}
|
2
|
+
|
3
|
+
<div id="changelist-filter" class="backdrop-blur-sm bg-opacity-80 bg-base-900 flex inset-0 z-50 fixed {% if not cl.model_admin.list_filter_sheet %}2xl:pb-24 2xl:bg-transparent 2xl:relative 2xl:!block 2xl:z-10{% endif %}" hx-preserve 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
|
+
|
6
|
+
<div class="bg-white flex m-4 overflow-hidden rounded shadow-sm w-80 dark:bg-base-800 {% if not cl.model_admin.list_filter_sheet %} 2xl:overflow-visible 2xl:border-0 2xl:shadow-none 2xl:sticky 2xl:top-4 2xl:dark:border-base-800 2xl:bg-transparent 2xl:dark:!bg-transparent 2xl:m-0{% endif %}">
|
7
|
+
<div class="flex-grow h-full overflow-auto relative {% if not cl.model_admin.list_filter_sheet %} 2xl:overflow-visible{% endif %}">
|
8
|
+
<div class="px-3 py-2.5 {% if not cl.model_admin.list_filter_sheet %}2xl:px-0{% endif %}">
|
9
|
+
{% if cl.model_admin.list_filter_submit %}
|
10
|
+
<form id="filter-form" method="get">
|
11
|
+
{% preserve_filters %}
|
12
|
+
{% endif %}
|
13
|
+
|
14
|
+
<div class="flex flex-col gap-4 *:mb-0">
|
15
|
+
{% for spec in cl.filter_specs %}
|
16
|
+
{% admin_list_filter cl spec %}
|
17
|
+
{% endfor %}
|
18
|
+
</div>
|
19
|
+
|
20
|
+
{% if cl.model_admin.list_filter_submit %}
|
21
|
+
<button type="submit" class="bg-primary-600 block border border-transparent font-medium mt-6 px-3 py-2 rounded text-white w-full">
|
22
|
+
{% trans "Apply Filters" %}
|
23
|
+
</button>
|
24
|
+
</form>
|
25
|
+
{% endif %}
|
26
|
+
|
27
|
+
{% include "unfold/helpers/change_list_filter_actions.html" %}
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
{% load i18n %}
|
2
|
+
|
3
|
+
{% if cl.is_facets_optional or cl.has_active_filters %}
|
4
|
+
<span id="changelist-filter-extra-actions" class="flex flex-row gap-2 items-center mt-2">
|
5
|
+
{% if cl.is_facets_optional %}
|
6
|
+
{% if cl.add_facets %}
|
7
|
+
<a href="{{ cl.remove_facet_link }}" class="hidelink border flex-grow font-medium px-3 py-2 rounded text-center transition-all w-full hover:bg-base-50 lg:w-auto dark:border-base-700 dark:hover:text-base-200">
|
8
|
+
{% trans "Hide counts" %}
|
9
|
+
</a>
|
10
|
+
{% else %}
|
11
|
+
<a href="{{ cl.add_facet_link }}" class="viewlink border flex-grow font-medium px-3 py-2 rounded text-center transition-all w-full lg:w-auto dark:border-base-700 dark:hover:text-base-200">
|
12
|
+
{% trans "Show counts" %}
|
13
|
+
</a>
|
14
|
+
{% endif %}
|
15
|
+
{% endif %}
|
16
|
+
|
17
|
+
{% if cl.has_active_filters %}
|
18
|
+
<a href="{{ cl.clear_all_filters_qs }}" class="border flex-grow font-medium px-3 py-2 rounded text-center transition-all w-full hover:bg-base-50 lg:w-auto dark:border-base-700 dark:hover:text-base-200">
|
19
|
+
{% trans "Clear all filters" %}
|
20
|
+
</a>
|
21
|
+
{% endif %}
|
22
|
+
</span>
|
23
|
+
{% endif %}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
{% load i18n %}
|
2
2
|
|
3
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
|
4
|
+
<a href="#" class="border cancel-link flex items-center justify-center font-medium px-3 py-2 rounded w-full hover:bg-base-50 lg:block lg:mb-0 lg:w-auto dark:border-base-700 dark:text-font-default-dark dark:hover:text-base-200 dark:hover:bg-base-900">
|
5
5
|
{% translate "No, take me back" %}
|
6
6
|
</a>
|
7
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
|
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 text-white w-full lg:ml-auto lg:w-auto dark:bg-red-500/20 dark:text-red-500">
|
9
9
|
{% translate "Yes, I’m sure" %}
|
10
10
|
</button>
|
11
11
|
</div>
|
@@ -6,12 +6,12 @@
|
|
6
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
7
|
</span>
|
8
8
|
{% else %}
|
9
|
-
<span class="bg-center bg-cover bg-white flex font-medium justify-center overflow-hidden dark:bg-
|
9
|
+
<span class="bg-center bg-cover bg-white flex font-medium justify-center overflow-hidden dark:bg-base-900 dark:border-base-700 {% if value.3.squared %}rounded{% 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
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
11
|
</span>
|
12
12
|
{% endif %}
|
13
13
|
{% elif value.2 %}
|
14
|
-
<span class="bg-white border flex font-medium h-8 justify-center items-center rounded-full text-xs uppercase w-8 dark:bg-
|
14
|
+
<span class="bg-white border flex font-medium h-8 justify-center items-center rounded-full text-xs uppercase w-8 dark:bg-base-900 dark:border-base-700">
|
15
15
|
{{ value.2 }}
|
16
16
|
</span>
|
17
17
|
{% endif %}
|
@@ -22,7 +22,7 @@
|
|
22
22
|
{% endif %}
|
23
23
|
|
24
24
|
{% if value.1 %}
|
25
|
-
<p class="text-
|
25
|
+
<p class="text-base-500">
|
26
26
|
{{ value.1 }}
|
27
27
|
</p>
|
28
28
|
{% endif %}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
{% load i18n unfold %}
|
2
|
+
|
3
|
+
{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}
|
4
|
+
<td class="border-t border-base-200 dark:border-base-800 lg:border-t-0 min-h-[62.5px] delete {% if inline_admin_form.original %}p-3 lg:py-3{% else %}py-3{% endif %} text-left text-red-600 flex items-center before:capitalize before:font-semibold before:content-[attr(data-label)] before:mr-auto before:text-font-important-light before:pr-4 lg:before:hidden font-normal px-3 text-sm lg:align-top lg:table-cell lg:w-px before:dark:text-font-important-dark" data-label="{% trans "Remove" %}">
|
5
|
+
{% if inline_admin_form.original %}
|
6
|
+
<div class="flex flex-row lg:mt-3">
|
7
|
+
<div class="ml-auto">
|
8
|
+
{{ inline_admin_form.deletion_field.field|add_css_class:form_classes.checkbox }}
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
{% endif %}
|
12
|
+
</td>
|
13
|
+
{% endif %}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{% load admin_modify %}
|
2
|
+
{% if inline_admin_form.form.non_field_errors %}
|
3
|
+
<tr class="row-form-errors group inline-tabular">
|
4
|
+
<td colspan="{{ inline_admin_form|cell_count }}">
|
5
|
+
{% include "unfold/helpers/messages/error.html" with errors=inline_admin_form.form.non_field_errors %}
|
6
|
+
</td>
|
7
|
+
</tr>
|
8
|
+
{% endif %}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<div class="flex flex-row gap-3 items-center">
|
2
|
+
{% if forloop.parentloop.counter == 1 and forloop.counter == 1 %}
|
3
|
+
{% if inline_admin_formset.opts.ordering_field %}
|
4
|
+
{% if inline_admin_form.original %}
|
5
|
+
<span class="material-symbols-outlined cursor-pointer" x-sort:handle>drag_indicator</span>
|
6
|
+
{% else %}
|
7
|
+
<span class="-mr-3" x-sort:handle></span>
|
8
|
+
{% endif %}
|
9
|
+
{% endif %}
|
10
|
+
{% endif %}
|
11
|
+
|
12
|
+
{% if field.is_readonly %}
|
13
|
+
{% include "unfold/helpers/field_readonly_value.html" with tabular=1 %}
|
14
|
+
{% else %}
|
15
|
+
{{ field.field }}
|
16
|
+
|
17
|
+
{% if field.field.errors|length > 0 %}
|
18
|
+
<div class="mt-1 text-red-600 text-sm dark:text-red-500">
|
19
|
+
{% for error in field.field.errors %}
|
20
|
+
{{ error }}
|
21
|
+
{% endfor %}
|
22
|
+
</div>
|
23
|
+
{% endif %}
|
24
|
+
{% endif %}
|
25
|
+
</div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{% load i18n %}
|
2
|
+
|
3
|
+
<thead class="hidden lg:table-header-group">
|
4
|
+
<tr>
|
5
|
+
{% for field in inline_admin_formset.fields %}
|
6
|
+
{% if not field.widget.is_hidden %}
|
7
|
+
<th class="column-{{ field.name }}{% if field.required %} required{% endif %} align-middle border-b border-base-200 dark:border-base-800 font-semibold px-1.5 first:pl-3 last:pr-3 py-2 text-left text-font-important-light text-sm whitespace-nowrap dark:text-font-important-dark {% 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 %}">
|
8
|
+
<span class="flex flex-row items-center">
|
9
|
+
{{ field.label|capfirst }}
|
10
|
+
|
11
|
+
{% if field.help_text %}
|
12
|
+
<span class="cursor-pointer material-symbols-outlined ml-2 text-base-400 dark:text-base-500" title="{{ field.help_text|striptags }}">help</span>
|
13
|
+
{% endif %}
|
14
|
+
</span>
|
15
|
+
</th>
|
16
|
+
{% endif %}
|
17
|
+
{% endfor %}
|
18
|
+
|
19
|
+
{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}
|
20
|
+
<th class="align-middle border-b border-base-200 dark:border-base-800 font-semibold px-3 py-2 text-left text-font-important-light text-sm whitespace-nowrap lg:w-px dark:text-font-important-dark">
|
21
|
+
{% translate "Delete?" %}
|
22
|
+
</th>
|
23
|
+
{% endif %}
|
24
|
+
</tr>
|
25
|
+
</thead>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<tr class="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 %}">
|
2
|
+
{% spaceless %}
|
3
|
+
{% for fieldset in inline_admin_form %}
|
4
|
+
{% for line in fieldset %}
|
5
|
+
{% for field in line %}
|
6
|
+
{% if not field.is_readonly and field.field.is_hidden %}
|
7
|
+
{{ field.field }}
|
8
|
+
{% endif %}
|
9
|
+
{% endfor %}
|
10
|
+
{% endfor %}
|
11
|
+
{% endfor %}
|
12
|
+
{% endspaceless %}
|
13
|
+
|
14
|
+
{% for fieldset in inline_admin_form %}
|
15
|
+
{% for line in fieldset %}
|
16
|
+
{% for field in line %}
|
17
|
+
{% if field.is_readonly or not field.field.is_hidden %}
|
18
|
+
<td{% if field.field.name %} class="min-h-[62.5px] 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 %} flex items-center before:capitalize before:font-semibold before:content-[attr(data-label)] before:mr-auto before:font-text before:pr-4 lg:before:hidden font-normal px-3 lg:first:pl-3 lg:last:pr-3 lg:px-1.5 text-left lg:table-cell {% 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 }}">
|
19
|
+
{% include "unfold/helpers/edit_inline/tabular_field.html" %}
|
20
|
+
</td>
|
21
|
+
{% endif %}
|
22
|
+
{% endfor %}
|
23
|
+
{% endfor %}
|
24
|
+
{% endfor %}
|
25
|
+
|
26
|
+
{% include "unfold/helpers/edit_inline/tabular_delete.html" %}
|
27
|
+
</tr>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
{% load admin_modify admin_urls i18n %}
|
2
|
+
|
3
|
+
{% if inline_admin_form.original or inline_admin_form.show_url %}
|
4
|
+
<tr class="border-b border-base-200 dark:border-base-800 bg-base-50 dark:bg-white/[.02] lg:bg-transparent lg:border-0 dark:lg:!bg-transparent">
|
5
|
+
<td class="original" colspan="{{ inline_admin_form|cell_count }}">
|
6
|
+
{% if not inline_admin_formset.opts.hide_title %}
|
7
|
+
{% if inline_admin_form.original or inline_admin_form.show_url %}
|
8
|
+
<p class="flex font-medium items-center px-3 text-xs py-2 lg:pb-0 lg:pt-2">
|
9
|
+
{% if inline_admin_form.original %}
|
10
|
+
<span>
|
11
|
+
{% with inline_title=inline_admin_form.original.get_inline_title %}
|
12
|
+
{% if inline_title %}
|
13
|
+
{{ inline_title }}
|
14
|
+
{% else %}
|
15
|
+
{{ inline_admin_form.original }}
|
16
|
+
{% endif %}
|
17
|
+
{% endwith %}
|
18
|
+
</span>
|
19
|
+
|
20
|
+
{% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %}
|
21
|
+
<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">
|
22
|
+
{% if inline_admin_formset.has_change_permission %}
|
23
|
+
{% translate "Change" %}
|
24
|
+
{% else %}
|
25
|
+
{% translate "View" %}
|
26
|
+
{% endif %}
|
27
|
+
</a>
|
28
|
+
{% endif %}
|
29
|
+
{% endif %}
|
30
|
+
|
31
|
+
{% if inline_admin_form.show_url %}
|
32
|
+
<a href="{{ inline_admin_form.absolute_url }}" class="font-medium ml-2 text-primary-600 dark:text-primary-500">
|
33
|
+
{% translate "View on site" %}
|
34
|
+
</a>
|
35
|
+
{% endif %}
|
36
|
+
</p>
|
37
|
+
{% endif %}
|
38
|
+
{% endif %}
|
39
|
+
|
40
|
+
{% if inline_admin_form.needs_explicit_pk_field %}
|
41
|
+
{{ inline_admin_form.pk_field.field }}
|
42
|
+
{% endif %}
|
43
|
+
|
44
|
+
{% if inline_admin_form.fk_field %}
|
45
|
+
{{ inline_admin_form.fk_field.field }}
|
46
|
+
{% endif %}
|
47
|
+
</td>
|
48
|
+
</tr>
|
49
|
+
{% endif %}
|
@@ -1 +1 @@
|
|
1
|
-
<div class="readonly {% if field.is_json %}max-w-4xl{% else %}max-w-2xl{% endif %} py-2 text-sm *:rounded
|
1
|
+
<div class="readonly break-all {% if field.is_json %}max-w-4xl{% else %}max-w-2xl{% endif %} py-2 text-sm *:rounded {% if not adminform.model_admin.compressed_fields and not field.is_image %}bg-base-50 border font-medium px-3 rounded shadow-sm dark:border-base-700 dark:bg-base-800{% endif %} {% if field.is_image %}inline-block [&_img]:rounded !py-0{% endif %}">{% if value %}{{ value }}{% elif field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>
|
@@ -1,80 +1,12 @@
|
|
1
|
+
{% load unfold %}
|
1
2
|
|
2
|
-
<div class="
|
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 %}
|
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 %}
|
5
|
-
{% if not line.fields|length == 1 %} flex flex-row flex-wrap gap-x-8{% endif %}
|
6
|
-
{% if not line.has_visible_field %} hidden{% endif %}
|
7
|
-
{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}">
|
3
|
+
<div class="{% fieldset_row_classes %} {% if forloop.last %}last{% endif %}">
|
8
4
|
{% for field in line %}
|
9
|
-
<div class="
|
5
|
+
<div class="{% fieldset_line_classes %}">
|
10
6
|
{% if field.is_checkbox %}
|
11
|
-
{%
|
12
|
-
<div class="flex flex-col gap-4 py-2 lg:flex-row">
|
13
|
-
<div class="font-medium flex items-start -ml-2 min-w-32 w-32 lg:min-w-48 lg:w-48">
|
14
|
-
{{ field.label_tag }}
|
15
|
-
</div>
|
16
|
-
|
17
|
-
<div class="flex-grow">
|
18
|
-
<div class="flex flex-col lg:flex-row">
|
19
|
-
{{ field.field }}
|
20
|
-
|
21
|
-
{% if field.field.help_text %}
|
22
|
-
<div class="lg:-mt-2 lg:ml-2">
|
23
|
-
{% include "unfold/helpers/help_text.html" with help_text=field.field.help_text %}
|
24
|
-
</div>
|
25
|
-
{% endif %}
|
26
|
-
</div>
|
27
|
-
|
28
|
-
{% if field.errors %}
|
29
|
-
<div class="mt-1 text-red-600 text-sm dark:text-red-500">
|
30
|
-
{{ field.errors }}
|
31
|
-
</div>
|
32
|
-
{% endif %}
|
33
|
-
</div>
|
34
|
-
</div>
|
35
|
-
{% else %}
|
36
|
-
<div class="flex flex-row">
|
37
|
-
{{ field.field }}
|
38
|
-
|
39
|
-
<div class="flex flex-col">
|
40
|
-
{{ field.label_tag }}
|
41
|
-
|
42
|
-
{% if field.field.help_text %}
|
43
|
-
<div class="ml-2 -mt-1">
|
44
|
-
{% include "unfold/helpers/help_text.html" with help_text=field.field.help_text %}
|
45
|
-
</div>
|
46
|
-
{% endif %}
|
47
|
-
|
48
|
-
{% if field.errors %}
|
49
|
-
<div class="mt-1 text-red-600 text-sm dark:text-red-500">
|
50
|
-
{{ field.errors }}
|
51
|
-
</div>
|
52
|
-
{% endif %}
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
{% endif %}
|
7
|
+
{% include "unfold/helpers/fieldset_row_checkbox.html" %}
|
56
8
|
{% else %}
|
57
|
-
|
58
|
-
{{ field.label_tag }}
|
59
|
-
</div>
|
60
|
-
|
61
|
-
<div class="flex-grow">
|
62
|
-
{% if field.is_readonly %}
|
63
|
-
{% include "unfold/helpers/field_readonly_value.html" %}
|
64
|
-
{% else %}
|
65
|
-
{{ field.field }}
|
66
|
-
{% endif %}
|
67
|
-
|
68
|
-
{% if field.field.help_text and not field.is_checkbox %}
|
69
|
-
{% include "unfold/helpers/help_text.html" with help_text=field.field.help_text %}
|
70
|
-
{% endif %}
|
71
|
-
|
72
|
-
{% if field.errors %}
|
73
|
-
<div class="mt-1 text-red-600 text-sm dark:text-red-500">
|
74
|
-
{{ field.errors }}
|
75
|
-
</div>
|
76
|
-
{% endif %}
|
77
|
-
</div>
|
9
|
+
{% include "unfold/helpers/fieldset_row_field.html" %}
|
78
10
|
{% endif %}
|
79
11
|
</div>
|
80
12
|
{% endfor %}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
{% if adminform.model_admin.compressed_fields %}
|
2
|
+
<div class="flex flex-col gap-4 py-2 lg:flex-row">
|
3
|
+
<div class="font-medium flex items-start -ml-2 min-w-32 w-32 lg:min-w-48 lg:w-48">
|
4
|
+
{{ field.label_tag }}
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="flex-grow">
|
8
|
+
<div class="flex flex-col lg:flex-row">
|
9
|
+
{{ field.field }}
|
10
|
+
|
11
|
+
{% if field.field.help_text %}
|
12
|
+
<div class="lg:-mt-2 lg:ml-2">
|
13
|
+
{% include "unfold/helpers/help_text.html" with help_text=field.field.help_text %}
|
14
|
+
</div>
|
15
|
+
{% endif %}
|
16
|
+
</div>
|
17
|
+
|
18
|
+
{% if field.errors %}
|
19
|
+
<div class="mt-1 text-red-600 text-sm dark:text-red-500">
|
20
|
+
{{ field.errors }}
|
21
|
+
</div>
|
22
|
+
{% endif %}
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
{% else %}
|
26
|
+
<div class="flex flex-row">
|
27
|
+
{{ field.field }}
|
28
|
+
|
29
|
+
<div class="flex flex-col">
|
30
|
+
{{ field.label_tag }}
|
31
|
+
|
32
|
+
{% if field.field.help_text %}
|
33
|
+
<div class="ml-2 -mt-1">
|
34
|
+
{% include "unfold/helpers/help_text.html" with help_text=field.field.help_text %}
|
35
|
+
</div>
|
36
|
+
{% endif %}
|
37
|
+
|
38
|
+
{% if field.errors %}
|
39
|
+
<div class="mt-1 text-red-600 text-sm dark:text-red-500">
|
40
|
+
{{ field.errors }}
|
41
|
+
</div>
|
42
|
+
{% endif %}
|
43
|
+
</div>
|
44
|
+
</div>
|
45
|
+
{% endif %}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<div class="{% if adminform.model_admin.compressed_fields %}lg:min-w-48 lg:mt-2 lg:w-48{% endif %}">
|
2
|
+
{{ field.label_tag }}
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<div class="flex-grow">
|
6
|
+
{% if field.is_readonly %}
|
7
|
+
{% include "unfold/helpers/field_readonly_value.html" %}
|
8
|
+
{% else %}
|
9
|
+
{{ field.field }}
|
10
|
+
{% endif %}
|
11
|
+
|
12
|
+
{% if field.field.help_text and not field.is_checkbox %}
|
13
|
+
{% include "unfold/helpers/help_text.html" with help_text=field.field.help_text %}
|
14
|
+
{% endif %}
|
15
|
+
|
16
|
+
{% if field.errors %}
|
17
|
+
<div class="mt-1 text-red-600 text-sm dark:text-red-500">
|
18
|
+
{{ field.errors }}
|
19
|
+
</div>
|
20
|
+
{% endif %}
|
21
|
+
</div>
|
@@ -3,10 +3,10 @@
|
|
3
3
|
{% with tabs=adminform|tabs %}
|
4
4
|
{% if tabs %}
|
5
5
|
<div x-data="{openTab: null}" x-show="activeTab == 'general'">
|
6
|
-
<ul class="bg-
|
6
|
+
<ul class="bg-base-100 flex gap-10 mb-6 px-4 py-3 rounded text-font-default-light lg:-mx-4 dark:bg-white/[.02] dark:text-font-default-dark">
|
7
7
|
{% for fieldset in tabs %}
|
8
8
|
<li>
|
9
|
-
<a class="cursor-pointer font-semibold hover:text-
|
9
|
+
<a class="cursor-pointer font-semibold hover:text-base-700 dark:hover:text-white"
|
10
10
|
x-on:click="openTab = '{{ forloop.counter0 }}-{{ fieldset.name|slugify }}'"
|
11
11
|
x-bind:class="openTab == '{{ forloop.counter0 }}-{{ fieldset.name|slugify }}'{% if forloop.first %} || openTab == null{% endif %} ? 'text-font-important-light dark:text-font-important-dark' : ''">
|
12
12
|
{{ fieldset.name }}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{% if not is_popup %}
|
2
2
|
{% block header %}
|
3
|
-
<div class="border-b border-
|
3
|
+
<div class="border-b border-base-200 mb-6 px-4 lg:px-8 dark:border-base-800">
|
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">
|
@@ -4,14 +4,14 @@
|
|
4
4
|
|
5
5
|
{% if admin_log %}
|
6
6
|
<div id="content-related" class="lg:w-96">
|
7
|
-
<div id="recent-actions-module" class="module bg-
|
8
|
-
<h2 class="mb-3 font-semibold text-
|
7
|
+
<div id="recent-actions-module" class="module bg-base-50 rounded p-3 dark:bg-base-800">
|
8
|
+
<h2 class="mb-3 font-semibold text-base-900 dark:text-base-100">
|
9
9
|
{% translate 'Recent actions' %}
|
10
10
|
</h2>
|
11
11
|
|
12
12
|
<ul class="actionlist">
|
13
13
|
{% for entry in admin_log %}
|
14
|
-
<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %} border border-
|
14
|
+
<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %} border border-base-400/10 bg-white mb-3 p-3 rounded shadow-sm last:mb-0 dark:bg-base-900">
|
15
15
|
<div class="mb-3 overflow-hidden text-ellipsis whitespace-nowrap">
|
16
16
|
{% if entry.is_deletion or not entry.get_admin_url %}
|
17
17
|
{{ entry.object_repr }}
|
@@ -20,7 +20,7 @@
|
|
20
20
|
{% endif %}
|
21
21
|
</div>
|
22
22
|
|
23
|
-
<div class="border-
|
23
|
+
<div class="border-base-100 border-t flex pt-3 dark:border-base-800">
|
24
24
|
<div>
|
25
25
|
{% if entry.content_type %}
|
26
26
|
{% filter capfirst %}{{ entry.content_type.name }}{% endfilter %}
|
@@ -10,7 +10,7 @@
|
|
10
10
|
{% elif type == 'primary' %}
|
11
11
|
bg-primary-100 text-primary-700 dark:bg-primary-500/20 dark:text-primary-400
|
12
12
|
{% else %}
|
13
|
-
bg-
|
13
|
+
bg-base-100 text-base-700 dark:bg-base-500/20 dark:text-base-200
|
14
14
|
{% endif %}">
|
15
15
|
{{ text }}
|
16
16
|
</span>
|
@@ -6,11 +6,11 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
<div class="relative" x-data="{ openLanguageLinks: false }">
|
9
|
-
<a class="block cursor-pointer hover:text-
|
9
|
+
<a class="block cursor-pointer h-4.5 hover:text-base-700 dark:hover:text-base-200" x-on:click="openLanguageLinks = !openLanguageLinks">
|
10
10
|
<span class="material-symbols-outlined">translate</span>
|
11
11
|
</a>
|
12
12
|
|
13
|
-
<div class="absolute bg-white border flex flex-col leading-none py-1 -right-2 rounded shadow-lg top-7 w-52 z-50 dark:bg-
|
13
|
+
<div class="absolute bg-white border flex flex-col leading-none py-1 -right-2 rounded shadow-lg top-7 w-52 z-50 dark:bg-base-800 dark:border-base-700" x-cloak x-show="openLanguageLinks" @click.outside="openLanguageLinks = false">
|
14
14
|
{% for language in languages %}
|
15
15
|
<form action="{% url 'set_language' %}" method="post" class="flex w-full">
|
16
16
|
{% csrf_token %}
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<input name="next" type="hidden" value="{{ redirect_to }}">
|
19
19
|
<input name="language" type="hidden" value="{{ language.code }}">
|
20
20
|
|
21
|
-
<button type="submit" class="block flex-grow mx-1 px-3 py-2 rounded text-left hover:bg-
|
21
|
+
<button type="submit" class="block flex-grow mx-1 px-3 py-2 rounded text-left hover:bg-base-100 hover:text-base-700 dark:hover:bg-base-700 dark:hover:text-base-200 {% if language.code == LANGUAGE_CODE %}text-primary-600 dark:text-primary-500 dark:hover:!text-primary-500 hover:!text-primary-600{% endif %}">
|
22
22
|
{{ language.name_local }} ({{ language.code }})
|
23
23
|
</button>
|
24
24
|
</form>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{% load i18n %}
|
2
2
|
|
3
3
|
{% if errors or error or message %}
|
4
|
-
<div class="errornote mb-3 px-3 py-3 rounded
|
4
|
+
<div class="errornote mb-3 px-3 py-3 rounded group-[.inline-tabular]:mb-0 group-[.inline-tabular]:mt-3 group-[.inline-tabular]:mx-3 group-[.inline-stacked]:mb-3 group-[.inline-stacked]:mt-3 group-[.inline-stacked]:mx-3 bg-red-100 text-red-700 dark:bg-red-500/20 dark:text-red-400">
|
5
5
|
{% if error %}
|
6
6
|
{{ error }}
|
7
7
|
{% elif message %}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{% load i18n %}
|
2
2
|
|
3
3
|
{% if errors %}
|
4
|
-
<p class="errornote bg-red-100 mb-8 text-red-600 px-3 py-3 rounded
|
4
|
+
<p class="errornote bg-red-100 mb-8 text-red-600 px-3 py-3 rounded text-sm dark:bg-red-500/20 dark:border-red-500/20 dark:text-red-500">
|
5
5
|
{% if errors.items|length == 1 %}
|
6
6
|
{% translate "Please correct the error below." %}
|
7
7
|
{% else %}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<p class="mb-3 px-3 py-3 rounded
|
1
|
+
<p class="mb-3 px-3 py-3 rounded text-sm last:mb-8 bg-orange-100 text-orange-700 dark:bg-orange-500/20 dark:text-orange-400">
|
2
2
|
{{ message }}
|
3
3
|
</p>
|
@@ -1,17 +1,9 @@
|
|
1
1
|
{% load i18n %}
|
2
2
|
|
3
3
|
<div class="relative min-w-sidebar transition-width w-sidebar z-30">
|
4
|
-
<nav id="nav-sidebar" class="bg-
|
5
|
-
<div class="flex flex-col min-h-screen min-w-sidebar dark:bg-
|
6
|
-
|
7
|
-
<div class="flex font-semibold h-10 items-center px-6 text-font-important-light tracking-tight dark:text-font-important-dark xl:text-base">
|
8
|
-
{% if site_logo %}
|
9
|
-
{% include "unfold/helpers/site_logo.html" %}
|
10
|
-
{% elif branding %}
|
11
|
-
{% include "unfold/helpers/site_icon.html" %}
|
12
|
-
{% endif %}
|
13
|
-
</div>
|
14
|
-
</div>
|
4
|
+
<nav id="nav-sidebar" class="bg-base-50 border-r border-base-200 bottom-0 fixed max-h-screen top-0 transition-width w-sidebar dark:bg-base-900 dark:border-base-800">
|
5
|
+
<div class="flex flex-col min-h-screen min-w-sidebar dark:bg-base-950/20">
|
6
|
+
{% include "unfold/helpers/navigation_header.html" %}
|
15
7
|
|
16
8
|
{% include "unfold/helpers/search.html" %}
|
17
9
|
|