1,5 → 1,5 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
50,8 → 50,8 |
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ; |
include_once PROJET_CHEMIN_CLASSES.'participe.class.php' ; |
$projet = new projet ($this->_db, $this->_id_projet) ; |
|
|
|
/** Bloc resume avec lien resume */ |
$resume = $projet->getResume(); |
$bouton_resume = ''; |
60,7 → 60,7 |
|
$lien_inscription = ''; |
// recuperation de la liste des documents associes |
$liste_documents = document::getDocumentsRecents(4, $this->_db, PROJET_CHEMIN_FICHIER, |
$liste_documents = document::getDocumentsRecents(4, $this->_db, PROJET_CHEMIN_FICHIER, |
PROJET_CHEMIN_ICONES, $this->_id_projet) ; |
|
// creation de la vue liste de document, on nettoie l'url |
73,7 → 73,7 |
$vue_liste_document->setAction (array ("couper" => PROJET_ACTION_COUPER, "modifier" => PROJET_ACTION_MODIFIER, "supprimer" => PROJET_SUPPRESSION_FICHIER)) ; |
$vue_liste_document->setCheminIcones(PROJET_CHEMIN_ICONES) ; |
|
$bouton_poster = ''; |
$bouton_poster = ''; |
$bouton_desinscription_projet = ''; |
|
// verification des droits de l'utilisateur |
91,7 → 91,7 |
$isAdm = participe::isAdministrateur($this->_auth->getAuthData(PROJET_CHAMPS_ID), $this->_db) ; |
if ($isAdm) $droits = PROJET_DROIT_ADMINISTRATEUR ; |
if ($isAdm) $isCoord = true ; |
|
|
include_once PROJET_CHEMIN_CLASSES.'inscription_liste.class.php'; |
$projet->getListesAssociees(); |
foreach ($projet->_listes_associes as $info_liste) { |
105,10 → 105,10 |
$label_inscription = PROJET_ECRIRE_LISTE ; |
} |
} |
|
|
switch ($participant->getStatut($id_u, $this->_id_projet)) |
{ |
case PROJET_DROIT_AUCUN : |
case PROJET_DROIT_AUCUN : |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE); |
$lien_inscription = $this->_url->getURL(); |
$laius_inscription = PROJET_VOUS_N_ETES_PAS_INSCRIT; |
115,14 → 115,14 |
$label_url_inscription = PROJET_S_INSCRIRE_AU_PROJET; |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_S_INSCRIRE); |
$lien_inscription = $this->_url->getURL(); |
$label_url_inscription = 'S\'inscrire à ce projet'; |
|
$label_url_inscription = 'S\'inscrire à ce projet'; |
|
break; |
case PROJET_DROIT_CONTRIBUTEUR : |
case PROJET_DROIT_CONTRIBUTEUR : |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_FICHIER); |
$bouton_deposer_doc = bouton::toHTML($this->_url->getURL(), 'Déposer un document', 'document'); |
$bouton_deposer_doc .= '<br style="clear:both" />'; |
|
|
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_ACTION_DESINSCRIPTION_PROJET); |
$bouton_desinscription_projet = bouton::toHTML($this->_url->getURL(), 'Se désinscrire du projet', 'cross'); |
$bouton_desinscription_projet .= '<br style="clear:both" />'; |
129,7 → 129,7 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $action_inscription); |
$bouton_poster = bouton::toHTML($this->_url->getURL(), $label_inscription,'ecrire'); |
break; |
case PROJET_DROIT_COORDINATEUR || PROJET_DROIT_ADMINISTRATEUR : |
case PROJET_DROIT_COORDINATEUR || PROJET_DROIT_ADMINISTRATEUR : |
$this->_url->addQueryString (PROJET_VARIABLE_ACTION, PROJET_MODIFIER_DESCRIPTION); |
$bouton_resume = bouton::toHTML($this->_url->getURL(), PROJET_MODIFIER_PROPRIETES, 'modifier'); |
$bouton_resume .= '<br style="clear:both" />'; |
136,13 → 136,13 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, PROJET_NOUVEAU_FICHIER); |
$bouton_deposer_doc = bouton::toHTML($this->_url->getURL(), 'Déposer un document', 'document'); |
$bouton_deposer_doc .= '<br style="clear:both" />'; |
|
|
if ($projet->avoirListe()) { |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $action_inscription); |
$bouton_poster = bouton::toHTML($this->_url->getURL(), $label_inscription,'ecrire'); |
|
|
} |
|
|
break; |
case PROJET_DROIT_EN_ATTENTE : $droits = PROJET_DROIT_EN_ATTENTE; |
GEN_stockerFichierScript('mootools', 'api/js/mootools/mootools-release-1.11.js'); |
161,10 → 161,10 |
break; |
} |
$bouton_poster .= '<br style="clear:both" />'; |
|
|
$statut = participe::getStatutSurProjetCourant ($this->_auth->getAuthData(PROJET_CHAMPS_ID), $this->_id_projet, $this->_db) ; |
// si participant, on ajoute le champs visibilite |
|
|
if ($statut !='' || $isAdm) { |
array_push ($entete_liste, PROJET_FICHIERS_VISIBILITE) ; |
$visible = true ; |
172,10 → 172,10 |
$visible = false ; |
} |
// recuperation de la liste des documents associes |
$liste_documents = document::getDocumentsRecents(4, $this->_db, PROJET_CHEMIN_FICHIER, |
$liste_documents = document::getDocumentsRecents(4, $this->_db, PROJET_CHEMIN_FICHIER, |
PROJET_CHEMIN_ICONES, $this->_id_projet, $visible) ; |
|
|
|
// si chef de projet ou si proprietaire d'au moins 1 document |
$proprietaire_un_document = false ; |
|
191,11 → 191,11 |
} else { |
$droits = PROJET_DROIT_AUCUN ; |
// recuperation de la liste des documents associes |
$liste_documents = document::getDocumentsRecents(4, $this->_db, PROJET_CHEMIN_FICHIER, |
$liste_documents = document::getDocumentsRecents(4, $this->_db, PROJET_CHEMIN_FICHIER, |
PROJET_CHEMIN_ICONES, $this->_id_projet, false) ; |
$lien_inscription = 'javascript:animatedcollapse.toggle(\'projet_bloc_inscription\');'; |
$label_url_inscription = 'S\'inscrire à ce projet'; |
|
|
GEN_stockerFichierScript('jquery', 'api/js/jquery/jquery.js'); |
GEN_stockerFichierScript('animatedcollapse', 'api/js/jquery/animatedcollapse.js'); |
GEN_stockerCodeScript('animatedcollapse.addDiv(\'projet_bloc_inscription\', \'fade=1, height="100px"\');' ."\n". |
209,23 → 209,18 |
|
$wiki_res = '' ; |
// Les wikinis associes au projet |
if ($projet->getWikini()) { |
$url = $GLOBALS['_GEN_commun']['url'] ; |
|
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI); |
$link=$this->_url->getURL(); |
|
$wiki_res .= '<div><a href="'.$link.'">'.PROJET_ALLER_SUR_WIKINI.'</a> ('.$projet->getWikini().')' ; |
$wiki_res .= '</div>' ; |
if ($wiki = $projet->getWikini()) { |
if (strpos($wiki, "http://www.tela-botanica.org/wikini/") === 0) {// Si le wiki, ne peut pas être intégré |
$wiki_res .= '<div style="line-height: 2em;">'.sprintf(PROJET_WIKINI_PAS_REDIR, $wiki).'</div>'."\n"; |
} else { |
$url = $GLOBALS['_GEN_commun']['url'] ; |
$this->_url->addQueryString ('act',PROJET_ACTION_VOIR_WIKINI); |
$link = $this->_url->getURL(); |
$wiki_res .= '<div><a href="'.$link.'">'.PROJET_ALLER_SUR_WIKINI.'</a> ('.$wiki.')</div>'; |
} |
} else { |
$wiki_res .= '<div>'.PROJET_WIKINI_PAS.'</div>'."\n"; |
} |
// ou, le cas échéant et si un espace internet existe déjà sur /wikini/ |
// celui-ci est proposé |
elseif (strpos($projet->getEspaceInternet(), "http://www.tela-botanica.org/wikini/") === 0) { |
$wiki_res .= '<div><a href="'.$projet->getEspaceInternet().'">'.$projet->getEspaceInternet().'</a></div>'."\n"; |
} |
else { |
$wiki_res .= '<div>'.PROJET_WIKINI_PAS.'</div>'."\n" ; |
} |
// On charge les listes de discussion du projet |
// Pour le moment seul ezmlm est supportee |
|
240,12 → 235,12 |
foreach ($projet->_listes_associes as $info_liste) { |
$liste = new ezmlm_php() ; |
// Param�trage de la liste |
|
|
$liste->listdir = PROJET_CHEMIN_LISTES.$info_liste->getDomaine().'/'.$info_liste->getNom(); |
|
|
$liste->listname = $info_liste->getNom() ; |
$liste->listdomain = $info_liste->getDomaine(); |
|
|
if (isset ($GLOBALS['action']) && $GLOBALS['action'] != '') { |
$liste->set_action($GLOBALS['action']) ; |
$liste->set_actionargs($GLOBALS['actionargs']) ; |
256,9 → 251,9 |
$liste->sendbody = false; |
$liste->sendfooters = false; |
$liste->forcehref = $this->_url->getURL() ; |
|
|
|
|
|
if ($info_liste->isPublic() || $droits <= PROJET_DROIT_CONTRIBUTEUR) { |
$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ; |
switch ($liste->action) { |
265,9 → 260,9 |
case "list_info": |
$this->_url->addQueryString('act', PROJET_ACTION_VOIR_FORUM); |
$xml_parser = &new ezmlmAccessObject('calendrier_messages', $info_liste->getDomaine(), |
$info_liste->getNom(), $GLOBALS['lang'], |
$info_liste->getNom(), $GLOBALS['lang'], |
$this->_url->getURL()) ; |
|
|
$xml_parser->reset() ; |
$xml_parser->setAction ('derniers_messages'); |
$xml_parser->load(); |