Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU General Public |
|
18 |
// | You should have received a copy of the GNU General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: documents.php,v 1.5 2006-12-19 09:18:36 alexandre_tb Exp $
|
22 |
// CVS : $Id: documents.php,v 1.6 2007-04-19 09:37:25 alexandre_tb Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Application projet
|
24 |
* Application projet
|
25 |
*
|
25 |
*
|
26 |
* Action documents
|
26 |
* Action documents
|
27 |
*
|
27 |
*
|
Line 29... |
Line 29... |
29 |
//Auteur original :
|
29 |
//Auteur original :
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
30 |
*@author Alexandre Granier <alexandre@tela-botanica.org>
|
31 |
//Autres auteurs :
|
31 |
//Autres auteurs :
|
32 |
*@author Aucun
|
32 |
*@author Aucun
|
33 |
*@copyright Tela-Botanica 2000-2005
|
33 |
*@copyright Tela-Botanica 2000-2005
|
34 |
*@version $Revision: 1.5 $
|
34 |
*@version $Revision: 1.6 $
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
35 |
// +------------------------------------------------------------------------------------------------------+
|
36 |
*/
|
36 |
*/
|
Line 37... |
Line 37... |
37 |
|
37 |
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
Line 42... |
Line 42... |
42 |
// RAPPEL IMPORTANT
|
42 |
// RAPPEL IMPORTANT
|
43 |
// On se situe dans la méthode run() de la classe projetControleur
|
43 |
// On se situe dans la méthode run() de la classe projetControleur
|
44 |
//
|
44 |
//
|
45 |
if (!isset($retour)) $retour = '';
|
45 |
if (!isset($retour)) $retour = '';
|
Line 46... |
Line 46... |
46 |
|
46 |
|
47 |
// création de l'objet projet courant
|
47 |
// creation de l'objet projet courant
|
Line 48... |
Line 48... |
48 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
48 |
$projet = new projet ($this->_db, $this->_id_projet) ;
|
49 |
|
49 |
|
Line 50... |
Line 50... |
50 |
// récupération de la liste des documents associés
|
50 |
// recuperation de la liste des documents associes
|
51 |
$liste_documents = $projet->getListesDocuments(PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES) ;
|
51 |
$liste_documents = $projet->getListesDocuments(PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES) ;
|
52 |
|
52 |
|
Line 53... |
Line 53... |
53 |
// création de la vue liste de document, on nettoie l'url
|
53 |
// creation de la vue liste de document, on nettoie l'url
|
Line 54... |
Line 54... |
54 |
//$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
|
54 |
//$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
|
Line 55... |
Line 55... |
55 |
include_once PROJET_CHEMIN_CLASSES.'HTML_listeDocuments.class.php' ;
|
55 |
include_once PROJET_CHEMIN_CLASSES.'AJAX_arbreDocuments.class.php' ;
|
56 |
|
56 |
|
57 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $this->_action) ;
|
57 |
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $this->_action) ;
|
Line 58... |
Line 58... |
58 |
|
58 |
|
Line 59... |
Line 59... |
59 |
$vue_liste_document = new HTML_listeDocuments($this->_url, false, $this->_id_repertoire, $this->_auth) ;
|
59 |
$vue_liste_document = new AJAX_arbreDocuments($this->_url, false, $this->_id_repertoire, $this->_auth) ;
|
Line 60... |
Line 60... |
60 |
|
60 |
|
61 |
// réglage de paramètres de la vue
|
61 |
// reglage de parametres de la vue
|
Line 62... |
Line 62... |
62 |
$vue_liste_document->setAction (array ("couper" => PROJET_ACTION_COUPER, "modifier" => PROJET_ACTION_MODIFIER, "supprimer" => PROJET_SUPPRESSION_FICHIER)) ;
|
62 |
$vue_liste_document->setAction (array ("couper" => PROJET_ACTION_COUPER, "modifier" => PROJET_ACTION_MODIFIER, "supprimer" => PROJET_SUPPRESSION_FICHIER)) ;
|
63 |
$vue_liste_document->setCheminIcones(PROJET_CHEMIN_ICONES) ;
|
63 |
$vue_liste_document->setCheminIcones(PROJET_CHEMIN_ICONES) ;
|
64 |
|
64 |
|
Line 84... |
Line 84... |
84 |
// si participant, on ajoute le champs visibilite
|
84 |
// si participant, on ajoute le champs visibilite
|
Line 85... |
Line 85... |
85 |
|
85 |
|
86 |
if ($statut !='' || $isAdm) {
|
86 |
if ($statut !='' || $isAdm) {
|
87 |
array_push ($entete_liste, PROJET_FICHIERS_VISIBILITE) ;
|
87 |
array_push ($entete_liste, PROJET_FICHIERS_VISIBILITE) ;
|
88 |
}
|
88 |
}
|
89 |
// si chef de projet ou si propriétaire d'au moins 1 document
|
89 |
// si chef de projet ou si proprietaire d'au moins 1 document
|
Line 90... |
Line 90... |
90 |
$proprietaire_un_document = false ;
|
90 |
$proprietaire_un_document = false ;
|
91 |
|
91 |
|
92 |
foreach ($liste_documents as $document) {
|
92 |
foreach ($liste_documents as $document) {
|
93 |
if ($this->_auth->getAuthData(PROJET_CHAMPS_ID) == $document) {
|
93 |
if ($this->_auth->getAuthData(PROJET_CHAMPS_ID) == $document->_id_proprietaire) {
|
94 |
$proprietaire_un_document = true ;
|
94 |
$proprietaire_un_document = true ;
|
95 |
$droits = PROJET_DROIT_PROPRIETAIRE ;
|
95 |
$droits = PROJET_DROIT_PROPRIETAIRE ;
|
96 |
}
|
96 |
}
|
Line 109... |
Line 109... |
109 |
$retour .= '<h1>'.PROJET_PROJET.' : '.$projet->getTitre()."</h1>" ;
|
109 |
$retour .= '<h1>'.PROJET_PROJET.' : '.$projet->getTitre()."</h1>" ;
|
Line 110... |
Line 110... |
110 |
|
110 |
|
111 |
$retour .= '<h2>'.PROJET_DOCUMENT_DU_PROJET.'</h2>'."\n" ;
|
111 |
$retour .= '<h2>'.PROJET_DOCUMENT_DU_PROJET.'</h2>'."\n" ;
|
Line -... |
Line 112... |
- |
|
112 |
$retour .= $vue_liste_document->toHTML() ;
|
- |
|
113 |
|
- |
|
114 |
$arbre = document::getArbreDocument($this->_id_projet) ;
|
- |
|
115 |
|
- |
|
116 |
|
Line 112... |
Line 117... |
112 |
$retour .= $vue_liste_document->toHTML() ;
|
117 |
$retour .= $vue_liste_document->AJAX_construitListe ($this->_id_projet, $droits, '', $this->_db) ;
|
113 |
|
118 |
|