Rev 177 | Rev 190 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php if (isset($messages)) : ?><?php foreach ($messages as $message) : ?><p class="information"><?=$message;?></p><?php endforeach; ?><?php endif; ?><?php if ($preferences) : ?><div id="preferences"><form class="centre" id="gestion_admin_pref" action="index.php?action=<?=GTT_ACTION_PREFERENCE_VALIDER;?>" name="gestion_admin_pref" method="post"><input name="champ_nb_total_proj" value="<?=$nbre_projets;?>" type="hidden"/><table id="preference"><thead><tr><th> </th><th>Nom</th><!--<th>Description</th>--><th>Date début</th><th>Date fin</th><th>Durée prévue (j)</th><!--<th>Durée financée (j)</th>--><th>Temps perso. passé (j)</th><th>Avancement (j)</th><th>Avancement (%)</th></tr></thead><tbody><?php foreach ($preferences as $categorie => $projets):?><tr class="categories"><th colspan="9"><?=$categorie;?></th></tr><?php $ligne = "impair"; ?><?php foreach ($projets as $projet):?><tr class="<?=$ligne ; $ligne = ($ligne == "impair") ? "pair" : "impair" ;?>"><td class="check"><input id="pr:<?=$projet['id'];?>" name="pr:<?=$projet['id'];?>" value="<?=$projet['valeur'];?>" type="checkbox" <?=$projet['coche']?'checked="checked"':'';?>/></td><td class="pr_no"><?=$projet['no'];?></td><!--<td class="pr_de"><?=$projet['de'];?></td>--><td class="pr_dade"><?=($projet['dade'] != '0000-00-00') ? $projet['dade'] : ' ' ;?></td><td class="pr_dafi"><?=($projet['dafi'] != '0000-00-00') ? $projet['dafi'] : ' ' ;?></td><td class="pr_dupr"><?=(!empty($projet['dupr'])) ? $projet['dupr'] : ' ' ;?></td><!--<td class="pr_dufi"><?=(!empty($projet['dufi'])) ? $projet['dufi'] : ' ' ;?></td>--><!-- colonne "avancement personnel en jours" --><td><?= ($projet['tpp'] === null ? '0' : ($projet['tpp'] == 0 ? 'moins de 1j' : $projet['tpp'])) ?><?php// pourcentage de temps sur ce projet p/r au temps total passé par l'équipe$ptp = floor((empty($projet['tpp']) ? 0 : (($projet['tpp'] * 100) / $projet['avc'])));?>(<?= $ptp ?> %)</td><!-- colonne "avancement en jours" --><?php// calculs utiles pour la suite$pourcentageEffectue = 0;$pourcentageEnTrop = 0;$joursEnTrop = $projet['avc'] - $projet['dupr'];if ($projet['dupr'] > 0) {$pourcentageEffectue = round(($projet['avc'] / $projet['dupr']) * 100);$pourcentageEnTrop = round((($joursEnTrop) / $projet['dupr']) * 100);}?><?php if ($projet['avc'] > ($projet['dupr'] * 1.15)): ?><!-- on dépasse de 15%, alerte ! --><td class="pr_av_j bg-alerte" title="<?= $joursEnTrop ?> jours ont été accordés au delà des prévisions"><?php else: ?><td class="pr_av_j"><?php endif; ?><?= $projet['avc'] ?> / <?= $projet['dupr'] ?></td><!-- colonne "avancement en %" --><td class="pr_av" title="<?= $pourcentageEffectue ?>%"><div class="barre-avancement-ext"><div class="barre-avancement-int" style="width:<?= min(100, $pourcentageEffectue) ?>px;"></div></div><!--<?php if (!empty($projet['av'])) : ?><img height="10"width="<?=min(100, $projet['av']);?>"title="pipi <?=$projet['av'];?> %"src="presentation/images/pixels/avancement.png"style="cursor:help;padding-right:<?=(100 - $projet['av']);?>px;border:1px solid #DDD;"alt="<?=$projet['av'];?> %" /><?php else : ?><img height="10"width="100"style="cursor:help;border:1px solid #DDD;"src="presentation/images/pixels/vide.png"title="caca <?=$projet['av'];?> %"alt="0 %" /><?php endif; ?>--></td></tr><?php endforeach; ?><?php endforeach; ?></tbody></table><input class="btn_large" id="btn_valider_editer" name="btn_valider_editer" value="<?=$i18n_general_valider;?>" type="submit" /></form></div><?php endif; ?>