Update division page generation.

This commit is contained in:
Kim Taylor
2025-04-11 21:21:42 +10:00
parent 675058201a
commit 1735d52781
2 changed files with 4 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ function create_or_update_page() {
media_inputs+=("$file") media_inputs+=("$file")
fi fi
done done
for file in "$DATA_PATH"/*.{jpeg,jpg,png,gif}.json; do for file in "$DATA_PATH"/../*.{jpeg,jpg,png,gif}.json; do
if test -f "$file"; then if test -f "$file"; then
media_inputs+=("$file") media_inputs+=("$file")
fi fi

View File

@@ -114,20 +114,20 @@ if (isset($config["survey"])) {
strtolower($candidate[$propertyOnCandidate]) === strtolower($groupName); strtolower($candidate[$propertyOnCandidate]) === strtolower($groupName);
}); });
usort($groupCandidates, function($a, $b) { usort($candidates, function($a, $b) {
if ($a == $b) { if ($a == $b) {
return 0; return 0;
} }
return (((int) $a['Rating']) < ((int) $b['Rating'])) ? 1 : -1; return (((int) $a['Rating']) < ((int) $b['Rating'])) ? 1 : -1;
}); });
if (count($groupCandidates) > 0): if (count($candidates) > 0):
?> ?>
<?php <?php
$columnCount = 4; $columnCount = 4;
$chunkedWardCandidates = array_chunk($groupCandidates, $columnCount); $chunkedWardCandidates = array_chunk($candidates, $columnCount);
?> ?>
<?php foreach($chunkedWardCandidates as $chunk): ?> <?php foreach($chunkedWardCandidates as $chunk): ?>