vanta-admin 0.15.2__tar.gz → 0.16.1__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.1}/PKG-INFO +3 -1
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/README.md +2 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/pyproject.toml +1 -1
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/css/theme.admin.css +154 -20
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/css/theme.responsive.css +38 -1
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/js/forms.js +22 -9
- vanta_admin-0.16.1/vanta_admin/static/admin/js/pagination-jump.js +34 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/admin/change_list.html +1 -0
- vanta_admin-0.16.1/vanta_admin/templates/admin/pagination.html +37 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templatetags/admin_theme.py +25 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1/vanta_admin.egg-info}/PKG-INFO +3 -1
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/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.1}/LICENSE +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/MANIFEST.in +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/setup.cfg +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/__init__.py +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/apps.py +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/css/theme.base.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/css/theme.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/css/theme.fonts.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/css/theme.login.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/css/theme.tokens.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/css/two_factor.css +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/fonts/OFL-Fira-Code.txt +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/fonts/OFL-Inter.txt +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/fonts/OFL-JetBrains-Mono.txt +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/fonts/fira-code-variable.woff2 +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/fonts/inter-italic-variable.woff2 +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/fonts/inter-variable.woff2 +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/fonts/jetbrains-mono-italic-variable.woff2 +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/fonts/jetbrains-mono-variable.woff2 +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/img/favicon.png +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/img/icon-no.svg +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/img/icon-unknown.svg +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/img/icon-yes.svg +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/js/changelist.js +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/js/messages.js +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/js/sidebar.js +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/js/vanta-theme.js +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/admin/app_index.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/admin/base.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/admin/base_site.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/admin/change_form.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/admin/filter.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/admin/includes/breadcrumbs.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/admin/index.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/admin/login.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/admin/nav_sidebar.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/two_factor/_base.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/two_factor/_base_focus.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/two_factor/_wizard_actions.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/two_factor/core/login.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/two_factor/core/setup_complete.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/two_factor/profile/disable.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/two_factor/profile/profile.html +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templatetags/__init__.py +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin.egg-info/dependency_links.txt +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin.egg-info/requires.txt +0 -0
- {vanta_admin-0.15.2 → vanta_admin-0.16.1}/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.1
|
|
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.1"
|
|
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"
|
|
@@ -4325,6 +4325,15 @@ html[data-theme="light"] #changelist table thead th.sorted .sortoptions {
|
|
|
4325
4325
|
vertical-align: middle;
|
|
4326
4326
|
}
|
|
4327
4327
|
|
|
4328
|
+
/* Keep Django boolean values compact when Vanta's larger replacement SVGs win
|
|
4329
|
+
the shared admin/img static namespace. */
|
|
4330
|
+
#changelist table tbody img[alt="True"],
|
|
4331
|
+
#changelist table tbody img[alt="False"],
|
|
4332
|
+
#changelist table tbody img[alt="None"] {
|
|
4333
|
+
width: 15px;
|
|
4334
|
+
height: 15px;
|
|
4335
|
+
}
|
|
4336
|
+
|
|
4328
4337
|
#changelist table tbody tr:nth-child(even) th,
|
|
4329
4338
|
#changelist table tbody tr:nth-child(even) td {
|
|
4330
4339
|
background: var(--row-bg-alt);
|
|
@@ -4399,52 +4408,177 @@ html[data-theme="light"] #changelist table thead th.sorted .sortoptions {
|
|
|
4399
4408
|
}
|
|
4400
4409
|
|
|
4401
4410
|
#changelist .paginator {
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
}
|
|
4406
|
-
|
|
4407
|
-
#changelist .admin-pagination-pages {
|
|
4411
|
+
flex: 1 1 auto;
|
|
4412
|
+
min-width: 0;
|
|
4413
|
+
position: relative;
|
|
4408
4414
|
display: flex;
|
|
4409
|
-
|
|
4410
|
-
|
|
4415
|
+
align-items: center;
|
|
4416
|
+
justify-content: space-between;
|
|
4417
|
+
gap: 1rem;
|
|
4411
4418
|
}
|
|
4412
4419
|
|
|
4413
|
-
#changelist .admin-pagination-
|
|
4420
|
+
#changelist .admin-pagination-summary {
|
|
4421
|
+
flex: 1 1 auto;
|
|
4422
|
+
min-width: 0;
|
|
4414
4423
|
color: var(--muted);
|
|
4415
4424
|
line-height: 1.35;
|
|
4416
4425
|
}
|
|
4417
4426
|
|
|
4418
|
-
#changelist .admin-pagination-
|
|
4427
|
+
#changelist .admin-pagination-summary .showall {
|
|
4428
|
+
margin-left: 0.45rem;
|
|
4419
4429
|
min-height: 0;
|
|
4420
4430
|
padding: 0;
|
|
4421
4431
|
}
|
|
4422
4432
|
|
|
4423
|
-
#changelist .
|
|
4433
|
+
#changelist .admin-pagination-pages-group,
|
|
4434
|
+
#changelist .admin-pagination-pages {
|
|
4435
|
+
display: flex;
|
|
4436
|
+
align-items: center;
|
|
4437
|
+
flex-wrap: wrap;
|
|
4438
|
+
gap: 0.22rem;
|
|
4439
|
+
}
|
|
4440
|
+
|
|
4441
|
+
#changelist .paginator a,
|
|
4442
|
+
#changelist .paginator .admin-pagination-control {
|
|
4424
4443
|
display: inline-flex;
|
|
4425
4444
|
align-items: center;
|
|
4426
|
-
|
|
4427
|
-
|
|
4445
|
+
justify-content: center;
|
|
4446
|
+
min-width: 2rem;
|
|
4447
|
+
min-height: 2rem;
|
|
4448
|
+
padding: 0 0.34rem;
|
|
4449
|
+
border: 0;
|
|
4428
4450
|
border-radius: 0.27rem;
|
|
4451
|
+
background: var(--surface-muted);
|
|
4429
4452
|
color: var(--text);
|
|
4430
4453
|
font-weight: 650;
|
|
4454
|
+
transition: color var(--admin-transition), background-color var(--admin-transition), transform var(--admin-transition), filter var(--admin-transition);
|
|
4455
|
+
}
|
|
4456
|
+
|
|
4457
|
+
#changelist .paginator .admin-pagination-control--arrow {
|
|
4458
|
+
font-size: 1.55rem;
|
|
4459
|
+
line-height: 1;
|
|
4431
4460
|
}
|
|
4432
4461
|
|
|
4433
4462
|
#changelist .paginator a:hover,
|
|
4434
|
-
#changelist .paginator a:focus {
|
|
4463
|
+
#changelist .paginator a:focus-visible {
|
|
4435
4464
|
color: var(--accent-strong);
|
|
4436
|
-
background: var(--
|
|
4465
|
+
background: var(--surface-hover);
|
|
4466
|
+
transform: translateY(-2px);
|
|
4467
|
+
}
|
|
4468
|
+
|
|
4469
|
+
#changelist .paginator a:focus-visible {
|
|
4470
|
+
outline: 2px solid var(--admin-focus, var(--accent));
|
|
4471
|
+
outline-offset: 2px;
|
|
4472
|
+
}
|
|
4473
|
+
|
|
4474
|
+
#changelist .paginator .admin-pagination-pages a[aria-current="page"] {
|
|
4475
|
+
background: var(--accent-soft);
|
|
4476
|
+
color: var(--accent-strong);
|
|
4477
|
+
font-weight: 720;
|
|
4478
|
+
}
|
|
4479
|
+
|
|
4480
|
+
#changelist .paginator .admin-pagination-pages a[aria-current="page"]:hover,
|
|
4481
|
+
#changelist .paginator .admin-pagination-pages a[aria-current="page"]:focus-visible {
|
|
4482
|
+
background: var(--accent-soft);
|
|
4483
|
+
}
|
|
4484
|
+
|
|
4485
|
+
html[data-theme="light"] #changelist .paginator .admin-pagination-pages a[aria-current="page"] {
|
|
4486
|
+
background: var(--accent);
|
|
4487
|
+
color: #fff;
|
|
4488
|
+
}
|
|
4489
|
+
|
|
4490
|
+
html[data-theme="light"] #changelist .paginator .admin-pagination-pages a[aria-current="page"]:hover,
|
|
4491
|
+
html[data-theme="light"] #changelist .paginator .admin-pagination-pages a[aria-current="page"]:focus-visible {
|
|
4492
|
+
background: var(--accent-2);
|
|
4493
|
+
color: #fff;
|
|
4494
|
+
}
|
|
4495
|
+
|
|
4496
|
+
#changelist .paginator .admin-pagination-pages a:not([aria-current="page"]) {
|
|
4497
|
+
min-width: 2rem;
|
|
4437
4498
|
}
|
|
4438
4499
|
|
|
4439
|
-
#changelist .paginator .
|
|
4500
|
+
#changelist .paginator .admin-pagination-pages a:not([aria-current="page"]),
|
|
4501
|
+
#changelist .paginator .admin-pagination-pages a[aria-current="page"] {
|
|
4502
|
+
padding: 0 0.34rem;
|
|
4503
|
+
}
|
|
4504
|
+
|
|
4505
|
+
#changelist .paginator .admin-pagination-pages {
|
|
4506
|
+
gap: 0.14rem;
|
|
4507
|
+
}
|
|
4508
|
+
|
|
4509
|
+
#changelist .admin-pagination-pages-group {
|
|
4510
|
+
position: absolute;
|
|
4511
|
+
left: 50%;
|
|
4512
|
+
top: 50%;
|
|
4513
|
+
flex-wrap: nowrap;
|
|
4514
|
+
transform: translate(-50%, -50%);
|
|
4515
|
+
}
|
|
4516
|
+
|
|
4517
|
+
#changelist .admin-pagination-jump {
|
|
4440
4518
|
display: inline-flex;
|
|
4519
|
+
margin-left: auto;
|
|
4441
4520
|
align-items: center;
|
|
4442
|
-
|
|
4443
|
-
|
|
4521
|
+
gap: 0.28rem;
|
|
4522
|
+
color: var(--muted);
|
|
4523
|
+
font-size: 0.78rem;
|
|
4524
|
+
font-weight: 650;
|
|
4525
|
+
white-space: nowrap;
|
|
4526
|
+
}
|
|
4527
|
+
|
|
4528
|
+
#changelist .admin-pagination-jump input {
|
|
4529
|
+
width: 3rem;
|
|
4530
|
+
min-height: 2rem;
|
|
4531
|
+
padding: 0 0.3rem;
|
|
4532
|
+
border: 0;
|
|
4444
4533
|
border-radius: 0.27rem;
|
|
4445
|
-
background: var(--
|
|
4534
|
+
background: var(--surface-muted);
|
|
4535
|
+
color: var(--text);
|
|
4536
|
+
font: inherit;
|
|
4537
|
+
text-align: center;
|
|
4538
|
+
}
|
|
4539
|
+
|
|
4540
|
+
#changelist .admin-pagination-jump input::-webkit-inner-spin-button,
|
|
4541
|
+
#changelist .admin-pagination-jump input::-webkit-outer-spin-button {
|
|
4542
|
+
margin: 0;
|
|
4543
|
+
appearance: none;
|
|
4544
|
+
}
|
|
4545
|
+
|
|
4546
|
+
#changelist .admin-pagination-jump input[type="number"] {
|
|
4547
|
+
appearance: textfield;
|
|
4548
|
+
-moz-appearance: textfield;
|
|
4549
|
+
}
|
|
4550
|
+
|
|
4551
|
+
#changelist .admin-pagination-jump input:focus-visible {
|
|
4552
|
+
outline: 2px solid var(--admin-focus, var(--accent));
|
|
4553
|
+
outline-offset: 2px;
|
|
4554
|
+
}
|
|
4555
|
+
|
|
4556
|
+
#changelist .admin-pagination-jump-total {
|
|
4557
|
+
color: var(--subtle);
|
|
4558
|
+
}
|
|
4559
|
+
|
|
4560
|
+
#changelist .admin-pagination-jump button {
|
|
4561
|
+
min-height: 2rem;
|
|
4562
|
+
padding: 0 0.55rem;
|
|
4563
|
+
border: 0;
|
|
4564
|
+
border-radius: 0.27rem;
|
|
4565
|
+
background: var(--surface-muted);
|
|
4566
|
+
color: var(--text);
|
|
4567
|
+
cursor: pointer;
|
|
4568
|
+
font: inherit;
|
|
4569
|
+
transition: color var(--admin-transition), background-color var(--admin-transition), transform var(--admin-transition);
|
|
4570
|
+
}
|
|
4571
|
+
|
|
4572
|
+
#changelist .admin-pagination-jump button:hover,
|
|
4573
|
+
#changelist .admin-pagination-jump button:focus-visible {
|
|
4574
|
+
background: var(--surface-hover);
|
|
4446
4575
|
color: var(--accent-strong);
|
|
4447
|
-
|
|
4576
|
+
transform: translateY(-2px);
|
|
4577
|
+
}
|
|
4578
|
+
|
|
4579
|
+
#changelist .admin-pagination-jump button:focus-visible {
|
|
4580
|
+
outline: 2px solid var(--admin-focus, var(--accent));
|
|
4581
|
+
outline-offset: 2px;
|
|
4448
4582
|
}
|
|
4449
4583
|
|
|
4450
4584
|
/* 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.1
|
|
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.1}/vanta_admin/static/admin/fonts/OFL-JetBrains-Mono.txt
RENAMED
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/fonts/fira-code-variable.woff2
RENAMED
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/static/admin/fonts/inter-italic-variable.woff2
RENAMED
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.1}/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.1}/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.1}/vanta_admin/templates/two_factor/_wizard_actions.html
RENAMED
|
File without changes
|
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/two_factor/core/setup_complete.html
RENAMED
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/two_factor/profile/disable.html
RENAMED
|
File without changes
|
{vanta_admin-0.15.2 → vanta_admin-0.16.1}/vanta_admin/templates/two_factor/profile/profile.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|