Update division page generation.
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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): ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user