Erreur de calcul du total des évènements nationaux
This commit is contained in:
parent
9a4a10ec95
commit
272404dac4
@ -51,12 +51,16 @@ class LefPays {
|
||||
|
||||
public function toArray() {
|
||||
$evenementsnationaux;
|
||||
$totalevenementsnationaux = 0;
|
||||
if ($this->lieuxnationaux) {
|
||||
$evenementsnationaux = $this->lieuxnationaux->toArray();
|
||||
foreach($evenementsnationaux as $key => $array) {
|
||||
$totalevenementsnationaux = $totalevenementsnationaux + count($array);
|
||||
}
|
||||
} else {
|
||||
$evenementsnationaux = array();
|
||||
}
|
||||
return array("name" => $this->name, "code" => $this->code, "sousregions" => $this->regions, "evenementsnationaux" => $evenementsnationaux);
|
||||
return array("name" => $this->name, "code" => $this->code, "sousregions" => $this->regions, "evenementsnationaux" => $evenementsnationaux, "totalevenementsnationaux" => $totalevenementsnationaux);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<BOUCLE_repartition(DATA){source tableau, #GET{repartition/pays}}>
|
||||
<h3 class="spip">#VALEUR{name}</h3>
|
||||
<B_evenementsnationaux>
|
||||
<details class="evenement-Details"><summary class="evenement-Summary">[(#VALEUR{code}|=={internet}|?{'En ligne', 'À l’échelle nationale'})] <span class="evenement-Total">([(#VALEUR|count)])</span></summary>
|
||||
<details class="evenement-Details"><summary class="evenement-Summary">[(#VALEUR{code}|=={internet}|?{'En ligne', 'À l’échelle nationale'})] <span class="evenement-Total">([(#VALEUR{totalevenementsnationaux})])</span></summary>
|
||||
|
||||
<BOUCLE_evenementsnationaux(DATA) {source tableau, #VALEUR{evenementsnationaux}}>
|
||||
[<h5 class="spip">(#CLE)</h5>]
|
||||
|
Loading…
Reference in New Issue
Block a user