mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
refactor: Admin index — replace emoji buttons with Phosphor SVG icons, add back buttons + row click navigation, minimal JS, move export DB to Exporter modal, color stats, bulk bar anti-shift, credits reorder, tags icons
This commit is contained in:
@@ -403,14 +403,8 @@ try {
|
||||
$filters['sort'] = $sortCol;
|
||||
$filters['dir'] = $sortDir;
|
||||
|
||||
$perPage = 25;
|
||||
$page = isset($_GET['page']) ? max(1, intval($_GET['page'])) : 1;
|
||||
$totalCount = $db->getThesesListCount($filters);
|
||||
$totalPages = $totalCount > 0 ? (int) ceil($totalCount / $perPage) : 1;
|
||||
$page = min($page, $totalPages);
|
||||
$offset = ($page - 1) * $perPage;
|
||||
|
||||
$theses = $db->getThesesList($filters, $perPage, $offset);
|
||||
$theses = $db->getThesesList($filters, 0, 0);
|
||||
$totalCount = count($theses);
|
||||
$stats = $db->getThesesStats();
|
||||
$years = $db->getAllYears();
|
||||
$orientations = $db->getAllOrientations();
|
||||
@@ -420,9 +414,14 @@ try {
|
||||
die("Erreur lors du chargement de la liste.");
|
||||
}
|
||||
|
||||
$isHtmx = ($_SERVER['HTTP_HX_REQUEST'] ?? '') === 'true';
|
||||
$isAdmin = true; $bodyClass = 'admin-body';
|
||||
require_once APP_ROOT . '/templates/head.php';
|
||||
include APP_ROOT . '/templates/header.php';
|
||||
include APP_ROOT . '/templates/admin/index.php';
|
||||
require_once APP_ROOT . '/templates/admin/footer.php';
|
||||
if ($isHtmx) {
|
||||
include APP_ROOT . '/templates/admin/index-table.php';
|
||||
} else {
|
||||
require_once APP_ROOT . '/templates/head.php';
|
||||
include APP_ROOT . '/templates/header.php';
|
||||
include APP_ROOT . '/templates/admin/index.php';
|
||||
require_once APP_ROOT . '/templates/admin/footer.php';
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user