1 |
<?php if (isset($messages)) : ?>
|
1 |
<?php if (isset($messages)) : ?>
|
2 |
<?php foreach ($messages as $message) : ?>
|
2 |
<?php foreach ($messages as $message) : ?>
|
3 |
<p class="information"><?=$message;?></p>
|
3 |
<p class="information"><?=$message;?></p>
|
4 |
<?php endforeach; ?>
|
4 |
<?php endforeach; ?>
|
5 |
<?php endif; ?>
|
5 |
<?php endif; ?>
|
6 |
<?php if ($preferences) : ?>
|
6 |
<?php if ($preferences) : ?>
|
7 |
<div id="preferences">
|
7 |
<div id="preferences">
|
8 |
<form class="centre" id="gestion_admin_pref" action="index.php?action=<?=GTT_ACTION_PREFERENCE_VALIDER;?>" name="gestion_admin_pref" method="post">
|
8 |
<form class="centre" id="gestion_admin_pref" action="index.php?action=<?=GTT_ACTION_PREFERENCE_VALIDER;?>" name="gestion_admin_pref" method="post">
|
9 |
<input name="champ_nb_total_proj" value="<?=$nbre_projets;?>" type="hidden"/>
|
9 |
<input name="champ_nb_total_proj" value="<?=$nbre_projets;?>" type="hidden"/>
|
10 |
<table id="preference">
|
10 |
<table id="preference">
|
11 |
<thead>
|
11 |
<thead>
|
12 |
<tr>
|
12 |
<tr>
|
13 |
<th> </th>
|
13 |
<th> </th>
|
14 |
<th>Nom</th>
|
14 |
<th>Nom</th>
|
15 |
<th>Description</th>
|
15 |
<!--<th>Description</th>-->
|
16 |
<th>Date début</th>
|
16 |
<th>Date début</th>
|
17 |
<th>Date fin</th>
|
17 |
<th>Date fin</th>
|
18 |
<th>Durée prévue (j)</th>
|
18 |
<th>Durée prévue (j)</th>
|
19 |
<th>Durée financée (j)</th>
|
19 |
<!--<th>Durée financée (j)</th>-->
|
- |
|
20 |
<th>Temps perso. passé (j)</th>
|
20 |
<th>Avancement (j)</th>
|
21 |
<th>Avancement (j)</th>
|
21 |
<th>Avancement (%)</th>
|
22 |
<th>Avancement (%)</th>
|
22 |
</tr>
|
23 |
</tr>
|
23 |
</thead>
|
24 |
</thead>
|
24 |
<tbody>
|
25 |
<tbody>
|
25 |
<?php foreach ($preferences as $categorie => $projets):?>
|
26 |
<?php foreach ($preferences as $categorie => $projets):?>
|
26 |
<tr class="categories"><th colspan="9"><?=$categorie;?></th></tr>
|
27 |
<tr class="categories"><th colspan="9"><?=$categorie;?></th></tr>
|
27 |
<?php $ligne = "impair"; ?>
|
28 |
<?php $ligne = "impair"; ?>
|
28 |
<?php foreach ($projets as $projet):?>
|
29 |
<?php foreach ($projets as $projet):?>
|
29 |
<tr class="<?=$ligne ; $ligne = ($ligne == "impair") ? "pair" : "impair" ;?>">
|
30 |
<tr class="<?=$ligne ; $ligne = ($ligne == "impair") ? "pair" : "impair" ;?>">
|
30 |
<td class="check"><input id="pr:<?=$projet['id'];?>" name="pr:<?=$projet['id'];?>" value="<?=$projet['valeur'];?>" type="checkbox" <?=$projet['coche']?'checked="checked"':'';?>/></td>
|
31 |
<td class="check"><input id="pr:<?=$projet['id'];?>" name="pr:<?=$projet['id'];?>" value="<?=$projet['valeur'];?>" type="checkbox" <?=$projet['coche']?'checked="checked"':'';?>/></td>
|
31 |
<td class="pr_no"><?=$projet['no'];?></td>
|
32 |
<td class="pr_no"><?=$projet['no'];?></td>
|
32 |
<td class="pr_de"><?=$projet['de'];?></td>
|
33 |
<!--<td class="pr_de"><?=$projet['de'];?></td>-->
|
33 |
<td class="pr_dade"><?=($projet['dade'] != '0000-00-00') ? $projet['dade'] : ' ' ;?></td>
|
34 |
<td class="pr_dade"><?=($projet['dade'] != '0000-00-00') ? $projet['dade'] : ' ' ;?></td>
|
34 |
<td class="pr_dafi"><?=($projet['dafi'] != '0000-00-00') ? $projet['dafi'] : ' ' ;?></td>
|
35 |
<td class="pr_dafi"><?=($projet['dafi'] != '0000-00-00') ? $projet['dafi'] : ' ' ;?></td>
|
35 |
<td class="pr_dupr"><?=(!empty($projet['dupr'])) ? $projet['dupr'] : ' ' ;?></td>
|
36 |
<td class="pr_dupr"><?=(!empty($projet['dupr'])) ? $projet['dupr'] : ' ' ;?></td>
|
36 |
<td class="pr_dufi"><?=(!empty($projet['dufi'])) ? $projet['dufi'] : ' ' ;?></td>
|
37 |
<!--<td class="pr_dufi"><?=(!empty($projet['dufi'])) ? $projet['dufi'] : ' ' ;?></td>-->
|
- |
|
38 |
|
- |
|
39 |
<!-- colonne "avancement personnel en jours" -->
|
- |
|
40 |
<td>
|
- |
|
41 |
<?= ($projet['tpp'] === null ? '0' : ($projet['tpp'] == 0 ? 'moins de 1j' : $projet['tpp'])) ?>
|
- |
|
42 |
<?php
|
- |
|
43 |
// pourcentage de temps sur ce projet p/r au temps total passé par l'équipe
|
- |
|
44 |
$ptp = floor((empty($projet['tpp']) ? 0 : (($projet['tpp'] * 100) / $projet['avc'])));
|
- |
|
45 |
?>
|
- |
|
46 |
(<?= $ptp ?> %)
|
- |
|
47 |
</td>
|
37 |
|
48 |
|
38 |
<!-- colonne "avancement en jours" -->
|
49 |
<!-- colonne "avancement en jours" -->
|
39 |
<?php
|
50 |
<?php
|
40 |
// calculs utiles pour la suite
|
51 |
// calculs utiles pour la suite
|
41 |
$pourcentageEffectue = 0;
|
52 |
$pourcentageEffectue = 0;
|
42 |
$pourcentageEnTrop = 0;
|
53 |
$pourcentageEnTrop = 0;
|
43 |
$joursEnTrop = $projet['avc'] - $projet['dupr'];
|
54 |
$joursEnTrop = $projet['avc'] - $projet['dupr'];
|
44 |
if ($projet['dupr'] > 0) {
|
55 |
if ($projet['dupr'] > 0) {
|
45 |
$pourcentageEffectue = round(($projet['avc'] / $projet['dupr']) * 100);
|
56 |
$pourcentageEffectue = round(($projet['avc'] / $projet['dupr']) * 100);
|
46 |
$pourcentageEnTrop = round((($joursEnTrop) / $projet['dupr']) * 100);
|
57 |
$pourcentageEnTrop = round((($joursEnTrop) / $projet['dupr']) * 100);
|
47 |
}
|
58 |
}
|
48 |
?>
|
59 |
?>
|
49 |
<?php if ($projet['avc'] > ($projet['dupr'] * 1.15)): ?>
|
60 |
<?php if ($projet['avc'] > ($projet['dupr'] * 1.15)): ?>
|
50 |
<!-- on dépasse de 15%, alerte ! -->
|
61 |
<!-- on dépasse de 15%, alerte ! -->
|
51 |
<td class="pr_av_j bg-alerte" title="<?= $joursEnTrop ?> jours ont été accordés au delà des prévisions">
|
62 |
<td class="pr_av_j bg-alerte" title="<?= $joursEnTrop ?> jours ont été accordés au delà des prévisions">
|
52 |
<?php else: ?>
|
63 |
<?php else: ?>
|
53 |
<td class="pr_av_j">
|
64 |
<td class="pr_av_j">
|
54 |
<?php endif; ?>
|
65 |
<?php endif; ?>
|
55 |
<?= $projet['avc'] ?> / <?= $projet['dupr'] ?>
|
66 |
<?= $projet['avc'] ?> / <?= $projet['dupr'] ?>
|
56 |
</td>
|
67 |
</td>
|
57 |
|
68 |
|
58 |
<!-- colonne "avancement en %" -->
|
69 |
<!-- colonne "avancement en %" -->
|
59 |
<td class="pr_av" title="<?= $pourcentageEffectue ?>%">
|
70 |
<td class="pr_av" title="<?= $pourcentageEffectue ?>%">
|
60 |
<div class="barre-avancement-ext">
|
71 |
<div class="barre-avancement-ext">
|
61 |
<div class="barre-avancement-int" style="width:<?= min(100, $pourcentageEffectue) ?>px;">
|
72 |
<div class="barre-avancement-int" style="width:<?= min(100, $pourcentageEffectue) ?>px;">
|
62 |
</div>
|
73 |
</div>
|
63 |
</div>
|
74 |
</div>
|
64 |
<!--<?php if (!empty($projet['av'])) : ?>
|
75 |
<!--<?php if (!empty($projet['av'])) : ?>
|
65 |
<img height="10"
|
76 |
<img height="10"
|
66 |
width="<?=min(100, $projet['av']);?>"
|
77 |
width="<?=min(100, $projet['av']);?>"
|
67 |
title="pipi <?=$projet['av'];?> %"
|
78 |
title="pipi <?=$projet['av'];?> %"
|
68 |
src="presentation/images/pixels/avancement.png"
|
79 |
src="presentation/images/pixels/avancement.png"
|
69 |
style="cursor:help;padding-right:<?=(100 - $projet['av']);?>px;border:1px solid #DDD;"
|
80 |
style="cursor:help;padding-right:<?=(100 - $projet['av']);?>px;border:1px solid #DDD;"
|
70 |
alt="<?=$projet['av'];?> %" />
|
81 |
alt="<?=$projet['av'];?> %" />
|
71 |
<?php else : ?>
|
82 |
<?php else : ?>
|
72 |
<img height="10"
|
83 |
<img height="10"
|
73 |
width="100"
|
84 |
width="100"
|
74 |
style="cursor:help;border:1px solid #DDD;"
|
85 |
style="cursor:help;border:1px solid #DDD;"
|
75 |
src="presentation/images/pixels/vide.png"
|
86 |
src="presentation/images/pixels/vide.png"
|
76 |
title="caca <?=$projet['av'];?> %"
|
87 |
title="caca <?=$projet['av'];?> %"
|
77 |
alt="0 %" />
|
88 |
alt="0 %" />
|
78 |
<?php endif; ?>-->
|
89 |
<?php endif; ?>-->
|
79 |
</td>
|
90 |
</td>
|
80 |
</tr>
|
91 |
</tr>
|
81 |
<?php endforeach; ?>
|
92 |
<?php endforeach; ?>
|
82 |
<?php endforeach; ?>
|
93 |
<?php endforeach; ?>
|
83 |
</tbody>
|
94 |
</tbody>
|
84 |
</table>
|
95 |
</table>
|
85 |
<input class="btn_large" id="btn_valider_editer" name="btn_valider_editer" value="<?=$i18n_general_valider;?>" type="submit" />
|
96 |
<input class="btn_large" id="btn_valider_editer" name="btn_valider_editer" value="<?=$i18n_general_valider;?>" type="submit" />
|
86 |
</form>
|
97 |
</form>
|
87 |
</div>
|
98 |
</div>
|
88 |
<?php endif; ?>
|
99 |
<?php endif; ?>
|