QoL 50: sortLink and sortFirstOrder in functions/format.php replace the 48 copied sort_link closures and 115 hand-written header links, the first click on a new column sorts names A-Z and dates, money and counts newest or largest first, with changelog lines

This commit is contained in:
johnnyq
2026-11-21 00:59:32 -05:00
parent 3f70c5e2e4
commit 15aeab602d
70 changed files with 348 additions and 621 deletions

View File

@@ -44,9 +44,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<thead class="text-dark <?php if ($num_rows[0] == 0) { echo "d-none"; } ?> text-nowrap">
<tr>
<th class="ps-3">
<a class="text-dark" href="?<?= $url_query_strings_sort ?>&sort=module_name&order=<?= $disp ?>">
Module <?php if ($sort == 'module_name') { echo $order_icon; } ?>
</a>
<?= sortLink('module_name', 'Module') ?>
</th>
<th class="text-center">Action</th>
</tr>