@@ -201,6 +201,10 @@ public function individual($url){
201
201
$ data ['ageMeanPop ' ] = round (mean_age_france ());
202
202
$ data ['groupsAge ' ] = $ this ->stats_model ->get_groups_age ();
203
203
if ($ data ['groupsAge ' ]) {
204
+ foreach ($ data ['groupsAge ' ] as &$ group ) {
205
+ $ group ['couleurCard ' ] = $ this ->groupes_model ->get_groupe_color_card (['uid ' => $ group ['organeRef ' ]]);
206
+ }
207
+ unset($ group );
204
208
$ data ['groupOldest ' ] = array_slice ($ data ['groupsAge ' ], 0 , 1 );
205
209
$ data ['groupOldest ' ] = $ data ['groupOldest ' ][0 ];
206
210
$ data ['groupOldest ' ]['couleurAssociee ' ] = $ this ->groupes_model ->get_groupe_color (array ($ data ['groupOldest ' ]['libelleAbrev ' ], $ data ['groupOldest ' ]['couleurAssociee ' ]));
@@ -223,6 +227,10 @@ public function individual($url){
223
227
$ data ['womenMean ' ]['diff ' ] = abs ($ women_mean [1 ]['percentage ' ] - $ data ['womenMean ' ]['nSociety ' ]);
224
228
$ data ['groupsWomen ' ] = $ this ->stats_model ->get_groups_women ();
225
229
if ($ data ['groupsWomen ' ]) {
230
+ foreach ($ data ['groupsWomen ' ] as &$ group ) {
231
+ $ group ['couleurCard ' ] = $ this ->groupes_model ->get_groupe_color_card (['uid ' => $ group ['organeRef ' ]]);
232
+ }
233
+ unset($ group );
226
234
$ data ['groupsWomenFirst ' ] = $ data ['groupsWomen ' ][0 ];
227
235
$ data ['groupsWomenFirst ' ]['couleurAssociee ' ] = $ this ->groupes_model ->get_groupe_color (array ($ data ['groupsWomenFirst ' ]['libelleAbrev ' ], $ data ['groupsWomenFirst ' ]['couleurAssociee ' ]));
228
236
$ data ['groupsWomenLast ' ] = end ($ data ['groupsWomen ' ]);
@@ -256,6 +264,7 @@ public function individual($url){
256
264
$ data ['groups ' ] = $ this ->stats_model ->get_groups_cohesion ();
257
265
if ($ data ['groups ' ]) {
258
266
foreach ($ data ['groups ' ] as $ key => $ value ) {
267
+ $ data ['groups ' ][$ key ]['couleurCard ' ] = $ this ->groupes_model ->get_groupe_color_card (['uid ' => $ value ['organeRef ' ]]);
259
268
if ($ value ['libelleAbrev ' ] == 'NI ' ) {
260
269
$ keyRemoveNI = $ key ;
261
270
}
@@ -323,6 +332,10 @@ public function individual($url){
323
332
324
333
$ data ['groups ' ] = $ data ['n_sps ' ] < 10 ? $ data ['votes_all ' ] : $ data ['votes_sps ' ];
325
334
if ($ data ['groups ' ]) {
335
+ foreach ($ data ['groups ' ] as &$ group ) {
336
+ $ group ['couleurCard ' ] = $ this ->groupes_model ->get_groupe_color_card (['uid ' => $ group ['organeRef ' ]]);
337
+ }
338
+ unset($ group );
326
339
$ data ['groupsFirst ' ] = $ data ['groups ' ][0 ];
327
340
$ data ['groupsFirst ' ]['couleurAssociee ' ] = $ this ->groupes_model ->get_groupe_color (array ($ data ['groupsFirst ' ]['libelleAbrev ' ], $ data ['groupsFirst ' ]['couleurAssociee ' ]));
328
341
$ data ['groupsLast ' ] = end ($ data ['groups ' ]);
@@ -362,6 +375,12 @@ public function individual($url){
362
375
}
363
376
$ data ['groups_rose ' ] = $ this ->jobs_model ->get_groups_rose ();
364
377
if ($ data ['groups_rose ' ]) {
378
+ foreach ($ data ['groups_rose ' ] as &$ group ) {
379
+ $ group ['couleurCard ' ] = $ this ->groupes_model ->get_groupe_color_card ([
380
+ 'uid ' => $ group ['organeRef ' ]
381
+ ]);
382
+ }
383
+ unset($ group );
365
384
$ data ['rose_first ' ] = $ data ['groups_rose ' ][0 ];
366
385
$ data ['rose_first ' ]['couleurAssociee ' ] = $ this ->groupes_model ->get_groupe_color (array ($ data ['rose_first ' ]['libelleAbrev ' ], $ data ['rose_first ' ]['couleurAssociee ' ]));
367
386
$ groups = $ this ->jobs_model ->get_groups_representativite ();
0 commit comments