django-bootstrap6-admin 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- django_bootstrap6_admin/__init__.py +3 -0
- django_bootstrap6_admin/apps.py +13 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/css/admin.css +3530 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/css/widgets-overrides.css +47 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/js/admin.js +360 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/js/theme.js +108 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/vendor/bootstrap/LICENSE +21 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/vendor/bootstrap/css/bootstrap.min.css +2 -0
- django_bootstrap6_admin/static/django_bootstrap6_admin/vendor/bootstrap/js/bootstrap.bundle.min.js +9 -0
- django_bootstrap6_admin/templates/admin/404.html +17 -0
- django_bootstrap6_admin/templates/admin/500.html +31 -0
- django_bootstrap6_admin/templates/admin/actions.html +40 -0
- django_bootstrap6_admin/templates/admin/app_index.html +43 -0
- django_bootstrap6_admin/templates/admin/app_list.html +59 -0
- django_bootstrap6_admin/templates/admin/auth/user/add_form.html +11 -0
- django_bootstrap6_admin/templates/admin/auth/user/change_password.html +105 -0
- django_bootstrap6_admin/templates/admin/base.html +220 -0
- django_bootstrap6_admin/templates/admin/base_site.html +19 -0
- django_bootstrap6_admin/templates/admin/change_form.html +124 -0
- django_bootstrap6_admin/templates/admin/change_form_object_tools.html +14 -0
- django_bootstrap6_admin/templates/admin/change_list.html +179 -0
- django_bootstrap6_admin/templates/admin/change_list_object_tools.html +10 -0
- django_bootstrap6_admin/templates/admin/change_list_results.html +42 -0
- django_bootstrap6_admin/templates/admin/color_theme_toggle.html +15 -0
- django_bootstrap6_admin/templates/admin/date_hierarchy.html +27 -0
- django_bootstrap6_admin/templates/admin/delete_confirmation.html +89 -0
- django_bootstrap6_admin/templates/admin/delete_selected_confirmation.html +81 -0
- django_bootstrap6_admin/templates/admin/edit_inline/stacked.html +67 -0
- django_bootstrap6_admin/templates/admin/edit_inline/tabular.html +94 -0
- django_bootstrap6_admin/templates/admin/filter.html +17 -0
- django_bootstrap6_admin/templates/admin/includes/fieldset.html +54 -0
- django_bootstrap6_admin/templates/admin/includes/object_delete_summary.html +7 -0
- django_bootstrap6_admin/templates/admin/index.html +136 -0
- django_bootstrap6_admin/templates/admin/login.html +99 -0
- django_bootstrap6_admin/templates/admin/nav_sidebar.html +21 -0
- django_bootstrap6_admin/templates/admin/object_history.html +81 -0
- django_bootstrap6_admin/templates/admin/pagination.html +18 -0
- django_bootstrap6_admin/templates/admin/search_form.html +28 -0
- django_bootstrap6_admin/templates/admin/submit_line.html +35 -0
- django_bootstrap6_admin/templates/admin/widgets/foreign_key_raw_id.html +14 -0
- django_bootstrap6_admin/templates/admin/widgets/related_widget_wrapper.html +49 -0
- django_bootstrap6_admin/templates/registration/logged_out.html +32 -0
- django_bootstrap6_admin/templates/registration/password_change_done.html +30 -0
- django_bootstrap6_admin/templates/registration/password_change_form.html +74 -0
- django_bootstrap6_admin/templatetags/__init__.py +0 -0
- django_bootstrap6_admin/templatetags/bootstrap6_admin.py +38 -0
- django_bootstrap6_admin-0.1.0.dist-info/METADATA +262 -0
- django_bootstrap6_admin-0.1.0.dist-info/RECORD +52 -0
- django_bootstrap6_admin-0.1.0.dist-info/WHEEL +5 -0
- django_bootstrap6_admin-0.1.0.dist-info/licenses/LICENSE +21 -0
- django_bootstrap6_admin-0.1.0.dist-info/licenses/NOTICE +48 -0
- django_bootstrap6_admin-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{% extends "admin/base_site.html" %}
|
|
2
|
+
{% load i18n l10n admin_urls static admin_modify admin_filters %}
|
|
3
|
+
|
|
4
|
+
{% block title %}{% if errors %}{% translate "Error:" %} {% endif %}{{ block.super }}{% endblock %}
|
|
5
|
+
|
|
6
|
+
{% block extrahead %}
|
|
7
|
+
{{ block.super }}
|
|
8
|
+
<script src="{% url 'admin:jsi18n' %}" {% csp_nonce_attr %}></script>
|
|
9
|
+
{% csp_nonce_attr media %}
|
|
10
|
+
{% endblock %}
|
|
11
|
+
|
|
12
|
+
{% block extrastyle %}{{ block.super }}{% endblock %}
|
|
13
|
+
|
|
14
|
+
{% block coltype %}colM{% endblock %}
|
|
15
|
+
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-form ba-change-form-page{% endblock %}
|
|
16
|
+
|
|
17
|
+
{% if not is_popup %}
|
|
18
|
+
{% block breadcrumbs %}
|
|
19
|
+
<ol class="breadcrumb">
|
|
20
|
+
<li class="breadcrumb-item">
|
|
21
|
+
<a class="breadcrumb-link" href="{% url 'admin:index' %}">
|
|
22
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-home"></use></svg>
|
|
23
|
+
{% translate 'Home' %}
|
|
24
|
+
</a>
|
|
25
|
+
</li>
|
|
26
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
27
|
+
<li class="breadcrumb-item">
|
|
28
|
+
<a class="breadcrumb-link" href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
|
|
29
|
+
</li>
|
|
30
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
31
|
+
<li class="breadcrumb-item">
|
|
32
|
+
{% if has_view_permission %}
|
|
33
|
+
<a class="breadcrumb-link" href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
|
|
34
|
+
{% else %}
|
|
35
|
+
<span class="breadcrumb-link">{{ opts.verbose_name_plural|capfirst }}</span>
|
|
36
|
+
{% endif %}
|
|
37
|
+
</li>
|
|
38
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
39
|
+
<li class="breadcrumb-item">
|
|
40
|
+
<span class="breadcrumb-link active" aria-current="page">
|
|
41
|
+
{% if add %}
|
|
42
|
+
{% blocktranslate with name=opts.verbose_name %}Add {{ name }}{% endblocktranslate %}
|
|
43
|
+
{% else %}
|
|
44
|
+
{{ original|to_object_display_value|truncatewords:"18" }}
|
|
45
|
+
{% endif %}
|
|
46
|
+
</span>
|
|
47
|
+
</li>
|
|
48
|
+
</ol>
|
|
49
|
+
{% endblock %}
|
|
50
|
+
{% endif %}
|
|
51
|
+
|
|
52
|
+
{% block object-tools %}
|
|
53
|
+
{% if change and not is_popup %}
|
|
54
|
+
<div class="object-tools ba-object-tools">
|
|
55
|
+
{% block object-tools-items %}
|
|
56
|
+
{% change_form_object_tools %}
|
|
57
|
+
{% endblock %}
|
|
58
|
+
</div>
|
|
59
|
+
{% endif %}
|
|
60
|
+
{% endblock %}
|
|
61
|
+
|
|
62
|
+
{% block content %}
|
|
63
|
+
<div id="content-main" class="ba-change-form">
|
|
64
|
+
<form {% if has_file_field %}enctype="multipart/form-data" {% endif %}{% if form_url %}action="{{ form_url }}" {% endif %}method="post" id="{{ opts.model_name }}_form" novalidate>
|
|
65
|
+
{% csrf_token %}
|
|
66
|
+
{% block form_top %}{% endblock %}
|
|
67
|
+
|
|
68
|
+
<div>
|
|
69
|
+
{% if action_form and not is_popup %}
|
|
70
|
+
{% change_form_admin_actions %}
|
|
71
|
+
<input type="hidden" name="{{ action_checkbox_name }}" value="{{ original.pk|unlocalize }}">
|
|
72
|
+
{% endif %}
|
|
73
|
+
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %}
|
|
74
|
+
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}">{% endif %}
|
|
75
|
+
{% if source_model %}<input type="hidden" name="{{ source_model_var }}" value="{{ source_model }}">{% endif %}
|
|
76
|
+
|
|
77
|
+
{% if save_on_top %}{% block submit_buttons_top %}{% submit_row %}{% endblock %}{% endif %}
|
|
78
|
+
|
|
79
|
+
{% if errors %}
|
|
80
|
+
<div class="alert theme-danger ba-form-alert" role="alert" tabindex="-1">
|
|
81
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-alert"></use></svg>
|
|
82
|
+
<div>
|
|
83
|
+
{% blocktranslate count counter=errors|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
|
|
84
|
+
{{ adminform.form.non_field_errors }}
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
{% endif %}
|
|
88
|
+
|
|
89
|
+
{% block field_sets %}
|
|
90
|
+
<div class="ba-fieldsets">
|
|
91
|
+
{% for fieldset in adminform %}
|
|
92
|
+
{% include "admin/includes/fieldset.html" with heading_level=2 prefix="fieldset" id_prefix=0 id_suffix=forloop.counter0 %}
|
|
93
|
+
{% endfor %}
|
|
94
|
+
</div>
|
|
95
|
+
{% endblock %}
|
|
96
|
+
|
|
97
|
+
{% block after_field_sets %}{% endblock %}
|
|
98
|
+
|
|
99
|
+
{% block inline_field_sets %}
|
|
100
|
+
<div class="ba-inlines">
|
|
101
|
+
{% for inline_admin_formset in inline_admin_formsets %}
|
|
102
|
+
{% include inline_admin_formset.opts.template %}
|
|
103
|
+
{% endfor %}
|
|
104
|
+
</div>
|
|
105
|
+
{% endblock %}
|
|
106
|
+
|
|
107
|
+
{% block after_related_objects %}{% endblock %}
|
|
108
|
+
|
|
109
|
+
{% block submit_buttons_bottom %}{% submit_row %}{% endblock %}
|
|
110
|
+
|
|
111
|
+
{% block admin_change_form_document_ready %}
|
|
112
|
+
<script id="django-admin-form-add-constants"
|
|
113
|
+
src="{% static 'admin/js/change_form.js' %}"
|
|
114
|
+
{% if adminform and add %}data-model-name="{{ opts.model_name }}"{% endif %}
|
|
115
|
+
{% csp_nonce_attr %}
|
|
116
|
+
async>
|
|
117
|
+
</script>
|
|
118
|
+
{% endblock %}
|
|
119
|
+
|
|
120
|
+
{% prepopulated_fields_js %}
|
|
121
|
+
</div>
|
|
122
|
+
</form>
|
|
123
|
+
</div>
|
|
124
|
+
{% endblock %}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{% load i18n admin_urls %}
|
|
2
|
+
{% block object-tools-items %}
|
|
3
|
+
{% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %}
|
|
4
|
+
<a href="{% add_preserved_filters history_url %}" class="btn btn-outline theme-secondary btn-sm historylink">
|
|
5
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-history"></use></svg>
|
|
6
|
+
{% translate "History" %}
|
|
7
|
+
</a>
|
|
8
|
+
{% if has_absolute_url %}
|
|
9
|
+
<a href="{{ absolute_url }}" class="btn btn-outline theme-secondary btn-sm viewsitelink">
|
|
10
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-external"></use></svg>
|
|
11
|
+
{% translate "View on site" %}
|
|
12
|
+
</a>
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% endblock %}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
{% extends "admin/base_site.html" %}
|
|
2
|
+
{% load i18n admin_urls static admin_list %}
|
|
3
|
+
|
|
4
|
+
{% block title %}{% if cl.formset and cl.formset.errors %}{% translate "Error:" %} {% endif %}{{ block.super }}{% endblock %}
|
|
5
|
+
|
|
6
|
+
{% block extrastyle %}
|
|
7
|
+
{{ block.super }}
|
|
8
|
+
{% csp_nonce_attr media.css %}
|
|
9
|
+
{% if cl.formset or action_form %}
|
|
10
|
+
<script src="{% url 'admin:jsi18n' %}" {% csp_nonce_attr %}></script>
|
|
11
|
+
{% endif %}
|
|
12
|
+
{% endblock %}
|
|
13
|
+
|
|
14
|
+
{% block extrahead %}
|
|
15
|
+
{{ block.super }}
|
|
16
|
+
{% csp_nonce_attr media.js %}
|
|
17
|
+
<script src="{% static 'admin/js/filters.js' %}" defer {% csp_nonce_attr %}></script>
|
|
18
|
+
{% endblock %}
|
|
19
|
+
|
|
20
|
+
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list ba-changelist-page{% endblock %}
|
|
21
|
+
|
|
22
|
+
{% if not is_popup %}
|
|
23
|
+
{% block breadcrumbs %}
|
|
24
|
+
<ol class="breadcrumb">
|
|
25
|
+
<li class="breadcrumb-item">
|
|
26
|
+
<a class="breadcrumb-link" href="{% url 'admin:index' %}">
|
|
27
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-home"></use></svg>
|
|
28
|
+
{% translate 'Home' %}
|
|
29
|
+
</a>
|
|
30
|
+
</li>
|
|
31
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
32
|
+
<li class="breadcrumb-item">
|
|
33
|
+
<a class="breadcrumb-link" href="{% url 'admin:app_list' app_label=cl.opts.app_label %}">{{ cl.opts.app_config.verbose_name }}</a>
|
|
34
|
+
</li>
|
|
35
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
36
|
+
<li class="breadcrumb-item">
|
|
37
|
+
<span class="breadcrumb-link active" aria-current="page">{{ cl.opts.verbose_name_plural|capfirst }}</span>
|
|
38
|
+
</li>
|
|
39
|
+
</ol>
|
|
40
|
+
{% endblock %}
|
|
41
|
+
{% endif %}
|
|
42
|
+
|
|
43
|
+
{% block coltype %}{% endblock %}
|
|
44
|
+
|
|
45
|
+
{% block object-tools %}
|
|
46
|
+
<div class="object-tools ba-object-tools">
|
|
47
|
+
{% block object-tools-items %}
|
|
48
|
+
{% change_list_object_tools %}
|
|
49
|
+
{% endblock %}
|
|
50
|
+
</div>
|
|
51
|
+
{% endblock %}
|
|
52
|
+
|
|
53
|
+
{% block content %}
|
|
54
|
+
<div id="content-main" class="ba-changelist">
|
|
55
|
+
{% if cl.formset and cl.formset.errors %}
|
|
56
|
+
<div class="alert theme-danger ba-form-alert" role="alert" tabindex="-1">
|
|
57
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-alert"></use></svg>
|
|
58
|
+
<div>
|
|
59
|
+
{% blocktranslate count counter=cl.formset.total_error_count %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
|
|
60
|
+
{{ cl.formset.non_form_errors }}
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
{% endif %}
|
|
64
|
+
|
|
65
|
+
<div class="module{% if cl.has_filters %} filtered{% endif %}{% if cl.has_active_filters %} ba-filters-open{% endif %}" id="changelist">
|
|
66
|
+
<div class="changelist-form-container ba-changelist-layout">
|
|
67
|
+
<div class="ba-changelist-main">
|
|
68
|
+
{% block search %}{% search_form cl %}{% endblock %}
|
|
69
|
+
{% block date_hierarchy %}{% if cl.date_hierarchy %}{% date_hierarchy cl %}{% endif %}{% endblock %}
|
|
70
|
+
|
|
71
|
+
<div class="ba-result-summary">
|
|
72
|
+
<span>
|
|
73
|
+
{{ cl.result_count }}
|
|
74
|
+
{% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %}
|
|
75
|
+
</span>
|
|
76
|
+
{% if pagination_required %}
|
|
77
|
+
<span>·</span>
|
|
78
|
+
<span>{% blocktranslate with page=cl.page_num total=cl.paginator.num_pages %}Page {{ page }} of {{ total }}{% endblocktranslate %}</span>
|
|
79
|
+
{% endif %}
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
{% if cl.has_filters %}
|
|
83
|
+
<div class="ba-filters-toggle-row">
|
|
84
|
+
<button type="button" class="btn btn-outline theme-secondary ba-filters-toggle" id="ba-filters-toggle"
|
|
85
|
+
aria-controls="changelist-filter"
|
|
86
|
+
aria-expanded="{% if cl.has_active_filters %}true{% else %}false{% endif %}">
|
|
87
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-filter"></use></svg>
|
|
88
|
+
{% translate 'Filters' %}
|
|
89
|
+
{% if cl.has_active_filters %}
|
|
90
|
+
<span class="badge badge-subtle theme-primary">{% translate 'Active' %}</span>
|
|
91
|
+
{% endif %}
|
|
92
|
+
</button>
|
|
93
|
+
</div>
|
|
94
|
+
{% endif %}
|
|
95
|
+
|
|
96
|
+
{% if cl.formset and cl.result_count %}
|
|
97
|
+
<div class="ba-list-actions">
|
|
98
|
+
<button type="submit" form="changelist-form" name="_save" class="btn btn-solid theme-primary btn-sm">
|
|
99
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-check"></use></svg>
|
|
100
|
+
{% translate 'Save changes' %}
|
|
101
|
+
</button>
|
|
102
|
+
</div>
|
|
103
|
+
{% endif %}
|
|
104
|
+
|
|
105
|
+
<form id="changelist-form" method="post"{% if cl.formset and cl.formset.is_multipart %} enctype="multipart/form-data"{% endif %} novalidate>
|
|
106
|
+
{% csrf_token %}
|
|
107
|
+
{% if cl.formset %}
|
|
108
|
+
<div>{{ cl.formset.management_form }}</div>
|
|
109
|
+
{% endif %}
|
|
110
|
+
|
|
111
|
+
{% block result_list %}
|
|
112
|
+
{% if action_form and actions_on_top and cl.show_admin_actions %}
|
|
113
|
+
<div class="ba-actions-top">{% admin_actions %}</div>
|
|
114
|
+
{% endif %}
|
|
115
|
+
{% result_list cl %}
|
|
116
|
+
{% if not cl.result_count %}
|
|
117
|
+
<div class="ba-empty">
|
|
118
|
+
<p>{% translate 'No results found.' %}</p>
|
|
119
|
+
{% if cl.query or cl.has_active_filters %}
|
|
120
|
+
<a class="btn btn-outline theme-secondary btn-sm" href="?">{% translate 'Clear search and filters' %}</a>
|
|
121
|
+
{% endif %}
|
|
122
|
+
</div>
|
|
123
|
+
{% endif %}
|
|
124
|
+
{% if action_form and actions_on_bottom and cl.show_admin_actions %}
|
|
125
|
+
<div class="ba-actions-bottom">{% admin_actions %}</div>
|
|
126
|
+
{% endif %}
|
|
127
|
+
{% endblock %}
|
|
128
|
+
|
|
129
|
+
{% block pagination %}
|
|
130
|
+
<div class="changelist-footer ba-changelist-footer">
|
|
131
|
+
{% pagination cl %}
|
|
132
|
+
{% if cl.formset and cl.result_count %}
|
|
133
|
+
<input type="submit" name="_save" class="btn btn-solid theme-primary default" value="{% translate 'Save' %}">
|
|
134
|
+
{% endif %}
|
|
135
|
+
</div>
|
|
136
|
+
{% endblock %}
|
|
137
|
+
</form>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
{% block filters %}
|
|
141
|
+
{% if cl.has_filters %}
|
|
142
|
+
<aside class="ba-filters" id="changelist-filter" aria-labelledby="changelist-filter-header">
|
|
143
|
+
<div class="ba-filters-header">
|
|
144
|
+
<h2 id="changelist-filter-header">
|
|
145
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-filter"></use></svg>
|
|
146
|
+
{% translate 'Filter' %}
|
|
147
|
+
</h2>
|
|
148
|
+
<button type="button" class="btn btn-icon btn-outline theme-secondary ba-filters-close"
|
|
149
|
+
id="ba-filters-close" aria-label="{% translate 'Close filters' %}">
|
|
150
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-x"></use></svg>
|
|
151
|
+
</button>
|
|
152
|
+
{% if cl.is_facets_optional or cl.has_active_filters %}
|
|
153
|
+
<div class="ba-filters-actions">
|
|
154
|
+
{% if cl.is_facets_optional %}
|
|
155
|
+
{% if cl.add_facets %}
|
|
156
|
+
<a href="{{ cl.remove_facet_link }}" class="hidelink">{% translate "Hide counts" %}</a>
|
|
157
|
+
{% else %}
|
|
158
|
+
<a href="{{ cl.add_facet_link }}" class="viewlink">{% translate "Show counts" %}</a>
|
|
159
|
+
{% endif %}
|
|
160
|
+
{% endif %}
|
|
161
|
+
{% if cl.has_active_filters %}
|
|
162
|
+
<a class="ba-clear-filters" href="{{ cl.clear_all_filters_qs }}">
|
|
163
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-x"></use></svg>
|
|
164
|
+
{% translate "Clear all filters" %}
|
|
165
|
+
</a>
|
|
166
|
+
{% endif %}
|
|
167
|
+
</div>
|
|
168
|
+
{% endif %}
|
|
169
|
+
</div>
|
|
170
|
+
<div class="ba-filters-body">
|
|
171
|
+
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
|
|
172
|
+
</div>
|
|
173
|
+
</aside>
|
|
174
|
+
{% endif %}
|
|
175
|
+
{% endblock %}
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
{% endblock %}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{% load i18n admin_urls %}
|
|
2
|
+
{% block object-tools-items %}
|
|
3
|
+
{% if has_add_permission %}
|
|
4
|
+
{% url cl.opts|admin_urlname:'add' as add_url %}
|
|
5
|
+
<a href="{% add_preserved_filters add_url is_popup to_field %}" class="btn btn-solid theme-primary addlink">
|
|
6
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-plus"></use></svg>
|
|
7
|
+
{% blocktranslate with cl.opts.verbose_name as name %}Add {{ name }}{% endblocktranslate %}
|
|
8
|
+
</a>
|
|
9
|
+
{% endif %}
|
|
10
|
+
{% endblock %}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{% load i18n %}
|
|
2
|
+
{% if result_hidden_fields %}
|
|
3
|
+
<div class="hiddenfields">{# DIV for HTML validation #}
|
|
4
|
+
{% for item in result_hidden_fields %}{{ item }}{% endfor %}
|
|
5
|
+
</div>
|
|
6
|
+
{% endif %}
|
|
7
|
+
{% if results %}
|
|
8
|
+
<div class="results ba-table-wrap">
|
|
9
|
+
<table id="result_list" class="table table-hover table-sm align-middle">
|
|
10
|
+
<thead>
|
|
11
|
+
<tr>
|
|
12
|
+
{% for header in result_headers %}
|
|
13
|
+
<th scope="col"{{ header.class_attrib }}{% if header.sortable %} aria-sort="{% if header.sort_priority > 0 %}{% if header.ascending %}ascending{% else %}descending{% endif %}{% else %}none{% endif %}"{% endif %}>
|
|
14
|
+
<div class="ba-th-inner">
|
|
15
|
+
<div class="text">{% if header.sortable %}<a role="button" href="{{ header.url_primary }}">{{ header.text|capfirst }}</a>{% else %}<span>{{ header.text|capfirst }}</span>{% endif %}</div>
|
|
16
|
+
{% if header.sortable and header.sort_priority > 0 %}
|
|
17
|
+
<div class="sortoptions">
|
|
18
|
+
<a class="sortremove" href="{{ header.url_remove }}" title="{% translate "Remove from sorting" %}" aria-label="{% translate "Remove from sorting" %}"></a>
|
|
19
|
+
{% if num_sorted_fields > 1 %}
|
|
20
|
+
<span class="sortpriority" title="{% blocktranslate with priority_number=header.sort_priority %}Sorting priority: {{ priority_number }}{% endblocktranslate %}">{{ header.sort_priority }}</span>
|
|
21
|
+
{% endif %}
|
|
22
|
+
<a href="{{ header.url_toggle }}" class="toggle {{ header.ascending|yesno:'ascending,descending' }}" title="{% translate "Toggle sorting" %}" aria-label="{% translate "Toggle sorting" %}"></a>
|
|
23
|
+
</div>
|
|
24
|
+
{% endif %}
|
|
25
|
+
</div>
|
|
26
|
+
</th>
|
|
27
|
+
{% endfor %}
|
|
28
|
+
</tr>
|
|
29
|
+
</thead>
|
|
30
|
+
<tbody>
|
|
31
|
+
{% for result in results %}
|
|
32
|
+
{% if result.form and result.form.non_field_errors %}
|
|
33
|
+
<tr>
|
|
34
|
+
<td colspan="{{ result|length }}">{{ result.form.non_field_errors }}</td>
|
|
35
|
+
</tr>
|
|
36
|
+
{% endif %}
|
|
37
|
+
<tr>{% for item in result %}{{ item }}{% endfor %}</tr>
|
|
38
|
+
{% endfor %}
|
|
39
|
+
</tbody>
|
|
40
|
+
</table>
|
|
41
|
+
</div>
|
|
42
|
+
{% endif %}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{% load i18n %}
|
|
2
|
+
<button type="button"
|
|
3
|
+
class="btn btn-icon btn-outline theme-secondary ba-theme-toggle theme-toggle"
|
|
4
|
+
aria-label="{% translate 'Toggle theme' %}"
|
|
5
|
+
title="{% translate 'Toggle theme' %}"
|
|
6
|
+
data-label-auto="{% translate 'Toggle theme (current theme: auto)' %}"
|
|
7
|
+
data-label-light="{% translate 'Toggle theme (current theme: light)' %}"
|
|
8
|
+
data-label-dark="{% translate 'Toggle theme (current theme: dark)' %}">
|
|
9
|
+
<span class="visually-hidden theme-label-when-auto">{% translate 'Toggle theme (current theme: auto)' %}</span>
|
|
10
|
+
<span class="visually-hidden theme-label-when-light">{% translate 'Toggle theme (current theme: light)' %}</span>
|
|
11
|
+
<span class="visually-hidden theme-label-when-dark">{% translate 'Toggle theme (current theme: dark)' %}</span>
|
|
12
|
+
<svg aria-hidden="true" class="ba-icon theme-icon-when-auto"><use href="#icon-auto"></use></svg>
|
|
13
|
+
<svg aria-hidden="true" class="ba-icon theme-icon-when-dark"><use href="#icon-moon"></use></svg>
|
|
14
|
+
<svg aria-hidden="true" class="ba-icon theme-icon-when-light"><use href="#icon-sun"></use></svg>
|
|
15
|
+
</button>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{% load i18n %}
|
|
2
|
+
{% if show %}
|
|
3
|
+
<nav class="toplinks ba-date-hierarchy" aria-labelledby="date-hierarchy-label">
|
|
4
|
+
<span id="date-hierarchy-label">{% blocktranslate %}Filter by {{ field_name }}{% endblocktranslate %}</span>
|
|
5
|
+
<div class="ba-date-hierarchy-links">
|
|
6
|
+
{% block date-hierarchy-toplinks %}
|
|
7
|
+
{% block date-hierarchy-back %}
|
|
8
|
+
{% if back %}
|
|
9
|
+
<a href="{{ back.link }}" class="date-back">
|
|
10
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-chevron-left"></use></svg>
|
|
11
|
+
{{ back.title }}
|
|
12
|
+
</a>
|
|
13
|
+
{% endif %}
|
|
14
|
+
{% endblock %}
|
|
15
|
+
{% block date-hierarchy-choices %}
|
|
16
|
+
{% for choice in choices %}
|
|
17
|
+
{% if choice.link %}
|
|
18
|
+
<a href="{{ choice.link }}" class="ba-date-chip">{{ choice.title }}</a>
|
|
19
|
+
{% else %}
|
|
20
|
+
<span class="ba-date-chip active" aria-current="date"><svg class="ba-icon" aria-hidden="true"><use href="#ba-check"></use></svg>{{ choice.title }}</span>
|
|
21
|
+
{% endif %}
|
|
22
|
+
{% endfor %}
|
|
23
|
+
{% endblock %}
|
|
24
|
+
{% endblock %}
|
|
25
|
+
</div>
|
|
26
|
+
</nav>
|
|
27
|
+
{% endif %}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{% extends "admin/base_site.html" %}
|
|
2
|
+
{% load i18n admin_urls static admin_filters %}
|
|
3
|
+
|
|
4
|
+
{% block extrahead %}
|
|
5
|
+
{{ block.super }}
|
|
6
|
+
{% csp_nonce_attr media %}
|
|
7
|
+
<script src="{% static 'admin/js/cancel.js' %}" async {% csp_nonce_attr %}></script>
|
|
8
|
+
{% endblock %}
|
|
9
|
+
|
|
10
|
+
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation ba-delete-page{% endblock %}
|
|
11
|
+
|
|
12
|
+
{% block breadcrumbs %}
|
|
13
|
+
<ol class="breadcrumb">
|
|
14
|
+
<li class="breadcrumb-item">
|
|
15
|
+
<a class="breadcrumb-link" href="{% url 'admin:index' %}">
|
|
16
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-home"></use></svg>
|
|
17
|
+
{% translate 'Home' %}
|
|
18
|
+
</a>
|
|
19
|
+
</li>
|
|
20
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
21
|
+
<li class="breadcrumb-item">
|
|
22
|
+
<a class="breadcrumb-link" href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
|
|
23
|
+
</li>
|
|
24
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
25
|
+
<li class="breadcrumb-item">
|
|
26
|
+
<a class="breadcrumb-link" href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
|
|
27
|
+
</li>
|
|
28
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
29
|
+
<li class="breadcrumb-item">
|
|
30
|
+
<a class="breadcrumb-link" href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|to_object_display_value|truncatewords:"18" }}</a>
|
|
31
|
+
</li>
|
|
32
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
33
|
+
<li class="breadcrumb-item">
|
|
34
|
+
<span class="breadcrumb-link active" aria-current="page">{% translate 'Delete' %}</span>
|
|
35
|
+
</li>
|
|
36
|
+
</ol>
|
|
37
|
+
{% endblock %}
|
|
38
|
+
|
|
39
|
+
{% block content %}
|
|
40
|
+
<div class="ba-delete">
|
|
41
|
+
{% if perms_lacking %}
|
|
42
|
+
{% block delete_forbidden %}
|
|
43
|
+
<div class="alert theme-danger" role="alert">
|
|
44
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-alert"></use></svg>
|
|
45
|
+
<div>{% blocktranslate %}Deleting the {{ object_name }} “{{ escaped_object }}” would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktranslate %}</div>
|
|
46
|
+
</div>
|
|
47
|
+
<ul id="deleted-objects" class="ba-object-list">{{ perms_lacking|truncated_unordered_list:delete_confirmation_max_display }}</ul>
|
|
48
|
+
{% endblock %}
|
|
49
|
+
{% elif protected %}
|
|
50
|
+
{% block delete_protected %}
|
|
51
|
+
<div class="alert theme-warning" role="alert">
|
|
52
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-alert"></use></svg>
|
|
53
|
+
<div>{% blocktranslate %}Deleting the {{ object_name }} “{{ escaped_object }}” would require deleting the following protected related objects:{% endblocktranslate %}</div>
|
|
54
|
+
</div>
|
|
55
|
+
{% if delete_confirmation_max_display is None or delete_confirmation_max_display > 0 %}
|
|
56
|
+
<ul id="deleted-objects" class="ba-object-list">{{ protected|truncated_unordered_list:delete_confirmation_max_display }}</ul>
|
|
57
|
+
{% endif %}
|
|
58
|
+
{% endblock %}
|
|
59
|
+
{% else %}
|
|
60
|
+
{% block delete_confirm %}
|
|
61
|
+
<div class="card ba-confirm-card">
|
|
62
|
+
<div class="card-body">
|
|
63
|
+
<span class="ba-confirm-icon" aria-hidden="true">
|
|
64
|
+
<svg class="ba-icon"><use href="#ba-trash"></use></svg>
|
|
65
|
+
</span>
|
|
66
|
+
<h2>{% translate 'Confirm deletion' %}</h2>
|
|
67
|
+
<p>{% blocktranslate %}Are you sure you want to delete the {{ object_name }} “{{ escaped_object }}”? All of the following related items will be deleted:{% endblocktranslate %}</p>
|
|
68
|
+
{% include "admin/includes/object_delete_summary.html" %}
|
|
69
|
+
{% if delete_confirmation_max_display is None or delete_confirmation_max_display > 0 %}
|
|
70
|
+
<h3>{% translate "Objects" %}</h3>
|
|
71
|
+
<ul id="deleted-objects" class="ba-object-list">{{ deleted_objects|truncated_unordered_list:delete_confirmation_max_display }}</ul>
|
|
72
|
+
{% endif %}
|
|
73
|
+
<form method="post" class="ba-confirm-actions">
|
|
74
|
+
{% csrf_token %}
|
|
75
|
+
<input type="hidden" name="post" value="yes">
|
|
76
|
+
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %}
|
|
77
|
+
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}">{% endif %}
|
|
78
|
+
<button type="submit" class="btn btn-solid theme-danger">
|
|
79
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-trash"></use></svg>
|
|
80
|
+
{% translate 'Yes, I’m sure' %}
|
|
81
|
+
</button>
|
|
82
|
+
<a role="button" href="#" class="btn btn-outline theme-secondary cancel-link">{% translate "No, take me back" %}</a>
|
|
83
|
+
</form>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
{% endblock %}
|
|
87
|
+
{% endif %}
|
|
88
|
+
</div>
|
|
89
|
+
{% endblock content %}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{% extends "admin/base_site.html" %}
|
|
2
|
+
{% load i18n l10n admin_urls static admin_filters %}
|
|
3
|
+
|
|
4
|
+
{% block extrahead %}
|
|
5
|
+
{{ block.super }}
|
|
6
|
+
{% csp_nonce_attr media %}
|
|
7
|
+
<script src="{% static 'admin/js/cancel.js' %}" async {% csp_nonce_attr %}></script>
|
|
8
|
+
{% endblock %}
|
|
9
|
+
|
|
10
|
+
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation delete-selected-confirmation ba-delete-page{% endblock %}
|
|
11
|
+
|
|
12
|
+
{% block breadcrumbs %}
|
|
13
|
+
<ol class="breadcrumb">
|
|
14
|
+
<li class="breadcrumb-item">
|
|
15
|
+
<a class="breadcrumb-link" href="{% url 'admin:index' %}">
|
|
16
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-home"></use></svg>
|
|
17
|
+
{% translate 'Home' %}
|
|
18
|
+
</a>
|
|
19
|
+
</li>
|
|
20
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
21
|
+
<li class="breadcrumb-item">
|
|
22
|
+
<a class="breadcrumb-link" href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
|
|
23
|
+
</li>
|
|
24
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
25
|
+
<li class="breadcrumb-item">
|
|
26
|
+
<a class="breadcrumb-link" href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
|
|
27
|
+
</li>
|
|
28
|
+
<li class="breadcrumb-divider" aria-hidden="true"></li>
|
|
29
|
+
<li class="breadcrumb-item">
|
|
30
|
+
<span class="breadcrumb-link active" aria-current="page">{% translate 'Delete multiple objects' %}</span>
|
|
31
|
+
</li>
|
|
32
|
+
</ol>
|
|
33
|
+
{% endblock %}
|
|
34
|
+
|
|
35
|
+
{% block content %}
|
|
36
|
+
<div class="ba-delete">
|
|
37
|
+
{% if perms_lacking %}
|
|
38
|
+
<div class="alert theme-danger" role="alert">
|
|
39
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-alert"></use></svg>
|
|
40
|
+
<div>{% blocktranslate %}Deleting the selected {{ objects_name }} would result in deleting related objects, but your account doesn't have permission to delete the following types of objects:{% endblocktranslate %}</div>
|
|
41
|
+
</div>
|
|
42
|
+
<ul class="ba-object-list">{{ perms_lacking|truncated_unordered_list:delete_confirmation_max_display }}</ul>
|
|
43
|
+
{% elif protected %}
|
|
44
|
+
<div class="alert theme-warning" role="alert">
|
|
45
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-alert"></use></svg>
|
|
46
|
+
<div>{% blocktranslate %}Deleting the selected {{ objects_name }} would require deleting the following protected related objects:{% endblocktranslate %}</div>
|
|
47
|
+
</div>
|
|
48
|
+
<ul class="ba-object-list">{{ protected|truncated_unordered_list:delete_confirmation_max_display }}</ul>
|
|
49
|
+
{% else %}
|
|
50
|
+
<div class="card ba-confirm-card">
|
|
51
|
+
<div class="card-body">
|
|
52
|
+
<span class="ba-confirm-icon" aria-hidden="true">
|
|
53
|
+
<svg class="ba-icon"><use href="#ba-trash"></use></svg>
|
|
54
|
+
</span>
|
|
55
|
+
<h2>{% translate 'Confirm deletion' %}</h2>
|
|
56
|
+
<p>{% blocktranslate %}Are you sure you want to delete the selected {{ objects_name }}? All of the following objects and their related items will be deleted:{% endblocktranslate %}</p>
|
|
57
|
+
{% include "admin/includes/object_delete_summary.html" %}
|
|
58
|
+
{% if delete_confirmation_max_display is None or delete_confirmation_max_display > 0 %}
|
|
59
|
+
<h3>{% translate "Objects" %}</h3>
|
|
60
|
+
{% for deletable_object in deletable_objects %}
|
|
61
|
+
<ul class="ba-object-list">{{ deletable_object|truncated_unordered_list:delete_confirmation_max_display }}</ul>
|
|
62
|
+
{% endfor %}
|
|
63
|
+
{% endif %}
|
|
64
|
+
<form method="post" class="ba-confirm-actions">
|
|
65
|
+
{% csrf_token %}
|
|
66
|
+
{% for obj in queryset %}
|
|
67
|
+
<input type="hidden" name="{{ action_checkbox_name }}" value="{{ obj.pk|unlocalize }}">
|
|
68
|
+
{% endfor %}
|
|
69
|
+
<input type="hidden" name="action" value="delete_selected">
|
|
70
|
+
<input type="hidden" name="post" value="yes">
|
|
71
|
+
<button type="submit" class="btn btn-solid theme-danger">
|
|
72
|
+
<svg class="ba-icon" aria-hidden="true"><use href="#ba-trash"></use></svg>
|
|
73
|
+
{% translate 'Yes, I’m sure' %}
|
|
74
|
+
</button>
|
|
75
|
+
<a role="button" href="#" class="btn btn-outline theme-secondary cancel-link">{% translate "No, take me back" %}</a>
|
|
76
|
+
</form>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
{% endif %}
|
|
80
|
+
</div>
|
|
81
|
+
{% endblock %}
|