django-unfold 0.33.0__py3-none-any.whl → 0.35.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.33.0.dist-info → django_unfold-0.35.0.dist-info}/METADATA +33 -5
- {django_unfold-0.33.0.dist-info → django_unfold-0.35.0.dist-info}/RECORD +74 -73
- unfold/admin.py +12 -14
- unfold/contrib/filters/admin.py +34 -1
- unfold/contrib/filters/forms.py +36 -3
- 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 +1 -1
- unfold/contrib/guardian/templates/unfold/guardian/group_form.html +10 -10
- unfold/contrib/guardian/templates/unfold/guardian/user_form.html +10 -10
- unfold/contrib/import_export/templates/admin/import_export/import_confirm.html +1 -1
- unfold/contrib/import_export/templates/admin/import_export/import_errors.html +3 -3
- unfold/contrib/import_export/templates/admin/import_export/import_preview.html +6 -6
- unfold/contrib/import_export/templates/admin/import_export/import_validation.html +8 -8
- unfold/contrib/simple_history/templates/simple_history/object_history_list.html +18 -18
- unfold/decorators.py +2 -2
- unfold/fields.py +2 -2
- unfold/forms.py +2 -1
- unfold/static/unfold/css/styles.css +1 -1
- unfold/static/unfold/js/app.js +23 -0
- unfold/static/unfold/js/select2.init.js +15 -0
- unfold/styles.css +6 -10
- unfold/templates/admin/actions.html +14 -12
- unfold/templates/admin/app_list.html +3 -5
- unfold/templates/admin/change_form.html +1 -1
- unfold/templates/admin/change_list.html +4 -4
- unfold/templates/admin/change_list_results.html +4 -4
- unfold/templates/admin/delete_confirmation.html +9 -9
- unfold/templates/admin/delete_selected_confirmation.html +9 -9
- unfold/templates/admin/edit_inline/stacked.html +64 -58
- unfold/templates/admin/edit_inline/tabular.html +11 -11
- unfold/templates/admin/filter.html +5 -5
- unfold/templates/admin/includes/object_delete_summary.html +2 -2
- unfold/templates/admin/object_history.html +9 -9
- unfold/templates/admin/pagination.html +3 -3
- unfold/templates/admin/submit_line.html +7 -7
- unfold/templates/unfold/change_list_filter.html +3 -3
- unfold/templates/unfold/components/progress.html +1 -1
- unfold/templates/unfold/components/table.html +4 -4
- unfold/templates/unfold/components/title.html +1 -1
- unfold/templates/unfold/helpers/account_links.html +2 -2
- unfold/templates/unfold/helpers/actions_row.html +14 -12
- unfold/templates/unfold/helpers/add_link.html +2 -2
- unfold/templates/unfold/helpers/app_list.html +7 -7
- unfold/templates/unfold/helpers/app_list_default.html +7 -7
- unfold/templates/unfold/helpers/breadcrumb_item.html +1 -1
- unfold/templates/unfold/helpers/display_header.html +4 -2
- unfold/templates/unfold/helpers/field_readonly_value.html +1 -1
- unfold/templates/unfold/helpers/fieldset_row.html +1 -1
- unfold/templates/unfold/helpers/fieldsets_tabs.html +1 -1
- unfold/templates/unfold/helpers/help_text.html +1 -1
- unfold/templates/unfold/helpers/history.html +3 -3
- unfold/templates/unfold/helpers/label.html +6 -6
- unfold/templates/unfold/helpers/messages.html +12 -1
- unfold/templates/unfold/helpers/navigation.html +1 -1
- unfold/templates/unfold/helpers/search_results.html +2 -2
- unfold/templates/unfold/helpers/site_icon.html +1 -1
- unfold/templates/unfold/helpers/tab_action.html +1 -1
- unfold/templates/unfold/helpers/tab_list.html +9 -5
- unfold/templates/unfold/helpers/theme_switch.html +2 -2
- unfold/templates/unfold/helpers/welcomemsg.html +5 -3
- unfold/templates/unfold/layouts/skeleton.html +2 -2
- unfold/templates/unfold/widgets/clearable_file_input.html +2 -2
- unfold/templates/unfold/widgets/clearable_file_input_small.html +2 -2
- unfold/templates/unfold/widgets/foreign_key_raw_id.html +8 -4
- unfold/templates/unfold/widgets/radio_option.html +1 -1
- unfold/templates/unfold/widgets/split_datetime.html +2 -2
- unfold/templates/unfold/widgets/split_datetime_vertical.html +2 -2
- unfold/templatetags/unfold_list.py +6 -7
- unfold/widgets.py +21 -6
- {django_unfold-0.33.0.dist-info → django_unfold-0.35.0.dist-info}/LICENSE.md +0 -0
- {django_unfold-0.33.0.dist-info → django_unfold-0.35.0.dist-info}/WHEEL +0 -0
@@ -6,19 +6,19 @@
|
|
6
6
|
<div class="container flex flex-col-reverse gap-3 items-center mx-auto lg:flex-row-reverse">
|
7
7
|
{% block submit-row %}
|
8
8
|
{% if show_save %}
|
9
|
-
<button type="submit" name="_save" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded-md text-
|
9
|
+
<button type="submit" name="_save" class="bg-primary-600 block border border-transparent font-medium px-3 py-2 rounded-md text-white w-full lg:w-auto">
|
10
10
|
{% translate 'Save' %}
|
11
11
|
</button>
|
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
|
15
|
+
<button type="submit" {% if not action.attrs.name %}name="{{ action.action_name }}"{% endif %} class="border font-medium px-3 py-2 rounded-md transition-all w-full hover:bg-gray-50 lg:w-auto dark:border-gray-700 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
|
21
|
+
<button type="submit" name="_continue" class="border font-medium hidden px-3 py-2 rounded-md transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
22
22
|
{% if can_change %}
|
23
23
|
{% translate 'Save and continue editing' %}
|
24
24
|
{% else %}
|
@@ -30,19 +30,19 @@
|
|
30
30
|
{% if show_close %}
|
31
31
|
{% url opts|admin_urlname:'changelist' as changelist_url %}
|
32
32
|
|
33
|
-
<a href="{% add_preserved_filters changelist_url %}" class="border font-medium hidden px-3 py-2 rounded-md
|
33
|
+
<a href="{% add_preserved_filters changelist_url %}" class="border font-medium hidden px-3 py-2 rounded-md transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
34
34
|
{% translate 'Close' %}
|
35
35
|
</a>
|
36
36
|
{% endif %}
|
37
37
|
|
38
38
|
{% if show_save_and_add_another %}
|
39
|
-
<button type="submit" name="_addanother" class="border font-medium hidden px-3 py-2 rounded-md
|
39
|
+
<button type="submit" name="_addanother" class="border font-medium hidden px-3 py-2 rounded-md transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
40
40
|
{% translate 'Save and add another' %}
|
41
41
|
</button>
|
42
42
|
{% endif %}
|
43
43
|
|
44
44
|
{% if show_save_as_new %}
|
45
|
-
<button type="submit" name="_saveasnew" class="border font-medium px-3 py-2 rounded-md
|
45
|
+
<button type="submit" name="_saveasnew" class="border font-medium hidden px-3 py-2 rounded-md transition-all w-full hover:bg-gray-50 lg:block lg:w-auto dark:border-gray-700 dark:hover:text-gray-200 dark:hover:bg-gray-900">
|
46
46
|
{% translate 'Save as new' %}
|
47
47
|
</button>
|
48
48
|
{% endif %}
|
@@ -51,7 +51,7 @@
|
|
51
51
|
{% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %}
|
52
52
|
|
53
53
|
<p class="deletelink-box mr-auto w-full lg:w-auto">
|
54
|
-
<a href="{% add_preserved_filters delete_url %}" class="block border border-red-500 font-medium px-3 py-2 rounded-md text-center text-
|
54
|
+
<a href="{% add_preserved_filters delete_url %}" class="block border border-red-500 font-medium px-3 py-2 rounded-md text-center text-red-500 whitespace-nowrap dark:border-transparent dark:bg-red-500/20 dark:text-red-500">
|
55
55
|
{% translate "Delete" %} {{ opts.verbose_name }}
|
56
56
|
</a>
|
57
57
|
</p>
|
@@ -5,16 +5,16 @@
|
|
5
5
|
|
6
6
|
<div class="bg-white flex mr-4 my-4 overflow-hidden rounded shadow-sm w-96 dark:bg-gray-800" x-on:click.outside="filterOpen = false">
|
7
7
|
<div class="flex-grow h-full overflow-auto relative">
|
8
|
-
<h3 class="border-b flex font-
|
8
|
+
<h3 class="border-b flex font-semibold mb-6 px-6 py-4 text-gray-900 text-sm dark:text-gray-100 dark:border-gray-700">
|
9
9
|
{% trans "Filter results" %}
|
10
10
|
|
11
11
|
{% if cl.has_active_filters %}
|
12
|
-
<a href="{{ cl.clear_all_filters_qs }}" class="font-normal ml-3 text-sm text-red-600
|
12
|
+
<a href="{{ cl.clear_all_filters_qs }}" class="font-normal ml-3 text-sm text-red-600 dark:text-red-500">
|
13
13
|
{% translate "Clear all filters" %}
|
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-
|
17
|
+
<a class="cursor-pointer material-symbols-outlined md-18 ml-auto pl-4 text-gray-400 transition-colors hover:text-gray-500 dark:text-gray-500 dark:hover:text-gray-400" x-on:click="filterOpen = false">
|
18
18
|
close
|
19
19
|
</a>
|
20
20
|
</h3>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
{% load unfold %}
|
2
2
|
|
3
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
|
4
|
+
<table class="block border-gray-200 border-spacing-none border-separate w-full lg:table">
|
5
5
|
{% if table.headers %}
|
6
|
-
<thead>
|
6
|
+
<thead class="text-gray-900 dark:text-gray-100">
|
7
7
|
<tr class="bg-gray-50 dark:bg-white/[.02]">
|
8
8
|
{% for header in table.headers %}
|
9
|
-
<th class="align-middle font-
|
9
|
+
<th class="align-middle font-semibold py-2 text-left 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
10
|
{{ header }}
|
11
11
|
</th>
|
12
12
|
{% endfor %}
|
@@ -19,7 +19,7 @@
|
|
19
19
|
{% for row in table.rows %}
|
20
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
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
|
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 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-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
23
|
{{ cell }}
|
24
24
|
</td>
|
25
25
|
{% endfor %}
|
@@ -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:
|
4
|
+
<a class="block cursor-pointer hover:text-gray-700 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
|
8
|
+
<nav class="absolute bg-white border flex flex-col leading-none overflow-hidden py-1 -right-2 rounded shadow-lg top-7 w-52 z-50 dark:bg-gray-800 dark:border-gray-700" 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 %}
|
@@ -2,18 +2,20 @@
|
|
2
2
|
|
3
3
|
{% if actions %}
|
4
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
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
{% with action_id=instance_pk|cut:"-" %}
|
6
|
+
<div class="group leading-none relative" x-data="{ openActionsId{{ action_id }}: false }">
|
7
|
+
<span x-ref="rowDropdown{{ action_id }}" 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{{ action_id }} = !openActionsId{{ action_id }}">
|
8
|
+
more_horiz
|
9
|
+
</span>
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
<nav x-anchor.offset.4="$refs.rowDropdown{{ action_id }}" class="bg-white border flex flex-col leading-none py-1 rounded-md shadow-lg text-sm top-7 z-50 w-48 dark:bg-gray-800 dark:border-gray-700" x-cloak x-show="openActionsId{{ action_id }}" @click.outside="openActionsId{{ action_id }} = false">
|
12
|
+
{% for action in actions %}
|
13
|
+
<a href="{% url action.raw_path instance_pk %}" class="mx-1 px-3 py-2 rounded-md truncate 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 %}>
|
14
|
+
{{ action.title }}
|
15
|
+
</a>
|
16
|
+
{% endfor %}
|
17
|
+
</nav>
|
18
|
+
</div>
|
19
|
+
{% endwith %}
|
18
20
|
</td>
|
19
21
|
{% endif %}
|
@@ -9,11 +9,11 @@
|
|
9
9
|
{% endif %}
|
10
10
|
|
11
11
|
{% if add_url %}
|
12
|
-
<
|
12
|
+
<div class="flex flex-row items-center">
|
13
13
|
<span class="block bg-gray-200 h-5 mx-4 w-px dark:bg-gray-700"></span>
|
14
14
|
|
15
15
|
<a href="{% add_preserved_filters add_url is_popup to_field %}" class="addlink bg-primary-600 flex items-center h-9 justify-center -my-1 rounded-full w-9" title="{{ title }}">
|
16
16
|
<span class="material-symbols-outlined text-white">add</span>
|
17
17
|
</a>
|
18
|
-
</
|
18
|
+
</div>
|
19
19
|
{% endif %}
|
@@ -12,7 +12,7 @@
|
|
12
12
|
{% endif %}
|
13
13
|
|
14
14
|
{% if group.title %}
|
15
|
-
<
|
15
|
+
<h2 class="font-semibold flex flex-row items-center mb-1 mx-3 py-1.5 px-3 select-none text-gray-900 text-sm dark:text-gray-100 {% if group.collapsible %}cursor-pointer{% endif %}" {% if group.collapsible %}x-on:click="navigationOpen = !navigationOpen"{% endif %}>
|
16
16
|
{{ group.title }}
|
17
17
|
|
18
18
|
{% if group.collapsible %}
|
@@ -20,14 +20,14 @@
|
|
20
20
|
chevron_right
|
21
21
|
</span>
|
22
22
|
{% endif %}
|
23
|
-
</
|
23
|
+
</h2>
|
24
24
|
{% endif %}
|
25
25
|
|
26
26
|
<ol class="px-6" {% if group.collapsible %}x-show="navigationOpen"{% endif %}>
|
27
27
|
{% for item in group.items %}
|
28
28
|
{% if item.has_permission %}
|
29
29
|
<li>
|
30
|
-
<a href="{% if item.link_callback %}{{ item.link_callback }}{% else %}{{ item.link }}{% endif %}" class="
|
30
|
+
<a href="{% if item.link_callback %}{{ item.link_callback }}{% else %}{{ item.link }}{% endif %}" class="flex h-11 items-center -mx-3 px-3 py-2 rounded-md {% if item.active %}bg-gray-100 font-semibold text-primary-600 dark:bg-white/[.06] dark:text-primary-500{% else %} hover:text-gray-700 hover:dark:text-gray-200{% endif %}">
|
31
31
|
{% if item.icon %}
|
32
32
|
<span class="material-symbols-outlined md-18 mr-3 w-4.5">
|
33
33
|
{{ item.icon }}
|
@@ -59,7 +59,7 @@
|
|
59
59
|
|
60
60
|
{% if sidebar_show_all_applications %}
|
61
61
|
<div class="mt-auto" x-data="{ openAllApplications: false }">
|
62
|
-
<a class="cursor-pointer flex items-center px-6 py-3 text-
|
62
|
+
<a class="cursor-pointer flex items-center px-6 py-3 text-sm hover:text-gray-700 dark:text-gray-300 hover:dark:text-gray-200" x-on:click="openAllApplications = !openAllApplications">
|
63
63
|
<span class="material-symbols-outlined md-18 mr-3">
|
64
64
|
apps
|
65
65
|
</span>
|
@@ -75,14 +75,14 @@
|
|
75
75
|
<div class="bg-white flex flex-col h-full overflow-x-hidden overflow-y-auto py-5 px-8 relative text-sm w-80 z-20 dark:bg-gray-900 dark:border-r dark:border-gray-800" x-on:click.outside="openAllApplications = false" x-on:keydown.escape.window="openAllApplications = false">
|
76
76
|
{% for app in app_list %}
|
77
77
|
<div class="mb-6 last:mb-0">
|
78
|
-
<
|
78
|
+
<h2 class="mb-4 font-semibold text-gray-900 truncate dark:text-gray-100">
|
79
79
|
{{ app.name }}
|
80
|
-
</
|
80
|
+
</h2>
|
81
81
|
|
82
82
|
<ul>
|
83
83
|
{% for model in app.models %}
|
84
84
|
<li class="block mb-4 last:mb-0">
|
85
|
-
<a href="{{ model.admin_url }}" class="block
|
85
|
+
<a href="{{ model.admin_url }}" class="block truncate hover:text-gray-700 dark:hover:text-gray-200">
|
86
86
|
{{ model.name }}
|
87
87
|
</a>
|
88
88
|
</li>
|
@@ -4,8 +4,8 @@
|
|
4
4
|
{% for app in app_list %}
|
5
5
|
<div class="app-{{ app.app_label }} module{% if app.app_url in request.path %} current-app{% endif %}">
|
6
6
|
<div class="bg-gray-50 mb-6 rounded-md p-3 dark:bg-gray-800">
|
7
|
-
<table class="border border-gray-400/10 border-spacing-none border-separate rounded-md overflow-hidden shadow-sm
|
8
|
-
<caption class="font-semibold mb-3 text-gray-
|
7
|
+
<table class="border border-gray-400/10 border-spacing-none border-separate rounded-md overflow-hidden shadow-sm w-full dark:border-gray-800">
|
8
|
+
<caption class="font-semibold mb-3 text-gray-900 text-left dark:text-gray-100">
|
9
9
|
<a href="{{ app.app_url }}" class="section" title="{% blocktranslate with name=app.name %}Models in the {{ name }} application{% endblocktranslate %}">
|
10
10
|
{{ app.name }}
|
11
11
|
</a>
|
@@ -14,13 +14,13 @@
|
|
14
14
|
{% for model in app.models %}
|
15
15
|
<tr class="bg-white dark:bg-gray-900 model-{{ model.object_name|lower }}{% if model.admin_url in request.path %} current-model{% endif %}">
|
16
16
|
{% if model.admin_url %}
|
17
|
-
<th scope="row" class="font-normal p-3 text-left
|
17
|
+
<th scope="row" class="font-normal p-3 text-left {% if not forloop.last %}border-b border-gray-100 dark:border-gray-800{% endif %}">
|
18
18
|
<a href="{{ model.admin_url }}"{% if model.admin_url in request.path %} aria-current="page"{% endif %}>
|
19
19
|
{{ model.name }}
|
20
20
|
</a>
|
21
21
|
</th>
|
22
22
|
{% else %}
|
23
|
-
<th scope="row" class="font-normal p-3 text-left
|
23
|
+
<th scope="row" class="font-normal p-3 text-left {% 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
|
31
|
+
<a href="{{ model.add_url }}" class="addlink block leading-none text-gray-400 transition-colors dark:text-gray-500 " 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
|
38
|
+
<a href="{{ model.admin_url }}" class="viewlink block leading-none text-gray-400 transition-colors dark:text-gray-500" 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
|
42
|
+
<a href="{{ model.admin_url }}" class="changelink block leading-none text-gray-400 transition-colors dark:text-gray-300" title="{% translate 'Change' %}">
|
43
43
|
<span class="material-symbols-outlined">edit_square</span>
|
44
44
|
</a>
|
45
45
|
{% endif %}
|
@@ -1,7 +1,9 @@
|
|
1
|
+
{% load i18n %}
|
2
|
+
|
1
3
|
<span class="flex gap-4 items-center">
|
2
4
|
{% if value.3 and value.3.path %}
|
3
5
|
<span class="bg-center bg-cover bg-white flex font-medium justify-center overflow-hidden dark:bg-gray-900 dark:border-gray-700 {% if value.3.squared %}rounded-sm{% else %}rounded-full{% endif %}{% if not value.3.borderless %} border{% endif %}{% if not value.3.width or not value.3.height %} h-8 max-w-8 min-w-8{% endif %}">
|
4
|
-
<img loading="lazy" src="{{ value.3.path }}" class="object-cover" {% if value.3.width %}width="{{ value.3.width }}"{% endif %} {% if value.3.height %}height="{{ value.3.height }}"{% endif %}/>
|
6
|
+
<img loading="lazy" src="{{ value.3.path }}" class="object-cover" {% if value.3.width %}width="{{ value.3.width }}"{% endif %} {% if value.3.height %}height="{{ value.3.height }}"{% endif %} alt="{% trans "Record picture" %}" />
|
5
7
|
</span>
|
6
8
|
{% elif value.2 %}
|
7
9
|
<span class="bg-white border flex font-medium h-8 justify-center items-center rounded-full text-xs uppercase w-8 dark:bg-gray-900 dark:border-gray-700">
|
@@ -11,7 +13,7 @@
|
|
11
13
|
|
12
14
|
<span class="flex flex-col text-right lg:text-left">
|
13
15
|
{% if value.0 %}
|
14
|
-
<
|
16
|
+
<strong class="block font-normal">{{ value.0 }}</strong>
|
15
17
|
{% endif %}
|
16
18
|
|
17
19
|
{% if value.1 %}
|
@@ -1 +1 @@
|
|
1
|
-
<div class="readonly
|
1
|
+
<div class="readonly max-w-4xl py-2 text-sm *:rounded-md {% if not adminform.model_admin.compressed_fields and not field.is_image %}bg-gray-50 border font-medium px-3 rounded-md shadow-sm dark:border-gray-700 dark:bg-gray-800{% endif %} {% if field.is_image %}inline-block [&_img]:rounded-md !py-0{% endif %}">{% if value %}{{ value }}{% elif field.contents %}{{ field.contents }}{% else %}-{% endif %}</div>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<div class="flex group {% if adminform.model_admin.compressed_fields %} field-row{% endif %}{% if not line.fields|length == 1 and not adminform.model_admin.compressed_fields %} lg:max-w-xs flex-grow{% endif %}{% if field.errors %} errors {% endif %}{% if not forloop.parentloop.last %} {% if adminform.model_admin.compressed_fields %}mb-3{% else %}mb-6{% endif %}{% else %} pb-3{% endif %} {% if adminform.model_admin.compressed_fields %}flex-col lg:flex-row lg:gap-2 {% else %}flex-col{% endif %}">
|
8
8
|
{% if field.is_checkbox %}
|
9
9
|
{% if adminform.model_admin.compressed_fields %}
|
10
|
-
<div class="flex flex-
|
10
|
+
<div class="flex flex-col gap-4 py-2 lg:flex-row">
|
11
11
|
<div class="font-medium flex items-start -ml-2 min-w-32 w-32 lg:min-w-48 lg:w-48">
|
12
12
|
{{ field.label_tag }}
|
13
13
|
</div>
|
@@ -3,7 +3,7 @@
|
|
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-gray-100 border border-transparent flex gap-10 mb-6 px-4 py-3 rounded-md text-gray-
|
6
|
+
<ul class="bg-gray-100 border border-transparent flex gap-10 mb-6 px-4 py-3 rounded-md text-gray-500 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"
|
@@ -5,14 +5,14 @@
|
|
5
5
|
{% if admin_log %}
|
6
6
|
<div id="content-related" class="lg:w-96">
|
7
7
|
<div id="recent-actions-module" class="module bg-gray-50 rounded-md p-3 dark:bg-gray-800">
|
8
|
-
<h2 class="mb-3 font-semibold text-gray-
|
8
|
+
<h2 class="mb-3 font-semibold text-gray-900 dark:text-gray-100">
|
9
9
|
{% translate 'Recent actions' %}
|
10
10
|
</h2>
|
11
11
|
|
12
12
|
<ul class="actionlist">
|
13
13
|
{% for entry in admin_log %}
|
14
14
|
<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %} border border-gray-400/10 bg-white mb-3 p-3 rounded-md shadow-sm last:mb-0 dark:bg-gray-900">
|
15
|
-
<div class="mb-3
|
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 }}
|
18
18
|
{% else %}
|
@@ -20,7 +20,7 @@
|
|
20
20
|
{% endif %}
|
21
21
|
</div>
|
22
22
|
|
23
|
-
<div class="border-gray-100 border-t flex pt-3
|
23
|
+
<div class="border-gray-100 border-t flex pt-3 dark:border-gray-800">
|
24
24
|
<div>
|
25
25
|
{% if entry.content_type %}
|
26
26
|
{% filter capfirst %}{{ entry.content_type.name }}{% endfilter %}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
<span class="inline-block font-semibold leading-normal px-2 py-1 rounded text-xxs uppercase whitespace-nowrap
|
2
2
|
{% if type == 'info' %}
|
3
|
-
bg-blue-100 text-blue-
|
3
|
+
bg-blue-100 text-blue-700 dark:bg-blue-500/20 dark:text-blue-400
|
4
4
|
{% elif type == 'danger' %}
|
5
|
-
bg-red-100 text-red-
|
5
|
+
bg-red-100 text-red-700 dark:bg-red-500/20 dark:text-red-400
|
6
6
|
{% elif type == 'warning' %}
|
7
|
-
bg-orange-100 text-orange-
|
7
|
+
bg-orange-100 text-orange-700 dark:bg-orange-500/20 dark:text-orange-400
|
8
8
|
{% elif type == 'success' %}
|
9
|
-
bg-green-100 text-green-
|
9
|
+
bg-green-100 text-green-700 dark:bg-green-500/20 dark:text-green-400
|
10
10
|
{% elif type == 'primary' %}
|
11
|
-
bg-primary-100 text-primary-
|
11
|
+
bg-primary-100 text-primary-700 dark:bg-primary-500/20 dark:text-primary-400
|
12
12
|
{% else %}
|
13
|
-
bg-gray-100 text-gray-
|
13
|
+
bg-gray-100 text-gray-700 dark:bg-gray-500/20 dark:text-gray-400
|
14
14
|
{% endif %}">
|
15
15
|
{{ text }}
|
16
16
|
</span>
|
@@ -1,7 +1,18 @@
|
|
1
1
|
{% if messages %}
|
2
2
|
<ul>
|
3
3
|
{% for message in messages %}
|
4
|
-
<li class="mb-3 px-3 py-3 rounded-md text-sm last:mb-8
|
4
|
+
<li class="mb-3 px-3 py-3 rounded-md text-sm last:mb-8
|
5
|
+
{% if message.tags == 'success' %}
|
6
|
+
bg-green-100 text-green-700 dark:bg-green-500/20 dark:text-green-400
|
7
|
+
{% elif message.tags == 'warning' %}
|
8
|
+
bg-orange-100 text-orange-700 dark:bg-orange-500/20 dark:text-orange-400
|
9
|
+
{% elif message.tags == 'error' %}
|
10
|
+
bg-red-100 text-red-700 dark:bg-red-500/20 dark:text-red-400
|
11
|
+
{% elif message.tags == 'info' %}
|
12
|
+
bg-blue-100 text-blue-700 dark:bg-blue-500/20 dark:text-blue-400
|
13
|
+
{% else %}
|
14
|
+
bg-gray-100 text-gray-700 dark:bg-gray-500/20 dark:text-gray-400
|
15
|
+
{% endif %}">
|
5
16
|
{{ message|capfirst }}
|
6
17
|
</li>
|
7
18
|
{% endfor %}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<nav id="nav-sidebar" class="bg-gray-50 border-r border-gray-200 fixed max-h-screen transition-width w-sidebar dark:bg-gray-900 dark:border-gray-800">
|
5
5
|
<div class="flex flex-col min-h-screen min-w-sidebar dark:bg-gray-950/20">
|
6
6
|
<div class="border-b border-gray-200 mb-5 py-3 dark:border-gray-800">
|
7
|
-
<div class="flex font-medium h-10 items-center px-6 text-gray-
|
7
|
+
<div class="flex font-medium h-10 items-center px-6 text-gray-900 tracking-tight dark:text-gray-100 xl:text-base">
|
8
8
|
{% if site_logo %}
|
9
9
|
{% include "unfold/helpers/site_logo.html" %}
|
10
10
|
{% elif branding %}
|
@@ -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
|
7
|
-
{{ app.name }} <span class="align-text-top material-symbols-outlined md-18
|
6
|
+
<a href="{{ model.admin_url }}" class="block px-3 py-2 truncate hover:text-gray-700 dark:hover:text-gray-200">
|
7
|
+
{{ app.name }} <span class="align-text-top material-symbols-outlined md-18">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-
|
2
|
+
<a href="{{ link }}" class="block px-4 py-2 text-left whitespace-nowrap hover:text-gray-700 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>
|
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
{% if not is_popup %}
|
4
4
|
{% if tabs_list or inlines_list or actions_list or actions_detail or actions_items or nav_global %}
|
5
|
-
<div class="flex items-start flex-col mb-4 text-
|
5
|
+
<div class="flex items-start flex-col mb-4 text-sm w-full md:border-b dark:md:border-gray-800 md:border-l-0 md:flex-row md:items-center md:justify-end">
|
6
6
|
{% if inlines_list or tabs_list %}
|
7
7
|
<ul class="border rounded-md flex flex-col w-full md:flex-row md:border-b-0 md:border-t-0 md:border-l-0 md:border-r-0 dark:border-gray-800">
|
8
8
|
{% for item in tabs_list %}
|
9
9
|
{% if item.has_permission %}
|
10
10
|
<li class="border-b last:border-b-0 md:border-b-0 md:mr-8 dark:border-gray-800">
|
11
|
-
<a href="{% if item.link_callback %}{{ item.link_callback }}{% else %}{{ item.link }}{% endif %}" class="block px-3 py-2 {% if item.active %} border-b
|
11
|
+
<a href="{% if item.link_callback %}{{ item.link_callback }}{% else %}{{ item.link }}{% endif %}" class="block px-3 py-2 md:py-4 md:px-0 dark:border-gray-800 {% if item.active %} border-b font-semibold -mb-px text-primary-600 hover:text-primary-600 dark:text-primary-500 dark:hover:text-primary-500 md:border-primary-500 dark:md:!border-primary-600{% else %}font-medium hover:text-gray-700 dark:hover:text-gray-200{% endif %}">
|
12
12
|
{{ item.title }}
|
13
13
|
</a>
|
14
14
|
</li>
|
@@ -17,14 +17,18 @@
|
|
17
17
|
|
18
18
|
{% if inlines_list %}
|
19
19
|
<li class="border-b last:border-b-0 md:border-b-0 md:mr-8 dark:border-gray-800">
|
20
|
-
<a class="block cursor-pointer px-3 py-2
|
20
|
+
<a class="block cursor-pointer font-medium px-3 py-2 md:py-4 md:px-0"
|
21
|
+
x-on:click="activeTab = 'general'"
|
22
|
+
x-bind:class="{'border-b border-gray-200 dark:border-gray-800 md:border-primary-500 dark:md:!border-primary-600 font-semibold -mb-px text-primary-600 dark:text-primary-500': activeTab == 'general', 'hover:text-gray-700 dark:hover:text-gray-200 dark:border-gray-800': activeTab != 'general'}">
|
21
23
|
{% trans "General" %}
|
22
24
|
</a>
|
23
25
|
</li>
|
24
26
|
|
25
27
|
{% for inline in inlines_list %}
|
26
28
|
<li class="border-b last:border-b-0 md:border-b-0 md:mr-8 dark:border-gray-800">
|
27
|
-
<a class="block cursor-pointer px-3 py-2
|
29
|
+
<a class="block cursor-pointer font-medium px-3 py-2 md:py-4 md:px-0"
|
30
|
+
x-on:click="activeTab = '{{ inline.opts.verbose_name|slugify }}'"
|
31
|
+
x-bind:class="{'border-b border-gray-200 dark:border-gray-800 md:border-primary-500 dark:md:!border-primary-600 font-semibold -mb-px text-primary-600 dark:text-primary-500': activeTab == '{{ inline.opts.verbose_name|slugify }}', 'hover:text-gray-700 dark:hover:text-gray-200 dark:border-gray-800': activeTab != '{{ inline.opts.verbose_name|slugify }}'}">
|
28
32
|
{% if inline.formset.max_num == 1 %}
|
29
33
|
{{ inline.opts.verbose_name|capfirst }}
|
30
34
|
{% else %}
|
@@ -38,7 +42,7 @@
|
|
38
42
|
{% endif %}
|
39
43
|
|
40
44
|
{% if actions_list or actions_detail or actions_items or nav_global %}
|
41
|
-
<ul class="border flex flex-col mb-4 mt-2 rounded-md shadow-sm md:flex-row md:mb-2 md:mt-0 dark:border-gray-800 max-md:w-full">
|
45
|
+
<ul class="border flex flex-col font-medium mb-4 mt-2 rounded-md shadow-sm md:flex-row md:mb-2 md:mt-0 dark:border-gray-800 max-md:w-full">
|
42
46
|
{% for action in actions_list %}
|
43
47
|
{% include "unfold/helpers/tab_action.html" with title=action.title link=action.path %}
|
44
48
|
{% endfor %}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
{% load i18n %}
|
2
2
|
|
3
3
|
<div class="relative" x-data="{ openTheme: false }">
|
4
|
-
<a class="block cursor-pointer leading-none hover:text-gray-700
|
4
|
+
<a class="block cursor-pointer leading-none hover:text-gray-700 dark:hover:text-gray-200" x-on:click="openTheme = !openTheme">
|
5
5
|
<span class="material-symbols-outlined">
|
6
6
|
<span x-text="adminTheme == 'dark' && 'dark_mode' || adminTheme == 'light' && 'light_mode' || 'computer'"></span>
|
7
7
|
</span>
|
8
8
|
</a>
|
9
9
|
|
10
|
-
<nav class="absolute bg-white border flex flex-col leading-none overflow-hidden py-1 -right-2 rounded shadow-lg
|
10
|
+
<nav class="absolute bg-white border flex flex-col leading-none overflow-hidden py-1 -right-2 rounded shadow-lg top-7 w-40 z-50 dark:bg-gray-800 dark:border-gray-700" x-cloak x-show="openTheme" @click.outside="openTheme = false">
|
11
11
|
<a class="cursor-pointer flex flex-row leading-none mx-1 px-3 py-1.5 rounded hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-gray-200"
|
12
12
|
x-on:click="adminTheme = 'dark'"
|
13
13
|
x-bind:class="adminTheme == 'dark' && 'text-primary-600 dark:text-primary-500 dark:hover:!text-primary-500 hover:!text-primary-600'">
|
@@ -3,12 +3,14 @@
|
|
3
3
|
<div class="flex-grow font-medium min-w-0 mr-3">
|
4
4
|
<h1 class="overflow-hidden text-ellipsis text-sm whitespace-nowrap xl:text-base text-gray-700 dark:text-gray-200">
|
5
5
|
{% if content_title %}
|
6
|
-
|
6
|
+
<span class="font-medium text-gray-900 tracking-tight dark:text-gray-100">
|
7
|
+
{{ pretitle }}
|
7
8
|
|
8
|
-
|
9
|
+
{{ content_title }}
|
10
|
+
</span>
|
9
11
|
|
10
12
|
{% if cl and cl.full_result_count != cl.result_count %}
|
11
|
-
<span class="ml-2 text-
|
13
|
+
<span class="ml-2 text-sm">
|
12
14
|
{% blocktranslate count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktranslate %} (<a href="?{% if cl.is_popup %}_popup=1{% endif %}">{% if cl.show_full_result_count %}{% blocktranslate with full_result_count=cl.full_result_count %}{{ full_result_count }} total{% endblocktranslate %}{% else %}{% translate "Show all" %}{% endif %}</a>)
|
13
15
|
</span>
|
14
16
|
{% endif %}
|
@@ -48,7 +48,7 @@
|
|
48
48
|
<script src="{% static 'unfold/js/app.js' %}"></script>
|
49
49
|
|
50
50
|
{% block responsive %}
|
51
|
-
<meta name="viewport" content="
|
51
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
52
52
|
{% endblock %}
|
53
53
|
|
54
54
|
{% block blockbots %}
|
@@ -68,7 +68,7 @@
|
|
68
68
|
{% endif %}
|
69
69
|
</head>
|
70
70
|
|
71
|
-
<body class="antialiased bg-white font-sans text-gray-
|
71
|
+
<body class="antialiased bg-white font-sans text-gray-600 text-sm dark:bg-gray-900 dark:text-gray-300 {% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}" data-admin-utc-offset="{% now "Z" %}" x-data="{ activeTab: 'general', sidebarMobileOpen: false, sidebarDesktopOpen: {% if request.session.toggle_sidebar == False %}false{% else %}true{% endif %} }">
|
72
72
|
{% block base %}{% endblock %}
|
73
73
|
|
74
74
|
<div id="modal-overlay" class="backdrop-blur-sm bg-opacity-80 bg-gray-900 bottom-0 fixed hidden left-0 mr-1 right-0 top-0 z-50"></div>
|