Rework Teams/Positions access control and add full Locations/Opponents CRUD

Team managers/coaches now only see their own teams, can't create teams,
and can view (but not edit) positions -- admins keep full rights.
Locations and Opponents move from read-only stubs to full CRUD, gated
to admins and management-position staff, with a country dropdown
(django-countries) instead of free text. Also: the team list shows
player/staff counts, and deleting a news item's main photo promotes
another one instead of leaving the item without one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R1gj3J1QPfP38XWpnpbFpy
This commit is contained in:
2026-08-04 12:27:24 +02:00
parent 9a4da9b136
commit e6850232f0
23 changed files with 813 additions and 25 deletions

View File

@@ -1856,6 +1856,42 @@
}
}
}
.swap {
@layer daisyui.l1.l2 {
position: relative;
display: inline-grid;
cursor: pointer;
place-content: center;
vertical-align: middle;
webkit-user-select: none;
user-select: none;
input {
appearance: none;
border: none;
}
> * {
grid-column-start: 1;
grid-row-start: 1;
@media (prefers-reduced-motion: no-preference) {
transition-property: transform, rotate, opacity;
transition-duration: 0.2s;
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
}
.swap-on, .swap-indeterminate, input:indeterminate ~ .swap-on {
opacity: 0%;
}
input:is(:checked, :indeterminate) {
& ~ .swap-off {
opacity: 0%;
}
}
input:checked ~ .swap-on, input:indeterminate ~ .swap-indeterminate {
opacity: 100%;
backface-visibility: visible;
}
}
}
.collapse-title {
@layer daisyui.l1.l2.l3 {
grid-column-start: 1;
@@ -3078,6 +3114,10 @@
.aspect-square {
aspect-ratio: 1 / 1;
}
.size-8 {
width: calc(var(--spacing) * 8);
height: calc(var(--spacing) * 8);
}
.h-12 {
height: calc(var(--spacing) * 12);
}
@@ -3867,6 +3907,12 @@
--badge-fg: var(--color-neutral-content);
}
}
.badge-primary {
@layer daisyui.l1.l2 {
--badge-color: var(--color-primary);
--badge-fg: var(--color-primary-content);
}
}
.badge-success {
@layer daisyui.l1.l2 {
--badge-color: var(--color-success);