mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Sort keywords column: matched entries first, then unmatched, both alphabetical
When filters are active, viable (matched) keywords now appear at the top of the Mots-clés column so users don't have to scroll past faded entries to find clickable tags. Both groups maintain alphabetical order internally.
This commit is contained in:
@@ -111,6 +111,12 @@ foreach ($filterColumns as $col) {
|
||||
<div id="repertoire-index" class="repertoire-index">
|
||||
|
||||
<?php
|
||||
// Sort keywords: matched first (alpha), then unmatched (alpha) — keeps viable
|
||||
// tags at the top so users don't have to scroll past faded entries.
|
||||
usort($repData['keywords'], fn($a, $b) =>
|
||||
($b['matched'] <=> $a['matched']) ?: strcasecmp($a['value'], $b['value'])
|
||||
);
|
||||
|
||||
// Render filter columns in the correct left-to-right order.
|
||||
// Students column (non-filter) is inserted between keywords and AP/or/fi/years.
|
||||
$renderOrder = ['years', 'ap', 'or', 'fi', 'students', 'kw'];
|
||||
|
||||
Reference in New Issue
Block a user