1,7 → 1,7 |
<?php if (isset($messages)) : ?> |
<?php foreach ($messages as $message) : ?> |
<p class="information"><?=$message;?></p> |
<?php endforeach; ?> |
<?php foreach ($messages as $message) : ?> |
<p class="information"><?=$message;?></p> |
<?php endforeach; ?> |
<?php endif; ?> |
<?php if ($preferences) : ?> |
<div id="preferences"> |
15,14 → 15,15 |
<th>Description</th> |
<th>Date début</th> |
<th>Date fin</th> |
<th>Durée prévue</th> |
<th>Durée financée</th> |
<th>Durée prévue (j)</th> |
<th>Durée financée (j)</th> |
<th>Avancement (j)</th> |
<th>Avancement (%)</th> |
</tr> |
</thead> |
<tbody> |
<?php foreach ($preferences as $categorie => $projets):?> |
<tr class="categories"><th colspan="8"><?=$categorie;?></th></tr> |
<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" ;?>"> |
33,22 → 34,48 |
<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> |
<td class="pr_av"> |
<?php if (!empty($projet['av'])) : ?> |
|
<!-- 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="<?=$projet['av'];?>" |
title="<?=$projet['av'];?> %" |
width="<?=min(100, $projet['av']);?>" |
title="pipi <?=$projet['av'];?> %" |
src="presentation/images/pixels/avancement.png" |
style="cursor:crosshair;padding-right:<?=(100 - $projet['av']);?>px;border:1px solid #DDD;" |
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:crosshair;border:1px solid #DDD;" |
style="cursor:help;border:1px solid #DDD;" |
src="presentation/images/pixels/vide.png" |
title="<?=$projet['av'];?> %" |
title="caca <?=$projet['av'];?> %" |
alt="0 %" /> |
<?php endif; ?> |
<?php endif; ?>--> |
</td> |
</tr> |
<?php endforeach; ?> |