Add delete/batch-delete and sortable columns to admin list

- Database: add deleteThesis() and bulkDeleteTheses() methods with file cleanup
- Database: add SORT_MAP + buildOrderBy() for safe column sorting
- Database: getThesesList() now respects sort/dir filter params
- New action: actions/delete.php (single + batch delete with CSRF)
- Admin index: delete button per row with confirmation dialog
- Admin index: batch 'Supprimer' button in bulk actions bar
- Admin index: sortable column headers (ID, Titre, Année, Orientation, AP, Statut)
- Admin index: sort state preserved in pagination links
- CSS: admin-btn-delete (red muted), admin-sort-link styles
This commit is contained in:
Pontoporeia
2026-04-15 12:58:03 +02:00
parent 1b104df51e
commit fd4fb5ce4a
5 changed files with 225 additions and 9 deletions

View File

@@ -498,6 +498,20 @@
white-space: nowrap;
}
/* Sortable column headers */
.admin-sort-link {
color: inherit;
text-decoration: none;
display: inline-flex;
align-items: center;
gap: 2px;
transition: color 0.15s;
}
.admin-sort-link:hover {
color: var(--accent-primary);
}
.admin-body table td {
padding: var(--space-2xs) var(--space-xs);
border-bottom: 1px solid var(--border-primary);
@@ -621,6 +635,15 @@
background: var(--bg-tertiary);
}
.admin-btn-delete {
background: var(--error-muted-bg);
color: var(--error);
border-color: var(--error-muted-border, var(--border-primary));
}
.admin-btn-delete:hover {
filter: brightness(0.9);
}
.publish-form {
display: inline;
margin: 0;