Changeset 44836 in spip-zone for _plugins_/gestion_projets
- Timestamp:
- Feb 19, 2011, 6:40:46 PM (9 years ago)
- Location:
- _plugins_/gestion_projets
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/gestion_projets/formulaires/projets.html
r44746 r44836 2 2 [<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>] 3 3 [<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>] 4 <form action="#ENV{action}" method="post"><div> 5 #ACTION_FORMULAIRE{#ENV{action}} 6 7 <BOUCLE_fieldsets(POUR){tableau #ENV{fieldsets}}{par cle}> 8 <B_champs> 9 <fieldset[ id="(#VALEUR|table_valeur{id})"]><legend>[(#VALEUR|table_valeur{titre})]</legend> 10 <ul> 11 <BOUCLE_champs(POUR){tableau (#ENV{formulaire}|table_valeur{(#VALEUR|table_valeur{titre})})}{par cle}> 12 #SET{valeurs,#VALEUR|table_valeur{form}} 13 [(#SAISIE{ 14 [(#GET{valeurs}|table_valeur{field})], 15 [(#GET{valeurs}|table_valeur{name})], 16 label=[(#GET{valeurs}|table_valeur{label})], 17 explication=[(#GET{valeurs}|table_valeur{explication})], 18 obligatoire=[(#GET{valeurs}|table_valeur{obligatoire})], 19 option_statut=[(#GET{valeurs}|table_valeur{option_statut})], 20 multiple=[(#GET{valeurs}|table_valeur{multiple})], 21 statut=[(#GET{valeurs}|table_valeur{statut})], 22 })] 23 </BOUCLE_champs> 24 </ul> 25 </fieldset> 26 </B_champs> 27 </BOUCLE_fieldsets> 4 <form action="#ENV{action}" method="post"> 5 <div> 6 #ACTION_FORMULAIRE{#ENV{action}} 7 <INCLURE{fond=formulaires/inc-formulaire}{env}/> 28 8 <p class="boutons"><input type="submit" class="submit" value="<:ok:>" /></p> 29 30 </div></form>9 </div> 10 </form> 31 11 </div> 32 12 -
_plugins_/gestion_projets/formulaires/taches.html
r44746 r44836 2 2 [<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>] 3 3 [<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>] 4 <form action="#ENV{action}" method="post"><div> 4 <form action="#ENV{action}" method="post"> 5 <div> 5 6 #ACTION_FORMULAIRE{#ENV{action}} 6 7 <BOUCLE_fieldsets(POUR){tableau #ENV{fieldsets}}{par cle}> 8 <B_champs> 9 <fieldset[ id="(#VALEUR|table_valeur{id})"]><legend>[(#VALEUR|table_valeur{titre})]</legend> 10 <ul> 11 <BOUCLE_champs(POUR){tableau (#ENV{formulaire}|table_valeur{(#VALEUR|table_valeur{titre})})}{par cle}> 12 #SET{valeurs,#VALEUR|table_valeur{form}} 13 [(#SAISIE{ 14 [(#GET{valeurs}|table_valeur{field})], 15 [(#GET{valeurs}|table_valeur{name})], 16 label=[(#GET{valeurs}|table_valeur{label})], 17 explication=[(#GET{valeurs}|table_valeur{explication})], 18 obligatoire=[(#GET{valeurs}|table_valeur{obligatoire})], 19 option_statut=[(#GET{valeurs}|table_valeur{option_statut})], 20 multiple=[(#GET{valeurs}|table_valeur{multiple})], 21 statut=[(#GET{valeurs}|table_valeur{statut})], 22 datas=[(#GET{valeurs}|table_valeur{datas})], 23 })] 24 </BOUCLE_champs> 25 </ul> 26 </fieldset> 27 </B_champs> 28 </BOUCLE_fieldsets> 7 <INCLURE{fond=formulaires/inc-formulaire}{env}/> 29 8 <p class="boutons"><input type="submit" class="submit" value="<:ok:>" /></p> 30 9 31 </div></form> 10 </div> 11 </form> 32 12 </div> -
_plugins_/gestion_projets/formulaires/taches.php
r44746 r44836 159 159 $id_projet=_request('id_projet'); 160 160 $id_tache=_request('id_tache'); 161 162 163 161 if($id_tache){ 162 $valeurs_taches=sql_fetsel('*','spip_projets_taches','id_tache='.sql_quote($id_tache)); 163 $id_projet=$valeurs_taches['id_projet']; 164 } 165 166 167 $champs=array('montant_heure','montant_estime','duree_estimee','date_debut','date_fin_estimee'); 168 169 $projet =sql_fetsel($champs,'spip_projets','id_projet='.sql_quote($id_projet)); 170 171 $taches =sql_select('montant_estime,duree_estimee','spip_projets_taches','id_projet='.sql_quote($id_projet)); 172 173 174 // on détermine les sommes des montants estimés et duree estimée des autres tâches du projet 175 $compteur=array(); 176 while($data = sql_fetch($taches)){ 177 foreach($data as $champ=>$valeur){ 178 $compteur[$champ][]=$valeur; 179 } 180 } 181 182 183 foreach($projet as $champ=>$valeur){ 184 $val[$champ]=$valeur; 185 } 186 187 $val['montant_estime']= $val['montant_estime']-array_sum($compteur['montant_estime']); 188 $val['duree_estimee']= $val['duree_estimee']-array_sum($compteur['duree_estimee']); 164 189 165 190 //On charge les définitions … … 168 193 169 194 if($id_tache){ 170 $val= sql_fetsel('*','spip_projets_taches','id_tache='.sql_quote($id_tache));171 $id_projet=$val['id_projet'];172 $val['participants_parent'] = unserialize(sql_getfetsel('participants','spip_projets','id_projet='.sql_quote($id_projet)));195 $val=$valeurs_taches; 196 if($val['participants'])$val['participants_parent'] = unserialize($val['participants']); 197 else $val['participants_parent'] = array(0=>$val['id_chef_projet']); 173 198 $val['participants'] = unserialize($val['participants']); 174 175 199 } 176 200 else{ 177 $val['participants_parent'] = unserialize(sql_getfetsel('participants','spip_projets','id_projet='.sql_quote($id_projet))); 201 $projet=sql_fetsel('participants,id_chef_projet','spip_projets','id_projet='.sql_quote($id_projet)); 202 203 if($projet['participants'])$val['participants_parent'] = unserialize($projet['participants']); 204 else $val['participants_parent'] = array(0=>$projet['id_chef_projet']); 205 178 206 $val['participants']=$val['participants_parent']; 179 207 } 180 208 181 182 209 $taches= sql_select('id_tache,nom','spip_projets_taches','id_projet='.sql_quote($id_projet)); 183 210 -
_plugins_/gestion_projets/gestion_projets_autoriser.php
r44746 r44836 37 37 38 38 39 $p articipants= sql_getfetsel('participants','spip_projets','id_projet='.sql_quote($id));39 $projet= sql_fetsel('participants,id_chef_projet','spip_projets','id_projet='.sql_quote($id)); 40 40 41 if(in_array($qui['id_auteur'],unserialize($participants))) $retour=true; 41 if(is_array($projet['participants'])){ 42 if(in_array($qui['id_auteur'],unserialize($participants)) or $qui['id_auteur']=$projet['id_chef_projet']) $retour=true; 43 } 44 elseif($qui['id_auteur']=$projet['id_chef_projet'])$retour=true; 42 45 43 46 return $retour;
Note: See TracChangeset
for help on using the changeset viewer.