@@ -274,23 +274,31 @@ public function individual($url){
274
274
if ($ data ['mps ' ]) {
275
275
$ data ['participationMean ' ] = $ this ->stats_model ->get_mps_participation_mean (legislature_current ());
276
276
$ data ['participationMean ' ] = $ data ['participationMean ' ]['mean ' ];
277
+
277
278
$ data ['participationCommissionMean ' ] = $ this ->stats_model ->get_mps_participation_commission_mean (legislature_current ());
278
279
$ data ['participationCommissionMean ' ] = $ data ['participationCommissionMean ' ]['mean ' ];
280
+
279
281
$ data ['participationSolennelsMean ' ] = $ this ->stats_model ->get_mps_participation_solennels_mean (legislature_current ());
280
282
$ data ['participationSolennelsMean ' ] = $ data ['participationSolennelsMean ' ]['mean ' ];
283
+
281
284
$ data ['mpsSolennels ' ] = $ this ->stats_model ->get_mps_participation_solennels (legislature_current ());
282
285
$ data ['n_sps ' ] = $ this ->votes_model ->get_n_votes (legislature_current (), NULL , NULL , 'SPS ' );
283
286
$ data ['votesN ' ] = $ this ->votes_model ->get_n_votes (legislature_current ());
284
287
$ data ['mpsCommission ' ] = $ this ->stats_model ->get_mps_participation_commission (legislature_current ());
285
- $ data ['mpActive ' ] = array_slice ($ data ['mpsSolennels ' ], 0 , 1 );
288
+
289
+ // Features MPs
290
+ $ data ['mpsFeature ' ] = ($ data ['n_sps ' ] > 10 ? $ data ['mpsSolennels ' ] : $ data ['mps ' ])
291
+
292
+ $ data ['mpActive ' ] = array_slice ($ data ['mpsFeature ' ], 0 , 1 );
286
293
$ data ['mpActive ' ] = $ data ['mpActive ' ][0 ];
287
294
$ data ['mpActive ' ]['name ' ] = $ data ['mpActive ' ]['nameFirst ' ]." " .$ data ['mpActive ' ]['nameLast ' ];
288
295
$ data ['mpActive ' ]['couleurAssociee ' ] = $ this ->groupes_model ->get_groupe_color (array ($ data ['mpActive ' ]['libelleAbrev ' ], $ data ['mpActive ' ]['couleurAssociee ' ]));
289
- $ data ['mpActiveGender ' ] = gender ($ data ['mpActive ' ]["civ " ]);
290
- $ data ['mpInactive ' ] = end ($ data ['mpsSolennels ' ]);
296
+ $ data ['mpActiveGender ' ] = gender ($ data ['mpActive ' ]['civ ' ]);
297
+
298
+ $ data ['mpInactive ' ] = end ($ data ['mpsFeature ' ]);
291
299
$ data ['mpInactive ' ]['name ' ] = $ data ['mpInactive ' ]['nameFirst ' ]." " .$ data ['mpInactive ' ]['nameLast ' ];
292
300
$ data ['mpInactive ' ]['couleurAssociee ' ] = $ this ->groupes_model ->get_groupe_color (array ($ data ['mpInactive ' ]['libelleAbrev ' ], $ data ['mpInactive ' ]['couleurAssociee ' ]));
293
- $ data ['mpInactiveGender ' ] = gender ($ data ['mpInactive ' ][" civ " ]);
301
+ $ data ['mpInactiveGender ' ] = gender ($ data ['mpInactive ' ][' civ ' ]);
294
302
}
295
303
296
304
// Meta
0 commit comments