vanta-admin 0.15.2__tar.gz → 0.16.0__tar.gz
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.
- {vanta_admin-0.15.2/vanta_admin.egg-info → vanta_admin-0.16.0}/PKG-INFO +3 -1
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/README.md +2 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/pyproject.toml +1 -1
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/css/theme.admin.css +145 -20
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/css/theme.responsive.css +38 -1
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/js/forms.js +22 -9
- vanta_admin-0.16.0/vanta_admin/static/admin/js/pagination-jump.js +34 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/admin/change_list.html +1 -0
- vanta_admin-0.16.0/vanta_admin/templates/admin/pagination.html +37 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templatetags/admin_theme.py +25 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0/vanta_admin.egg-info}/PKG-INFO +3 -1
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin.egg-info/SOURCES.txt +1 -0
- vanta_admin-0.15.2/vanta_admin/templates/admin/pagination.html +0 -19
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/LICENSE +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/MANIFEST.in +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/setup.cfg +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/__init__.py +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/apps.py +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/css/theme.base.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/css/theme.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/css/theme.fonts.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/css/theme.login.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/css/theme.tokens.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/css/two_factor.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/OFL-Fira-Code.txt +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/OFL-Inter.txt +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/OFL-JetBrains-Mono.txt +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/fira-code-variable.woff2 +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/inter-italic-variable.woff2 +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/inter-variable.woff2 +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/jetbrains-mono-italic-variable.woff2 +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/jetbrains-mono-variable.woff2 +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/img/favicon.png +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/img/icon-no.svg +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/img/icon-unknown.svg +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/img/icon-yes.svg +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/js/changelist.js +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/js/messages.js +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/js/sidebar.js +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/js/vanta-theme.js +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/admin/app_index.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/admin/base.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/admin/base_site.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/admin/change_form.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/admin/filter.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/admin/includes/breadcrumbs.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/admin/index.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/admin/login.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/admin/nav_sidebar.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/two_factor/_base.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/two_factor/_base_focus.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/two_factor/_wizard_actions.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/two_factor/core/login.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/two_factor/core/setup_complete.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/two_factor/profile/disable.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/two_factor/profile/profile.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templatetags/__init__.py +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin.egg-info/dependency_links.txt +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin.egg-info/requires.txt +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vanta-admin
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.0
|
|
4
4
|
Summary: A sharp, dark, and portable Django admin theme forged for builders who want the admin to feel less default.
|
|
5
5
|
Author: oli-dev0
|
|
6
6
|
License-Expression: MIT
|
|
@@ -74,6 +74,8 @@ feels more deliberate in everyday use.
|
|
|
74
74
|
grouped many-to-many selectors.
|
|
75
75
|
- Styled select controls for common admin dropdowns, plus a clearer enhanced
|
|
76
76
|
horizontal selector for many-to-many fields.
|
|
77
|
+
- Vanta-styled changelist pagination with result summaries, previous and next
|
|
78
|
+
controls, and a direct page jump.
|
|
77
79
|
- Built-in icons for common admin areas, models, and recent actions.
|
|
78
80
|
- A cleaner account menu with display preferences, project links, password
|
|
79
81
|
access, 2FA settings, logout, and a Vanta support link.
|
|
@@ -49,6 +49,8 @@ feels more deliberate in everyday use.
|
|
|
49
49
|
grouped many-to-many selectors.
|
|
50
50
|
- Styled select controls for common admin dropdowns, plus a clearer enhanced
|
|
51
51
|
horizontal selector for many-to-many fields.
|
|
52
|
+
- Vanta-styled changelist pagination with result summaries, previous and next
|
|
53
|
+
controls, and a direct page jump.
|
|
52
54
|
- Built-in icons for common admin areas, models, and recent actions.
|
|
53
55
|
- A cleaner account menu with display preferences, project links, password
|
|
54
56
|
access, 2FA settings, logout, and a Vanta support link.
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "vanta-admin"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.16.0"
|
|
8
8
|
description = "A sharp, dark, and portable Django admin theme forged for builders who want the admin to feel less default."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -4399,52 +4399,177 @@ html[data-theme="light"] #changelist table thead th.sorted .sortoptions {
|
|
|
4399
4399
|
}
|
|
4400
4400
|
|
|
4401
4401
|
#changelist .paginator {
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
}
|
|
4406
|
-
|
|
4407
|
-
#changelist .admin-pagination-pages {
|
|
4402
|
+
flex: 1 1 auto;
|
|
4403
|
+
min-width: 0;
|
|
4404
|
+
position: relative;
|
|
4408
4405
|
display: flex;
|
|
4409
|
-
|
|
4410
|
-
|
|
4406
|
+
align-items: center;
|
|
4407
|
+
justify-content: space-between;
|
|
4408
|
+
gap: 1rem;
|
|
4411
4409
|
}
|
|
4412
4410
|
|
|
4413
|
-
#changelist .admin-pagination-
|
|
4411
|
+
#changelist .admin-pagination-summary {
|
|
4412
|
+
flex: 1 1 auto;
|
|
4413
|
+
min-width: 0;
|
|
4414
4414
|
color: var(--muted);
|
|
4415
4415
|
line-height: 1.35;
|
|
4416
4416
|
}
|
|
4417
4417
|
|
|
4418
|
-
#changelist .admin-pagination-
|
|
4418
|
+
#changelist .admin-pagination-summary .showall {
|
|
4419
|
+
margin-left: 0.45rem;
|
|
4419
4420
|
min-height: 0;
|
|
4420
4421
|
padding: 0;
|
|
4421
4422
|
}
|
|
4422
4423
|
|
|
4423
|
-
#changelist .
|
|
4424
|
+
#changelist .admin-pagination-pages-group,
|
|
4425
|
+
#changelist .admin-pagination-pages {
|
|
4426
|
+
display: flex;
|
|
4427
|
+
align-items: center;
|
|
4428
|
+
flex-wrap: wrap;
|
|
4429
|
+
gap: 0.22rem;
|
|
4430
|
+
}
|
|
4431
|
+
|
|
4432
|
+
#changelist .paginator a,
|
|
4433
|
+
#changelist .paginator .admin-pagination-control {
|
|
4424
4434
|
display: inline-flex;
|
|
4425
4435
|
align-items: center;
|
|
4426
|
-
|
|
4427
|
-
|
|
4436
|
+
justify-content: center;
|
|
4437
|
+
min-width: 2rem;
|
|
4438
|
+
min-height: 2rem;
|
|
4439
|
+
padding: 0 0.34rem;
|
|
4440
|
+
border: 0;
|
|
4428
4441
|
border-radius: 0.27rem;
|
|
4442
|
+
background: var(--surface-muted);
|
|
4429
4443
|
color: var(--text);
|
|
4430
4444
|
font-weight: 650;
|
|
4445
|
+
transition: color var(--admin-transition), background-color var(--admin-transition), transform var(--admin-transition), filter var(--admin-transition);
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
#changelist .paginator .admin-pagination-control--arrow {
|
|
4449
|
+
font-size: 1.55rem;
|
|
4450
|
+
line-height: 1;
|
|
4431
4451
|
}
|
|
4432
4452
|
|
|
4433
4453
|
#changelist .paginator a:hover,
|
|
4434
|
-
#changelist .paginator a:focus {
|
|
4454
|
+
#changelist .paginator a:focus-visible {
|
|
4435
4455
|
color: var(--accent-strong);
|
|
4436
|
-
background: var(--
|
|
4456
|
+
background: var(--surface-hover);
|
|
4457
|
+
transform: translateY(-2px);
|
|
4458
|
+
}
|
|
4459
|
+
|
|
4460
|
+
#changelist .paginator a:focus-visible {
|
|
4461
|
+
outline: 2px solid var(--admin-focus, var(--accent));
|
|
4462
|
+
outline-offset: 2px;
|
|
4463
|
+
}
|
|
4464
|
+
|
|
4465
|
+
#changelist .paginator .admin-pagination-pages a[aria-current="page"] {
|
|
4466
|
+
background: var(--accent-soft);
|
|
4467
|
+
color: var(--accent-strong);
|
|
4468
|
+
font-weight: 720;
|
|
4469
|
+
}
|
|
4470
|
+
|
|
4471
|
+
#changelist .paginator .admin-pagination-pages a[aria-current="page"]:hover,
|
|
4472
|
+
#changelist .paginator .admin-pagination-pages a[aria-current="page"]:focus-visible {
|
|
4473
|
+
background: var(--accent-soft);
|
|
4474
|
+
}
|
|
4475
|
+
|
|
4476
|
+
html[data-theme="light"] #changelist .paginator .admin-pagination-pages a[aria-current="page"] {
|
|
4477
|
+
background: var(--accent);
|
|
4478
|
+
color: #fff;
|
|
4479
|
+
}
|
|
4480
|
+
|
|
4481
|
+
html[data-theme="light"] #changelist .paginator .admin-pagination-pages a[aria-current="page"]:hover,
|
|
4482
|
+
html[data-theme="light"] #changelist .paginator .admin-pagination-pages a[aria-current="page"]:focus-visible {
|
|
4483
|
+
background: var(--accent-2);
|
|
4484
|
+
color: #fff;
|
|
4485
|
+
}
|
|
4486
|
+
|
|
4487
|
+
#changelist .paginator .admin-pagination-pages a:not([aria-current="page"]) {
|
|
4488
|
+
min-width: 2rem;
|
|
4489
|
+
}
|
|
4490
|
+
|
|
4491
|
+
#changelist .paginator .admin-pagination-pages a:not([aria-current="page"]),
|
|
4492
|
+
#changelist .paginator .admin-pagination-pages a[aria-current="page"] {
|
|
4493
|
+
padding: 0 0.34rem;
|
|
4494
|
+
}
|
|
4495
|
+
|
|
4496
|
+
#changelist .paginator .admin-pagination-pages {
|
|
4497
|
+
gap: 0.14rem;
|
|
4498
|
+
}
|
|
4499
|
+
|
|
4500
|
+
#changelist .admin-pagination-pages-group {
|
|
4501
|
+
position: absolute;
|
|
4502
|
+
left: 50%;
|
|
4503
|
+
top: 50%;
|
|
4504
|
+
flex-wrap: nowrap;
|
|
4505
|
+
transform: translate(-50%, -50%);
|
|
4437
4506
|
}
|
|
4438
4507
|
|
|
4439
|
-
#changelist .
|
|
4508
|
+
#changelist .admin-pagination-jump {
|
|
4440
4509
|
display: inline-flex;
|
|
4510
|
+
margin-left: auto;
|
|
4441
4511
|
align-items: center;
|
|
4442
|
-
|
|
4443
|
-
|
|
4512
|
+
gap: 0.28rem;
|
|
4513
|
+
color: var(--muted);
|
|
4514
|
+
font-size: 0.78rem;
|
|
4515
|
+
font-weight: 650;
|
|
4516
|
+
white-space: nowrap;
|
|
4517
|
+
}
|
|
4518
|
+
|
|
4519
|
+
#changelist .admin-pagination-jump input {
|
|
4520
|
+
width: 3rem;
|
|
4521
|
+
min-height: 2rem;
|
|
4522
|
+
padding: 0 0.3rem;
|
|
4523
|
+
border: 0;
|
|
4444
4524
|
border-radius: 0.27rem;
|
|
4445
|
-
background: var(--
|
|
4525
|
+
background: var(--surface-muted);
|
|
4526
|
+
color: var(--text);
|
|
4527
|
+
font: inherit;
|
|
4528
|
+
text-align: center;
|
|
4529
|
+
}
|
|
4530
|
+
|
|
4531
|
+
#changelist .admin-pagination-jump input::-webkit-inner-spin-button,
|
|
4532
|
+
#changelist .admin-pagination-jump input::-webkit-outer-spin-button {
|
|
4533
|
+
margin: 0;
|
|
4534
|
+
appearance: none;
|
|
4535
|
+
}
|
|
4536
|
+
|
|
4537
|
+
#changelist .admin-pagination-jump input[type="number"] {
|
|
4538
|
+
appearance: textfield;
|
|
4539
|
+
-moz-appearance: textfield;
|
|
4540
|
+
}
|
|
4541
|
+
|
|
4542
|
+
#changelist .admin-pagination-jump input:focus-visible {
|
|
4543
|
+
outline: 2px solid var(--admin-focus, var(--accent));
|
|
4544
|
+
outline-offset: 2px;
|
|
4545
|
+
}
|
|
4546
|
+
|
|
4547
|
+
#changelist .admin-pagination-jump-total {
|
|
4548
|
+
color: var(--subtle);
|
|
4549
|
+
}
|
|
4550
|
+
|
|
4551
|
+
#changelist .admin-pagination-jump button {
|
|
4552
|
+
min-height: 2rem;
|
|
4553
|
+
padding: 0 0.55rem;
|
|
4554
|
+
border: 0;
|
|
4555
|
+
border-radius: 0.27rem;
|
|
4556
|
+
background: var(--surface-muted);
|
|
4557
|
+
color: var(--text);
|
|
4558
|
+
cursor: pointer;
|
|
4559
|
+
font: inherit;
|
|
4560
|
+
transition: color var(--admin-transition), background-color var(--admin-transition), transform var(--admin-transition);
|
|
4561
|
+
}
|
|
4562
|
+
|
|
4563
|
+
#changelist .admin-pagination-jump button:hover,
|
|
4564
|
+
#changelist .admin-pagination-jump button:focus-visible {
|
|
4565
|
+
background: var(--surface-hover);
|
|
4446
4566
|
color: var(--accent-strong);
|
|
4447
|
-
|
|
4567
|
+
transform: translateY(-2px);
|
|
4568
|
+
}
|
|
4569
|
+
|
|
4570
|
+
#changelist .admin-pagination-jump button:focus-visible {
|
|
4571
|
+
outline: 2px solid var(--admin-focus, var(--accent));
|
|
4572
|
+
outline-offset: 2px;
|
|
4448
4573
|
}
|
|
4449
4574
|
|
|
4450
4575
|
/* Filters */
|
|
@@ -1,10 +1,32 @@
|
|
|
1
1
|
/* Responsive */
|
|
2
2
|
|
|
3
|
-
@media (max-width:
|
|
3
|
+
@media (max-width: 1280px) {
|
|
4
4
|
:root {
|
|
5
5
|
--admin-sidebar-width: 260px;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
#changelist .paginator {
|
|
9
|
+
align-items: center;
|
|
10
|
+
flex-wrap: wrap;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
#changelist .admin-pagination-summary {
|
|
14
|
+
flex-basis: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
#changelist .admin-pagination-pages-group {
|
|
18
|
+
position: static;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
width: 100%;
|
|
22
|
+
transform: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#changelist .admin-pagination-jump {
|
|
26
|
+
align-self: flex-end;
|
|
27
|
+
margin-left: auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
8
30
|
#content.colMS {
|
|
9
31
|
grid-template-columns: 1fr;
|
|
10
32
|
gap: 1.6rem;
|
|
@@ -309,6 +331,21 @@
|
|
|
309
331
|
flex: 1 1 12rem;
|
|
310
332
|
}
|
|
311
333
|
|
|
334
|
+
#changelist .paginator {
|
|
335
|
+
display: flex;
|
|
336
|
+
align-items: flex-start;
|
|
337
|
+
flex-direction: column;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
#changelist .admin-pagination-pages-group {
|
|
341
|
+
width: 100%;
|
|
342
|
+
justify-content: center;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
#changelist .admin-pagination-jump {
|
|
346
|
+
align-self: flex-end;
|
|
347
|
+
}
|
|
348
|
+
|
|
312
349
|
.change-form p.datetime {
|
|
313
350
|
align-items: flex-start;
|
|
314
351
|
}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
{
|
|
4
|
-
const customSelects = Array.from(document.querySelectorAll('select')).filter((select) => (
|
|
5
|
-
!select.multiple
|
|
6
|
-
&& (!select.size || select.size <= 1)
|
|
7
|
-
&& select.dataset.vantaEnhanced !== 'true'
|
|
8
|
-
));
|
|
9
|
-
|
|
10
4
|
function enhanceActionSelect(select, index) {
|
|
11
5
|
const label = select.closest('label');
|
|
12
6
|
if (select.dataset.vantaEnhanced === 'true') {
|
|
@@ -165,9 +159,28 @@
|
|
|
165
159
|
return dropdown;
|
|
166
160
|
}
|
|
167
161
|
|
|
168
|
-
const customDropdowns =
|
|
169
|
-
|
|
170
|
-
|
|
162
|
+
const customDropdowns = [];
|
|
163
|
+
let customSelectIndex = 0;
|
|
164
|
+
|
|
165
|
+
function enhanceCustomSelects(root = document) {
|
|
166
|
+
const selects = Array.from(root.querySelectorAll('select')).filter((select) => (
|
|
167
|
+
!select.multiple
|
|
168
|
+
&& (!select.size || select.size <= 1)
|
|
169
|
+
&& select.dataset.vantaEnhanced !== 'true'
|
|
170
|
+
));
|
|
171
|
+
|
|
172
|
+
customDropdowns.push(
|
|
173
|
+
...selects.map((select) => enhanceActionSelect(select, customSelectIndex++)).filter(Boolean),
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
enhanceCustomSelects();
|
|
178
|
+
|
|
179
|
+
document.addEventListener('formset:added', (event) => {
|
|
180
|
+
if (event.target instanceof Element) {
|
|
181
|
+
enhanceCustomSelects(event.target);
|
|
182
|
+
}
|
|
183
|
+
});
|
|
171
184
|
|
|
172
185
|
function parseStructuredLabel(text) {
|
|
173
186
|
const parts = text.split('|').map((part) => part.trim()).filter(Boolean);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
{
|
|
4
|
+
const jump = document.querySelector('[data-admin-pagination-jump]');
|
|
5
|
+
const input = jump?.querySelector('input[name="p"]');
|
|
6
|
+
const button = jump?.querySelector('[data-admin-pagination-go]');
|
|
7
|
+
|
|
8
|
+
if (jump && input && button) {
|
|
9
|
+
function goToPage() {
|
|
10
|
+
const minimum = Number(input.min) || 1;
|
|
11
|
+
const maximum = Number(input.max) || minimum;
|
|
12
|
+
const requestedPage = Number.parseInt(input.value, 10);
|
|
13
|
+
|
|
14
|
+
if (!Number.isInteger(requestedPage)) {
|
|
15
|
+
input.focus();
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const page = Math.min(Math.max(requestedPage, minimum), maximum);
|
|
20
|
+
input.value = page;
|
|
21
|
+
const url = new URL(window.location.href);
|
|
22
|
+
url.searchParams.set('p', String(page));
|
|
23
|
+
window.location.assign(url.toString());
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
button.addEventListener('click', goToPage);
|
|
27
|
+
input.addEventListener('keydown', (event) => {
|
|
28
|
+
if (event.key === 'Enter') {
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
goToPage();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
{{ media.js }}
|
|
25
25
|
<script src="{% static 'admin/js/filters.js' %}" defer></script>
|
|
26
26
|
<script src="{% static 'admin/js/changelist.js' %}" defer></script>
|
|
27
|
+
<script src="{% static 'admin/js/pagination-jump.js' %}" defer></script>
|
|
27
28
|
{% endblock %}
|
|
28
29
|
|
|
29
30
|
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-list{% endblock %}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{% load i18n admin_list admin_theme %}
|
|
2
|
+
<nav class="paginator" aria-labelledby="pagination">
|
|
3
|
+
<h2 id="pagination" class="visually-hidden">
|
|
4
|
+
{% blocktranslate with name=cl.opts.verbose_name_plural %}Pagination {{ name }}{% endblocktranslate %}
|
|
5
|
+
</h2>
|
|
6
|
+
<div class="admin-pagination-summary">
|
|
7
|
+
{% pagination_summary cl %}
|
|
8
|
+
{% if show_all_url %}
|
|
9
|
+
<a href="{{ show_all_url }}" class="showall">{% translate "Show all" %}</a>
|
|
10
|
+
{% endif %}
|
|
11
|
+
</div>
|
|
12
|
+
{% if pagination_required %}
|
|
13
|
+
<div class="admin-pagination-pages-group">
|
|
14
|
+
{% if cl.page_num > 1 %}
|
|
15
|
+
<a href="{% pagination_url cl cl.page_num|add:'-1' %}" class="admin-pagination-control admin-pagination-control--arrow" aria-label="{% translate 'Previous page' %}">
|
|
16
|
+
<span aria-hidden="true">‹</span>
|
|
17
|
+
</a>
|
|
18
|
+
{% endif %}
|
|
19
|
+
<div class="admin-pagination-pages">
|
|
20
|
+
{% for i in page_range %}
|
|
21
|
+
{% paginator_number cl i %}
|
|
22
|
+
{% endfor %}
|
|
23
|
+
</div>
|
|
24
|
+
{% if cl.page_num < cl.paginator.num_pages %}
|
|
25
|
+
<a href="{% pagination_url cl cl.page_num|add:'1' %}" class="admin-pagination-control admin-pagination-control--arrow" aria-label="{% translate 'Next page' %}">
|
|
26
|
+
<span aria-hidden="true">›</span>
|
|
27
|
+
</a>
|
|
28
|
+
{% endif %}
|
|
29
|
+
</div>
|
|
30
|
+
<div class="admin-pagination-jump" role="group" aria-label="{% translate 'Go to page' %}" data-admin-pagination-jump>
|
|
31
|
+
<label for="admin-pagination-page">{% translate "Page" %}</label>
|
|
32
|
+
<input id="admin-pagination-page" name="p" type="number" min="1" max="{{ cl.paginator.num_pages }}" value="{{ cl.page_num }}" inputmode="numeric">
|
|
33
|
+
<span class="admin-pagination-jump-total">{% blocktranslate with total=cl.paginator.num_pages %}of {{ total }}{% endblocktranslate %}</span>
|
|
34
|
+
<button type="button" data-admin-pagination-go>{% translate "Go" %}</button>
|
|
35
|
+
</div>
|
|
36
|
+
{% endif %}
|
|
37
|
+
</nav>
|
|
@@ -7,6 +7,7 @@ from urllib.parse import urlencode
|
|
|
7
7
|
from django import get_version, template
|
|
8
8
|
from django.conf import settings
|
|
9
9
|
from django.contrib.admin.models import ADDITION, CHANGE, DELETION, LogEntry
|
|
10
|
+
from django.contrib.admin.views.main import PAGE_VAR
|
|
10
11
|
from django.db import connection
|
|
11
12
|
from django.urls import NoReverseMatch, reverse
|
|
12
13
|
from django.utils import timezone
|
|
@@ -171,6 +172,30 @@ def admin_display_name(user):
|
|
|
171
172
|
return str(user) if user else _("admin")
|
|
172
173
|
|
|
173
174
|
|
|
175
|
+
@register.simple_tag
|
|
176
|
+
def pagination_summary(cl):
|
|
177
|
+
result_count = cl.result_count
|
|
178
|
+
if result_count:
|
|
179
|
+
start = ((cl.page_num - 1) * cl.paginator.per_page) + 1
|
|
180
|
+
end = start + len(cl.result_list) - 1
|
|
181
|
+
else:
|
|
182
|
+
start = end = 0
|
|
183
|
+
|
|
184
|
+
label = cl.opts.verbose_name if result_count == 1 else cl.opts.verbose_name_plural
|
|
185
|
+
return format_html(
|
|
186
|
+
_("Showing {start} to {end} of {count} {label}"),
|
|
187
|
+
start=start,
|
|
188
|
+
end=end,
|
|
189
|
+
count=result_count,
|
|
190
|
+
label=label,
|
|
191
|
+
)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
@register.simple_tag
|
|
195
|
+
def pagination_url(cl, page_number):
|
|
196
|
+
return cl.get_query_string({PAGE_VAR: page_number})
|
|
197
|
+
|
|
198
|
+
|
|
174
199
|
def _visible_admin_model_keys(app_list):
|
|
175
200
|
visible_keys = set()
|
|
176
201
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vanta-admin
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.16.0
|
|
4
4
|
Summary: A sharp, dark, and portable Django admin theme forged for builders who want the admin to feel less default.
|
|
5
5
|
Author: oli-dev0
|
|
6
6
|
License-Expression: MIT
|
|
@@ -74,6 +74,8 @@ feels more deliberate in everyday use.
|
|
|
74
74
|
grouped many-to-many selectors.
|
|
75
75
|
- Styled select controls for common admin dropdowns, plus a clearer enhanced
|
|
76
76
|
horizontal selector for many-to-many fields.
|
|
77
|
+
- Vanta-styled changelist pagination with result summaries, previous and next
|
|
78
|
+
controls, and a direct page jump.
|
|
77
79
|
- Built-in icons for common admin areas, models, and recent actions.
|
|
78
80
|
- A cleaner account menu with display preferences, project links, password
|
|
79
81
|
access, 2FA settings, logout, and a Vanta support link.
|
|
@@ -32,6 +32,7 @@ vanta_admin/static/admin/img/icon-yes.svg
|
|
|
32
32
|
vanta_admin/static/admin/js/changelist.js
|
|
33
33
|
vanta_admin/static/admin/js/forms.js
|
|
34
34
|
vanta_admin/static/admin/js/messages.js
|
|
35
|
+
vanta_admin/static/admin/js/pagination-jump.js
|
|
35
36
|
vanta_admin/static/admin/js/sidebar.js
|
|
36
37
|
vanta_admin/static/admin/js/vanta-theme.js
|
|
37
38
|
vanta_admin/templates/admin/app_index.html
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{% load i18n admin_list %}
|
|
2
|
-
{% if pagination_required %}
|
|
3
|
-
<div class="admin-pagination-pages">
|
|
4
|
-
{% for i in page_range %}
|
|
5
|
-
{% paginator_number cl i %}
|
|
6
|
-
{% endfor %}
|
|
7
|
-
</div>
|
|
8
|
-
{% endif %}
|
|
9
|
-
<div class="admin-pagination-count">
|
|
10
|
-
{{ cl.result_count }}
|
|
11
|
-
{% if cl.result_count == 1 %}
|
|
12
|
-
{{ cl.opts.verbose_name }}
|
|
13
|
-
{% else %}
|
|
14
|
-
{{ cl.opts.verbose_name_plural }}
|
|
15
|
-
{% endif %}
|
|
16
|
-
{% if show_all_url %}
|
|
17
|
-
<a href="{{ show_all_url }}" class="showall">{% translate "Show all" %}</a>
|
|
18
|
-
{% endif %}
|
|
19
|
-
</div>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/OFL-JetBrains-Mono.txt
RENAMED
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/fira-code-variable.woff2
RENAMED
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/inter-italic-variable.woff2
RENAMED
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/static/admin/fonts/inter-variable.woff2
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/admin/includes/breadcrumbs.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/two_factor/_wizard_actions.html
RENAMED
|
File without changes
|
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/two_factor/core/setup_complete.html
RENAMED
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/two_factor/profile/disable.html
RENAMED
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.0}/vanta_admin/templates/two_factor/profile/profile.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|