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.
Files changed (52) hide show
  1. django_bootstrap6_admin/__init__.py +3 -0
  2. django_bootstrap6_admin/apps.py +13 -0
  3. django_bootstrap6_admin/static/django_bootstrap6_admin/css/admin.css +3530 -0
  4. django_bootstrap6_admin/static/django_bootstrap6_admin/css/widgets-overrides.css +47 -0
  5. django_bootstrap6_admin/static/django_bootstrap6_admin/js/admin.js +360 -0
  6. django_bootstrap6_admin/static/django_bootstrap6_admin/js/theme.js +108 -0
  7. django_bootstrap6_admin/static/django_bootstrap6_admin/vendor/bootstrap/LICENSE +21 -0
  8. django_bootstrap6_admin/static/django_bootstrap6_admin/vendor/bootstrap/css/bootstrap.min.css +2 -0
  9. django_bootstrap6_admin/static/django_bootstrap6_admin/vendor/bootstrap/js/bootstrap.bundle.min.js +9 -0
  10. django_bootstrap6_admin/templates/admin/404.html +17 -0
  11. django_bootstrap6_admin/templates/admin/500.html +31 -0
  12. django_bootstrap6_admin/templates/admin/actions.html +40 -0
  13. django_bootstrap6_admin/templates/admin/app_index.html +43 -0
  14. django_bootstrap6_admin/templates/admin/app_list.html +59 -0
  15. django_bootstrap6_admin/templates/admin/auth/user/add_form.html +11 -0
  16. django_bootstrap6_admin/templates/admin/auth/user/change_password.html +105 -0
  17. django_bootstrap6_admin/templates/admin/base.html +220 -0
  18. django_bootstrap6_admin/templates/admin/base_site.html +19 -0
  19. django_bootstrap6_admin/templates/admin/change_form.html +124 -0
  20. django_bootstrap6_admin/templates/admin/change_form_object_tools.html +14 -0
  21. django_bootstrap6_admin/templates/admin/change_list.html +179 -0
  22. django_bootstrap6_admin/templates/admin/change_list_object_tools.html +10 -0
  23. django_bootstrap6_admin/templates/admin/change_list_results.html +42 -0
  24. django_bootstrap6_admin/templates/admin/color_theme_toggle.html +15 -0
  25. django_bootstrap6_admin/templates/admin/date_hierarchy.html +27 -0
  26. django_bootstrap6_admin/templates/admin/delete_confirmation.html +89 -0
  27. django_bootstrap6_admin/templates/admin/delete_selected_confirmation.html +81 -0
  28. django_bootstrap6_admin/templates/admin/edit_inline/stacked.html +67 -0
  29. django_bootstrap6_admin/templates/admin/edit_inline/tabular.html +94 -0
  30. django_bootstrap6_admin/templates/admin/filter.html +17 -0
  31. django_bootstrap6_admin/templates/admin/includes/fieldset.html +54 -0
  32. django_bootstrap6_admin/templates/admin/includes/object_delete_summary.html +7 -0
  33. django_bootstrap6_admin/templates/admin/index.html +136 -0
  34. django_bootstrap6_admin/templates/admin/login.html +99 -0
  35. django_bootstrap6_admin/templates/admin/nav_sidebar.html +21 -0
  36. django_bootstrap6_admin/templates/admin/object_history.html +81 -0
  37. django_bootstrap6_admin/templates/admin/pagination.html +18 -0
  38. django_bootstrap6_admin/templates/admin/search_form.html +28 -0
  39. django_bootstrap6_admin/templates/admin/submit_line.html +35 -0
  40. django_bootstrap6_admin/templates/admin/widgets/foreign_key_raw_id.html +14 -0
  41. django_bootstrap6_admin/templates/admin/widgets/related_widget_wrapper.html +49 -0
  42. django_bootstrap6_admin/templates/registration/logged_out.html +32 -0
  43. django_bootstrap6_admin/templates/registration/password_change_done.html +30 -0
  44. django_bootstrap6_admin/templates/registration/password_change_form.html +74 -0
  45. django_bootstrap6_admin/templatetags/__init__.py +0 -0
  46. django_bootstrap6_admin/templatetags/bootstrap6_admin.py +38 -0
  47. django_bootstrap6_admin-0.1.0.dist-info/METADATA +262 -0
  48. django_bootstrap6_admin-0.1.0.dist-info/RECORD +52 -0
  49. django_bootstrap6_admin-0.1.0.dist-info/WHEEL +5 -0
  50. django_bootstrap6_admin-0.1.0.dist-info/licenses/LICENSE +21 -0
  51. django_bootstrap6_admin-0.1.0.dist-info/licenses/NOTICE +48 -0
  52. django_bootstrap6_admin-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,67 @@
1
+ {% load i18n admin_urls %}
2
+ <div class="js-inline-admin-formset inline-group ba-inline-group"
3
+ id="{{ inline_admin_formset.formset.prefix }}-group"
4
+ data-inline-type="stacked"
5
+ data-inline-formset="{{ inline_admin_formset.inline_formset_data }}">
6
+ <fieldset class="module {{ inline_admin_formset.classes }} ba-inline-fieldset" aria-labelledby="{{ inline_admin_formset.formset.prefix }}-heading">
7
+ {% if inline_admin_formset.is_collapsible %}<details class="ba-collapse"><summary class="ba-collapse-summary">{% endif %}
8
+ <h2 id="{{ inline_admin_formset.formset.prefix }}-heading" class="inline-heading ba-inline-heading">
9
+ <span>
10
+ {% if inline_admin_formset.formset.max_num == 1 %}
11
+ {{ inline_admin_formset.opts.verbose_name|capfirst }}
12
+ {% else %}
13
+ {{ inline_admin_formset.opts.verbose_name_plural|capfirst }}
14
+ {% endif %}
15
+ </span>
16
+ {% if inline_admin_formset.is_collapsible %}
17
+ <svg class="ba-icon ba-collapse-chevron" aria-hidden="true"><use href="#ba-chevron-down"></use></svg>
18
+ {% endif %}
19
+ </h2>
20
+ {% if inline_admin_formset.is_collapsible %}</summary>{% endif %}
21
+
22
+ {{ inline_admin_formset.formset.management_form }}
23
+ {{ inline_admin_formset.formset.non_form_errors }}
24
+
25
+ {% for inline_admin_form in inline_admin_formset %}
26
+ <div class="inline-related ba-inline-card{% 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 last-related{% endif %}"
27
+ id="{{ inline_admin_formset.formset.prefix }}-{% if forloop.last and inline_admin_formset.has_add_permission %}empty{% else %}{{ forloop.counter0 }}{% endif %}">
28
+ <div class="ba-inline-card-header">
29
+ <h3>
30
+ <b>{{ inline_admin_formset.opts.verbose_name|capfirst }}:</b>
31
+ <span class="inline_label">
32
+ {% if inline_admin_form.original %}
33
+ {{ inline_admin_form.original }}
34
+ {% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %}
35
+ <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' }}">
36
+ {% if inline_admin_formset.has_change_permission %}{% translate "Change" %}{% else %}{% translate "View" %}{% endif %}
37
+ </a>
38
+ {% endif %}
39
+ {% else %}
40
+ #{{ forloop.counter }}
41
+ {% endif %}
42
+ </span>
43
+ {% if inline_admin_form.show_url %}
44
+ <a href="{{ inline_admin_form.absolute_url }}">{% translate "View on site" %}</a>
45
+ {% endif %}
46
+ </h3>
47
+ {% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission and inline_admin_form.original %}
48
+ <span class="delete">{{ inline_admin_form.deletion_field.field }} {{ inline_admin_form.deletion_field.label_tag }}</span>
49
+ {% endif %}
50
+ </div>
51
+
52
+ {% if inline_admin_form.form.non_field_errors %}{{ inline_admin_form.form.non_field_errors }}{% endif %}
53
+
54
+ {% with parent_counter=forloop.counter0 %}
55
+ {% for fieldset in inline_admin_form %}
56
+ {% include "admin/includes/fieldset.html" with heading_level=4 prefix=fieldset.formset.prefix id_prefix=parent_counter id_suffix=forloop.counter0 %}
57
+ {% endfor %}
58
+ {% endwith %}
59
+
60
+ {% if inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %}
61
+ {% if inline_admin_form.fk_field %}{{ inline_admin_form.fk_field.field }}{% endif %}
62
+ </div>
63
+ {% endfor %}
64
+
65
+ {% if inline_admin_formset.is_collapsible %}</details>{% endif %}
66
+ </fieldset>
67
+ </div>
@@ -0,0 +1,94 @@
1
+ {% load i18n admin_urls static admin_modify %}
2
+ <div class="js-inline-admin-formset inline-group ba-inline-group" id="{{ inline_admin_formset.formset.prefix }}-group"
3
+ data-inline-type="tabular"
4
+ data-inline-formset="{{ inline_admin_formset.inline_formset_data }}">
5
+ <div class="tabular inline-related ba-inline ba-inline-tabular {% if forloop.last %}last-related{% endif %}">
6
+ {{ inline_admin_formset.formset.management_form }}
7
+ <fieldset class="module {{ inline_admin_formset.classes }} ba-inline-fieldset" aria-labelledby="{{ inline_admin_formset.formset.prefix }}-heading">
8
+ {% if inline_admin_formset.is_collapsible %}<details class="ba-collapse"><summary class="ba-collapse-summary">{% endif %}
9
+ <h2 id="{{ inline_admin_formset.formset.prefix }}-heading" class="inline-heading ba-inline-heading">
10
+ <span>
11
+ {% if inline_admin_formset.formset.max_num == 1 %}
12
+ {{ inline_admin_formset.opts.verbose_name|capfirst }}
13
+ {% else %}
14
+ {{ inline_admin_formset.opts.verbose_name_plural|capfirst }}
15
+ {% endif %}
16
+ </span>
17
+ {% if inline_admin_formset.is_collapsible %}
18
+ <svg class="ba-icon ba-collapse-chevron" aria-hidden="true"><use href="#ba-chevron-down"></use></svg>
19
+ {% endif %}
20
+ </h2>
21
+ {% if inline_admin_formset.is_collapsible %}</summary>{% endif %}
22
+
23
+ {{ inline_admin_formset.formset.non_form_errors }}
24
+ <div class="wrapper table-responsive">
25
+ <table class="table table-sm align-middle ba-inline-table">
26
+ <thead>
27
+ <tr>
28
+ <th class="original"></th>
29
+ {% for field in inline_admin_formset.fields %}
30
+ <th class="column-{{ field.name }}{% if field.required %} required{% endif %}{% if field.widget.is_hidden %} hidden{% endif %}">
31
+ {{ field.label|capfirst }}
32
+ {% if field.help_text %}
33
+ <img src="{% static 'admin/img/icon-unknown.svg' %}" class="help help-tooltip" width="10" height="10" alt="({{ field.help_text|striptags }})" title="{{ field.help_text|striptags }}">
34
+ {% endif %}
35
+ </th>
36
+ {% endfor %}
37
+ <th>{% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission %}{% translate "Delete?" %}{% endif %}</th>
38
+ </tr>
39
+ </thead>
40
+
41
+ <tbody>
42
+ {% for inline_admin_form in inline_admin_formset %}
43
+ {% if inline_admin_form.form.non_field_errors %}
44
+ <tr class="row-form-errors">
45
+ <td colspan="{{ inline_admin_form|cell_count }}">{{ inline_admin_form.form.non_field_errors }}</td>
46
+ </tr>
47
+ {% endif %}
48
+ <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 %}"
49
+ id="{{ inline_admin_formset.formset.prefix }}-{% if forloop.last and inline_admin_formset.has_add_permission %}empty{% else %}{{ forloop.counter0 }}{% endif %}">
50
+ <td class="original">
51
+ {% if inline_admin_form.original or inline_admin_form.show_url %}
52
+ <p>
53
+ {% if inline_admin_form.original %}
54
+ {{ inline_admin_form.original }}
55
+ {% if inline_admin_form.model_admin.show_change_link and inline_admin_form.model_admin.has_registered_model %}
56
+ <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' }}">
57
+ {% if inline_admin_formset.has_change_permission %}{% translate "Change" %}{% else %}{% translate "View" %}{% endif %}
58
+ </a>
59
+ {% endif %}
60
+ {% endif %}
61
+ {% if inline_admin_form.show_url %}<a href="{{ inline_admin_form.absolute_url }}">{% translate "View on site" %}</a>{% endif %}
62
+ </p>
63
+ {% endif %}
64
+ {% if inline_admin_form.needs_explicit_pk_field %}{{ inline_admin_form.pk_field.field }}{% endif %}
65
+ {% if inline_admin_form.fk_field %}{{ inline_admin_form.fk_field.field }}{% endif %}
66
+ </td>
67
+ {% for fieldset in inline_admin_form %}
68
+ {% for line in fieldset %}
69
+ {% for field in line %}
70
+ <td class="{% if field.field.name %}field-{{ field.field.name }}{% endif %}{% if field.field.is_hidden %} hidden{% endif %}">
71
+ {% if field.is_readonly %}
72
+ <p>{{ field.contents }}</p>
73
+ {% else %}
74
+ {{ field.field.errors.as_ul }}
75
+ {{ field.field }}
76
+ {% endif %}
77
+ </td>
78
+ {% endfor %}
79
+ {% endfor %}
80
+ {% endfor %}
81
+ <td class="delete">
82
+ {% if inline_admin_formset.formset.can_delete and inline_admin_formset.has_delete_permission and inline_admin_form.original %}
83
+ {{ inline_admin_form.deletion_field.field }}
84
+ {% endif %}
85
+ </td>
86
+ </tr>
87
+ {% endfor %}
88
+ </tbody>
89
+ </table>
90
+ </div>
91
+ {% if inline_admin_formset.is_collapsible %}</details>{% endif %}
92
+ </fieldset>
93
+ </div>
94
+ </div>
@@ -0,0 +1,17 @@
1
+ {% load i18n %}
2
+ <details class="ba-filter" data-filter-title="{{ title }}" open>
3
+ <summary class="ba-filter-summary">
4
+ <span>{% blocktranslate with filter_title=title %}By {{ filter_title }}{% endblocktranslate %}</span>
5
+ <svg class="ba-icon ba-filter-chevron" aria-hidden="true"><use href="#ba-chevron-down"></use></svg>
6
+ </summary>
7
+ <ul class="ba-filter-list">
8
+ {% for choice in choices %}
9
+ <li{% if choice.selected %} class="selected"{% endif %}>
10
+ <a href="{{ choice.query_string|iriencode }}"{% if choice.selected %} aria-current="true"{% endif %}>
11
+ {% if choice.selected %}<svg class="ba-icon" aria-hidden="true"><use href="#ba-check"></use></svg>{% else %}<span class="ba-filter-check" aria-hidden="true"></span>{% endif %}
12
+ <span>{{ choice.display }}</span>
13
+ </a>
14
+ </li>
15
+ {% endfor %}
16
+ </ul>
17
+ </details>
@@ -0,0 +1,54 @@
1
+ {% load i18n %}
2
+ <fieldset class="module aligned ba-fieldset {{ fieldset.classes }}"{% if fieldset.name %} aria-labelledby="{{ prefix }}-{{ id_prefix }}-{{ id_suffix }}-heading"{% endif %}>
3
+ {% if fieldset.name %}
4
+ {% if fieldset.is_collapsible %}<details class="ba-collapse"><summary class="ba-collapse-summary">{% endif %}
5
+ <h{{ heading_level|default:2 }} id="{{ prefix }}-{{ id_prefix }}-{{ id_suffix }}-heading" class="fieldset-heading ba-fieldset-heading">
6
+ <span>{{ fieldset.name }}</span>
7
+ {% if fieldset.is_collapsible %}
8
+ <svg class="ba-icon ba-collapse-chevron" aria-hidden="true"><use href="#ba-chevron-down"></use></svg>
9
+ {% endif %}
10
+ </h{{ heading_level|default:2 }}>
11
+ {% if fieldset.is_collapsible %}</summary>{% endif %}
12
+ {% endif %}
13
+
14
+ {% if fieldset.description %}
15
+ <div class="description ba-fieldset-description">{{ fieldset.description|safe }}</div>
16
+ {% endif %}
17
+
18
+ {% for line in fieldset %}
19
+ <div class="form-row ba-form-row{% if not line.fields|length == 1 %} flex-container form-multiline{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}">
20
+ {% for field in line %}
21
+ {% if field.is_fieldset %}<fieldset class="ba-nested-fieldset"{% if field.field.help_text %} aria-describedby="{{ field.field.id_for_label }}_helptext"{% endif %}>{{ field.label_tag }}{% endif %}
22
+ <div class="flex-container ba-field{% if not field.is_readonly and field.errors or line.fields|length == 1 and line.errors %} errors{% endif %}{% if not line.fields|length == 1 %} fieldBox{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% if field.field.is_hidden %} hidden{% endif %}{% endif %}{% if field.is_checkbox %} checkbox-row{% endif %}">
23
+ {% if field.is_checkbox %}
24
+ <div class="checkbox ba-checkbox">
25
+ {{ field.field }}
26
+ {% if not field.is_fieldset %}{{ field.label_tag }}{% endif %}
27
+ </div>
28
+ {% else %}
29
+ {% if not field.is_fieldset %}{{ field.label_tag }}{% endif %}
30
+ {% endif %}
31
+
32
+ {% if field.field.help_text %}
33
+ <div class="help ba-help{% if field.field.is_hidden %} hidden{% endif %}"{% if field.field.id_for_label %} id="{{ field.field.id_for_label }}_helptext"{% endif %}>
34
+ <div>{{ field.field.help_text|safe }}</div>
35
+ </div>
36
+ {% endif %}
37
+
38
+ {% if line.fields|length == 1 %}{{ line.errors }}{% endif %}
39
+ {% if not line.fields|length == 1 and not field.is_readonly %}{{ field.errors }}{% endif %}
40
+
41
+ {% if not field.is_checkbox %}
42
+ {% if field.is_readonly %}
43
+ <div class="readonly ba-readonly">{{ field.contents }}</div>
44
+ {% else %}
45
+ {{ field.field }}
46
+ {% endif %}
47
+ {% endif %}
48
+ </div>
49
+ {% if field.is_fieldset %}</fieldset>{% endif %}
50
+ {% endfor %}
51
+ </div>
52
+ {% endfor %}
53
+ {% if fieldset.name and fieldset.is_collapsible %}</details>{% endif %}
54
+ </fieldset>
@@ -0,0 +1,7 @@
1
+ {% load i18n %}
2
+ <h2>{% translate "Summary" %}</h2>
3
+ <ul class="ba-object-list">
4
+ {% for model_name, object_count in model_count %}
5
+ <li>{{ model_name|capfirst }}: <strong>{{ object_count }}</strong></li>
6
+ {% endfor %}
7
+ </ul>
@@ -0,0 +1,136 @@
1
+ {% extends "admin/base_site.html" %}
2
+ {% load i18n static admin_filters log %}
3
+
4
+ {% block bodyclass %}{{ block.super }} dashboard ba-dashboard-page ba-no-sidebar{% endblock %}
5
+ {% block content_title %}{% endblock %}
6
+ {% block content_subtitle %}{% endblock %}
7
+ {% block nav-breadcrumbs %}{% endblock %}
8
+ {% block nav-sidebar %}{% endblock %}
9
+ {% block coltype %}colMS{% endblock %}
10
+
11
+ {% block content %}
12
+ <div id="content-main" class="app-list ba-dashboard">
13
+ <div class="ba-dashboard-main">
14
+ {% block dashboard-heading %}
15
+ <div class="ba-section-heading">
16
+ <div>
17
+ <p class="ba-eyebrow">{% translate 'Administration' %}</p>
18
+ <h1 class="ba-page-title">{{ index_title|default:_('Site administration') }}</h1>
19
+ </div>
20
+ {% if site_url %}
21
+ <a class="btn btn-outline theme-secondary btn-sm" href="{{ site_url }}">
22
+ <svg class="ba-icon" aria-hidden="true"><use href="#ba-external"></use></svg>
23
+ {% translate 'View site' %}
24
+ </a>
25
+ {% endif %}
26
+ </div>
27
+ {% endblock %}
28
+
29
+ {% block app-list %}
30
+ {% if app_list %}
31
+ <div class="ba-app-grid">
32
+ {% for app in app_list %}
33
+ <section class="card ba-app-card">
34
+ <div class="card-header ba-app-card-header">
35
+ <span class="ba-app-icon" aria-hidden="true">{{ app.name|first|upper }}</span>
36
+ <a class="ba-app-name" href="{{ app.app_url }}">{{ app.name }}</a>
37
+ <span class="badge badge-subtle theme-secondary ba-app-count">{{ app.models|length }}</span>
38
+ </div>
39
+ <div class="card-body">
40
+ <ul class="ba-model-list">
41
+ {% for model in app.models %}
42
+ <li>
43
+ {% if model.admin_url %}
44
+ <a class="ba-model-link" href="{{ model.admin_url }}">
45
+ <span class="ba-model-icon" aria-hidden="true">{{ model.name|first|upper }}</span>
46
+ <span class="ba-model-name">{{ model.name }}</span>
47
+ </a>
48
+ {% else %}
49
+ <span class="ba-model-link ba-model-disabled">
50
+ <span class="ba-model-icon" aria-hidden="true">{{ model.name|first|upper }}</span>
51
+ <span class="ba-model-name">{{ model.name }}</span>
52
+ </span>
53
+ {% endif %}
54
+ <span class="ba-model-actions">
55
+ {% if model.add_url %}
56
+ <a class="btn btn-icon btn-outline theme-secondary btn-sm" href="{{ model.add_url }}"
57
+ title="{% blocktranslate with name=model.name %}Add {{ name }}{% endblocktranslate %}">
58
+ <svg class="ba-icon" aria-hidden="true"><use href="#ba-plus"></use></svg>
59
+ <span class="visually-hidden">{% blocktranslate with name=model.name %}Add {{ name }}{% endblocktranslate %}</span>
60
+ </a>
61
+ {% endif %}
62
+ {% if model.admin_url %}
63
+ <a class="btn btn-icon btn-outline theme-secondary btn-sm" href="{{ model.admin_url }}"
64
+ title="{% if model.view_only %}{% translate 'View' %}{% else %}{% translate 'Change' %}{% endif %}">
65
+ <svg class="ba-icon" aria-hidden="true"><use href="{% if model.view_only %}#ba-eye{% else %}#ba-edit{% endif %}"></use></svg>
66
+ <span class="visually-hidden">{% if model.view_only %}{% translate 'View' %}{% else %}{% translate 'Change' %}{% endif %}</span>
67
+ </a>
68
+ {% endif %}
69
+ </span>
70
+ </li>
71
+ {% endfor %}
72
+ </ul>
73
+ </div>
74
+ </section>
75
+ {% endfor %}
76
+ </div>
77
+ {% else %}
78
+ <p class="ba-empty">{% translate 'You don’t have permission to view or edit anything.' %}</p>
79
+ {% endif %}
80
+ {% endblock %}
81
+ </div>
82
+
83
+ {% block dashboard-aside %}
84
+ <aside class="ba-dashboard-aside">
85
+ {% block recent-actions %}
86
+ <section class="card ba-recent-card">
87
+ <div class="card-header">
88
+ <h2 class="ba-card-title">
89
+ <svg class="ba-icon" aria-hidden="true"><use href="#ba-clock"></use></svg>
90
+ {% translate 'Recent actions' %}
91
+ </h2>
92
+ </div>
93
+ <div class="card-body">
94
+ {% get_admin_log 10 as admin_log for_user user %}
95
+ {% if not admin_log %}
96
+ <p class="ba-muted">{% translate 'None available' %}</p>
97
+ {% else %}
98
+ <ol class="ba-timeline">
99
+ {% for entry in admin_log %}
100
+ <li class="ba-timeline-item ba-log-{% if entry.is_addition %}add{% elif entry.is_change %}change{% else %}delete{% endif %}">
101
+ <span class="ba-timeline-icon" aria-hidden="true">
102
+ <svg class="ba-icon"><use href="{% if entry.is_addition %}#ba-plus{% elif entry.is_change %}#ba-edit{% else %}#ba-trash{% endif %}"></use></svg>
103
+ </span>
104
+ <div class="ba-timeline-content">
105
+ <span class="visually-hidden">
106
+ {% if entry.is_addition %}{% translate 'Added:' %}
107
+ {% elif entry.is_change %}{% translate 'Changed:' %}
108
+ {% elif entry.is_deletion %}{% translate 'Deleted:' %}{% endif %}
109
+ </span>
110
+ {% if entry.is_deletion or not entry.get_admin_url %}
111
+ <span class="ba-timeline-object">{{ entry.object_repr|to_object_display_value }}</span>
112
+ {% else %}
113
+ <a class="ba-timeline-object" href="{{ entry.get_admin_url }}">{{ entry.object_repr|to_object_display_value }}</a>
114
+ {% endif %}
115
+ <span class="ba-timeline-meta">
116
+ {% if entry.content_type %}
117
+ {{ entry.content_type.name|capfirst }} ·
118
+ {% else %}
119
+ {% translate 'Unknown content' %} ·
120
+ {% endif %}
121
+ <time datetime="{{ entry.action_time|date:'c' }}">{{ entry.action_time|timesince }} {% translate 'ago' %}</time>
122
+ </span>
123
+ </div>
124
+ </li>
125
+ {% endfor %}
126
+ </ol>
127
+ {% endif %}
128
+ </div>
129
+ </section>
130
+ {% endblock %}
131
+ </aside>
132
+ {% endblock %}
133
+ </div>
134
+ {% endblock %}
135
+
136
+ {% block sidebar %}{% endblock %}
@@ -0,0 +1,99 @@
1
+ {% extends "admin/base_site.html" %}
2
+ {% load i18n static %}
3
+
4
+ {% block title %}{% if form.errors %}{% translate "Error:" %} {% endif %}{{ block.super }}{% endblock %}
5
+ {% block extrastyle %}{{ block.super }}{% csp_nonce_attr form.media %}{% endblock %}
6
+ {% block bodyclass %}{{ block.super }} login ba-login-page ba-no-sidebar{% endblock %}
7
+
8
+ {% block usertools %}{% endblock %}
9
+ {% block nav-global %}{% endblock %}
10
+ {% block nav-sidebar %}{% endblock %}
11
+ {% block nav-breadcrumbs %}{% endblock %}
12
+ {% block content_title %}{% endblock %}
13
+
14
+ {% block content %}
15
+ <div class="ba-login">
16
+ <section class="ba-login-brand" aria-hidden="true">
17
+ <span class="ba-login-brand-mark">{{ site_header|default:_('Django administration')|first|upper }}</span>
18
+ <h1>{{ site_header|default:_('Django administration') }}</h1>
19
+ <p>{% translate 'Sign in to manage content, users and site settings.' %}</p>
20
+ <ul class="ba-login-facts">
21
+ <li>
22
+ <svg class="ba-icon"><use href="#ba-database"></use></svg>
23
+ {% translate 'Manage your data' %}
24
+ </li>
25
+ <li>
26
+ <svg class="ba-icon"><use href="#ba-clock"></use></svg>
27
+ {% translate 'Track recent activity' %}
28
+ </li>
29
+ <li>
30
+ <svg class="ba-icon"><use href="#ba-user"></use></svg>
31
+ {% translate 'Control permissions' %}
32
+ </li>
33
+ </ul>
34
+ </section>
35
+
36
+ <section class="card ba-login-card">
37
+ <div class="card-body">
38
+ <p class="ba-eyebrow">{% translate 'Account access' %}</p>
39
+ <h1 class="ba-login-title">{% translate 'Log in' %}</h1>
40
+ <p class="ba-muted">{% translate 'Enter your administrator credentials to continue.' %}</p>
41
+
42
+ {% if form.errors and not form.non_field_errors %}
43
+ <div class="alert theme-danger ba-login-alert" role="alert">
44
+ <svg class="ba-icon" aria-hidden="true"><use href="#ba-alert"></use></svg>
45
+ <div>
46
+ {% blocktranslate count counter=form.errors.items|length %}Please correct the error below.{% plural %}Please correct the errors below.{% endblocktranslate %}
47
+ </div>
48
+ </div>
49
+ {% endif %}
50
+
51
+ {% for error in form.non_field_errors %}
52
+ <div class="alert theme-danger ba-login-alert" role="alert">
53
+ <svg class="ba-icon" aria-hidden="true"><use href="#ba-alert"></use></svg>
54
+ <div>{{ error }}</div>
55
+ </div>
56
+ {% endfor %}
57
+
58
+ {% if user.is_authenticated %}
59
+ <div class="alert theme-warning ba-login-alert" role="alert">
60
+ <svg class="ba-icon" aria-hidden="true"><use href="#ba-alert"></use></svg>
61
+ <div>
62
+ {% blocktranslate trimmed %}
63
+ You are authenticated as {{ username }}, but are not authorized to
64
+ access this page. Would you like to login to a different account?
65
+ {% endblocktranslate %}
66
+ </div>
67
+ </div>
68
+ {% endif %}
69
+
70
+ <form action="{{ app_path }}" method="post" id="login-form">
71
+ {% csrf_token %}
72
+ <div class="ba-form-group">
73
+ <label class="form-label" for="{{ form.username.id_for_label }}">{{ form.username.label }}</label>
74
+ {{ form.username }}
75
+ {{ form.username.errors }}
76
+ </div>
77
+ <div class="ba-form-group">
78
+ <label class="form-label" for="{{ form.password.id_for_label }}">{{ form.password.label }}</label>
79
+ {{ form.password }}
80
+ {{ form.password.errors }}
81
+ <input type="hidden" name="next" value="{{ next }}">
82
+ </div>
83
+
84
+ {% url 'admin_password_reset' as password_reset_url %}
85
+ {% if password_reset_url %}
86
+ <div class="ba-login-reset">
87
+ <a href="{{ password_reset_url }}">{% translate 'Forgotten your login credentials?' %}</a>
88
+ </div>
89
+ {% endif %}
90
+
91
+ <button type="submit" class="btn btn-solid theme-primary btn-lg ba-login-submit">
92
+ <svg class="ba-icon" aria-hidden="true"><use href="#ba-lock"></use></svg>
93
+ {% translate 'Log in' %}
94
+ </button>
95
+ </form>
96
+ </div>
97
+ </section>
98
+ </div>
99
+ {% endblock %}
@@ -0,0 +1,21 @@
1
+ {% load i18n %}
2
+ <button class="sticky toggle-nav-sidebar ba-sr-toggle" id="toggle-nav-sidebar"
3
+ aria-label="{% translate 'Toggle navigation' %}" aria-controls="nav-sidebar" tabindex="-1" aria-hidden="true"></button>
4
+ <nav class="sticky ba-sidebar" id="nav-sidebar" aria-label="{% translate 'Sidebar' %}">
5
+ <div class="ba-sidebar-mobile-header">
6
+ <span class="ba-sidebar-mobile-title">{% translate 'Navigation' %}</span>
7
+ <button type="button" class="btn btn-icon btn-outline theme-secondary ba-sidebar-close"
8
+ id="ba-sidebar-close" aria-label="{% translate 'Close navigation' %}">
9
+ <svg class="ba-icon" aria-hidden="true"><use href="#ba-x"></use></svg>
10
+ </button>
11
+ </div>
12
+ <div class="ba-sidebar-search">
13
+ <svg class="ba-icon" aria-hidden="true"><use href="#ba-search"></use></svg>
14
+ <input type="search" id="nav-filter" class="form-control form-control-sm"
15
+ placeholder="{% translate 'Start typing to filter…' %}"
16
+ aria-label="{% translate 'Filter navigation items' %}">
17
+ </div>
18
+ <div class="ba-sidebar-scroll">
19
+ {% include 'admin/app_list.html' with app_list=available_apps show_changelinks=False %}
20
+ </div>
21
+ </nav>
@@ -0,0 +1,81 @@
1
+ {% extends "admin/base_site.html" %}
2
+ {% load i18n admin_urls admin_filters %}
3
+
4
+ {% block breadcrumbs %}
5
+ <ol class="breadcrumb">
6
+ <li class="breadcrumb-item">
7
+ <a class="breadcrumb-link" href="{% url 'admin:index' %}">
8
+ <svg class="ba-icon" aria-hidden="true"><use href="#ba-home"></use></svg>
9
+ {% translate 'Home' %}
10
+ </a>
11
+ </li>
12
+ <li class="breadcrumb-divider" aria-hidden="true"></li>
13
+ <li class="breadcrumb-item">
14
+ <a class="breadcrumb-link" href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
15
+ </li>
16
+ <li class="breadcrumb-divider" aria-hidden="true"></li>
17
+ <li class="breadcrumb-item">
18
+ <a class="breadcrumb-link" href="{% url opts|admin_urlname:'changelist' %}">{{ module_name }}</a>
19
+ </li>
20
+ <li class="breadcrumb-divider" aria-hidden="true"></li>
21
+ <li class="breadcrumb-item">
22
+ <a class="breadcrumb-link" href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|to_object_display_value|truncatewords:"18" }}</a>
23
+ </li>
24
+ <li class="breadcrumb-divider" aria-hidden="true"></li>
25
+ <li class="breadcrumb-item">
26
+ <span class="breadcrumb-link active" aria-current="page">{% translate 'History' %}</span>
27
+ </li>
28
+ </ol>
29
+ {% endblock %}
30
+
31
+ {% block content %}
32
+ <div id="content-main">
33
+ <div id="change-history" class="module card ba-history-card">
34
+ <div class="card-body">
35
+ {% if action_list %}
36
+ <div class="table-responsive">
37
+ <table class="table table-hover table-sm align-middle ba-history-table">
38
+ <thead>
39
+ <tr>
40
+ <th scope="col">{% translate 'Date/time' %}</th>
41
+ <th scope="col">{% translate 'User' %}</th>
42
+ <th scope="col">{% translate 'Action' %}</th>
43
+ </tr>
44
+ </thead>
45
+ <tbody>
46
+ {% for action in action_list %}
47
+ <tr>
48
+ <th scope="row" class="ba-nowrap">{{ action.action_time|date:"DATETIME_FORMAT" }}</th>
49
+ <td>{{ action.user.get_username }}{% if action.user.get_full_name %} ({{ action.user.get_full_name }}){% endif %}</td>
50
+ <td>{{ action.get_change_message }}</td>
51
+ </tr>
52
+ {% endfor %}
53
+ </tbody>
54
+ </table>
55
+ </div>
56
+ <nav class="paginator ba-pagination" aria-labelledby="pagination">
57
+ <h2 id="pagination" class="visually-hidden">{% blocktranslate with name=opts.verbose_name %}Pagination {{ name }} entries{% endblocktranslate %}</h2>
58
+ {% if pagination_required %}
59
+ <ul class="pagination pagination-sm">
60
+ {% for i in page_range %}
61
+ {% if i == action_list.paginator.ELLIPSIS %}
62
+ <li class="page-item disabled"><span class="page-link">{{ action_list.paginator.ELLIPSIS }}</span></li>
63
+ {% elif i == action_list.number %}
64
+ <li class="page-item active"><a role="button" class="page-link" href="" aria-current="page">{{ i }}</a></li>
65
+ {% else %}
66
+ <li class="page-item"><a role="button" class="page-link" href="?{{ page_var }}={{ i }}">{{ i }}</a></li>
67
+ {% endif %}
68
+ {% endfor %}
69
+ </ul>
70
+ {% endif %}
71
+ <div class="ba-pagination-summary">
72
+ {{ action_list.paginator.count }} {% blocktranslate count counter=action_list.paginator.count %}entry{% plural %}entries{% endblocktranslate %}
73
+ </div>
74
+ </nav>
75
+ {% else %}
76
+ <p class="ba-empty">{% translate 'This object doesn’t have a change history. It probably wasn’t added via this admin site.' %}</p>
77
+ {% endif %}
78
+ </div>
79
+ </div>
80
+ </div>
81
+ {% endblock %}
@@ -0,0 +1,18 @@
1
+ {% load admin_list %}
2
+ {% load i18n %}
3
+ <nav class="paginator ba-pagination" aria-labelledby="pagination">
4
+ <h2 id="pagination" class="visually-hidden">{% blocktranslate with name=cl.opts.verbose_name_plural %}Pagination {{ name }}{% endblocktranslate %}</h2>
5
+ {% if pagination_required %}
6
+ <ul class="pagination pagination-sm">
7
+ {% for i in page_range %}
8
+ <li class="page-item">{% paginator_number cl i %}</li>
9
+ {% endfor %}
10
+ </ul>
11
+ {% endif %}
12
+ <div class="ba-pagination-summary">
13
+ <span>{{ cl.result_count }} {% if cl.result_count == 1 %}{{ cl.opts.verbose_name }}{% else %}{{ cl.opts.verbose_name_plural }}{% endif %}</span>
14
+ {% if show_all_url %}
15
+ <a href="{{ show_all_url }}" class="showall">{% translate 'Show all' %}</a>
16
+ {% endif %}
17
+ </div>
18
+ </nav>
@@ -0,0 +1,28 @@
1
+ {% load i18n static %}
2
+ {% if cl.search_fields %}
3
+ <div id="toolbar" class="ba-toolbar">
4
+ <h2 id="changelist-search-form" class="visually-hidden">{% blocktranslate with name=cl.opts.verbose_name_plural %}Search {{ name }}{% endblocktranslate %}</h2>
5
+ <form id="changelist-search" method="get" role="search" aria-labelledby="changelist-search-form" class="ba-search">
6
+ <div class="ba-search-field">
7
+ <svg class="ba-icon ba-search-icon" aria-hidden="true"><use href="#ba-search"></use></svg>
8
+ <label for="searchbar" class="visually-hidden">{% translate 'Search' %}</label>
9
+ <input type="text" size="40" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar"
10
+ class="form-control" placeholder="{% translate 'Search' %}…"
11
+ {% if cl.search_help_text %}aria-describedby="searchbar_helptext"{% endif %}>
12
+ <button type="submit" class="btn btn-solid theme-primary">{% translate 'Search' %}</button>
13
+ </div>
14
+ {% if show_result_count %}
15
+ <span class="small quiet ba-search-count">
16
+ {% blocktranslate count counter=cl.result_count %}{{ counter }} result{% plural %}{{ counter }} results{% endblocktranslate %}
17
+ (<a href="?{% if cl.is_popup %}{{ is_popup_var }}=1{% if cl.add_facets %}&{% endif %}{% endif %}{% if cl.add_facets %}{{ is_facets_var }}{% 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>)
18
+ </span>
19
+ {% endif %}
20
+ {% for pair in cl.params.items %}
21
+ {% if pair.0 != search_var %}<input type="hidden" name="{{ pair.0 }}" value="{{ pair.1 }}">{% endif %}
22
+ {% endfor %}
23
+ </form>
24
+ {% if cl.search_help_text %}
25
+ <div class="help ba-search-help" id="searchbar_helptext">{{ cl.search_help_text }}</div>
26
+ {% endif %}
27
+ </div>
28
+ {% endif %}