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")
fi
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
media_inputs+=("$file")
fi

View File

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