Subversion Repositories Applications.projet

Rev

Rev 212 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 212 Rev 216
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.7 2007-04-19 15:34:35 neiluj Exp $
22
// CVS : $Id: documents.php,v 1.7.2.1 2007-05-11 13:38:32 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.7 $
34
*@version       $Revision: 1.7.2.1 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
Line 47... Line 47...
47
// creation de l'objet projet courant
47
// creation de l'objet projet courant
48
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
48
include_once PROJET_CHEMIN_CLASSES.'projet.class.php' ;
49
$projet = new projet ($this->_db, $this->_id_projet) ;
49
$projet = new projet ($this->_db, $this->_id_projet) ;
Line 50... Line 50...
50
 
50
 
-
 
51
// recuperation de la liste des documents associes
-
 
52
// en filtrant sur le repertoire courant pour limiter le nombre de resultat
-
 
53
if ($this->_id_repertoire != "") {
-
 
54
	$id_repertoire = $this->_id_repertoire;
-
 
55
} else {
-
 
56
	$id_repertoire = 0 ;
-
 
57
}
-
 
58
 
51
// recuperation de la liste des documents associes
59
 
Line 52... Line 60...
52
$liste_documents = $projet->getListesDocuments(PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES) ;
60
$liste_documents = $projet->getListesDocuments(PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES, $id_repertoire) ;
53
 
61
 
54
// creation de la vue liste de document, on nettoie l'url
-
 
Line -... Line 62...
-
 
62
// creation de la vue liste de document, on nettoie l'url
55
//$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
63
//$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
Line 56... Line 64...
56
include_once PROJET_CHEMIN_CLASSES.'AJAX_arbreDocuments.class.php' ;
64
 
Line 57... Line 65...
57
 
65
include_once PROJET_CHEMIN_CLASSES.'HTML_listeDocuments.class.php' ;
58
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $this->_action) ;
66
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $this->_action) ;
59
 
67
 
Line 60... Line 68...
60
$vue_liste_document = new AJAX_arbreDocuments($this->_url, false, $this->_id_repertoire, $this->_auth) ;
68
$vue_liste_document = new HTML_listeDocuments($this->_url, false, $this->_id_repertoire, $this->_auth, $projet->getId()) ;
61
 
-
 
-
 
69
 
-
 
70
// reglage de parametres de la vue
62
// reglage de parametres de la vue
71
$vue_liste_document->setAction (array ("couper" => PROJET_ACTION_COUPER, "modifier" => PROJET_ACTION_MODIFIER, "supprimer" => PROJET_SUPPRESSION_FICHIER)) ;
Line 63... Line 72...
63
$vue_liste_document->setAction (array ("couper" => PROJET_ACTION_COUPER, "modifier" => PROJET_ACTION_MODIFIER, "supprimer" => PROJET_SUPPRESSION_FICHIER)) ;
72
$vue_liste_document->setCheminIcones(PROJET_CHEMIN_ICONES) ;
64
$vue_liste_document->setCheminIcones(PROJET_CHEMIN_ICONES) ;
73
 
Line 109... Line 118...
109
$vue_liste_document->construitListe ($liste_documents, $droits, '', $this->_db) ;
118
$vue_liste_document->construitListe ($liste_documents, $droits, '', $this->_db) ;
Line 110... Line 119...
110
 
119
 
Line 111... Line 120...
111
$retour .= '<h1>'.PROJET_PROJET.' : '.$projet->getTitre()."</h1>" ;
120
$retour .= '<h1>'.PROJET_PROJET.' : '.$projet->getTitre()."</h1>" ;
-
 
121
 
-
 
122
$retour .= '<h2>'.PROJET_DOCUMENT_DU_PROJET.'</h2>'."\n" ;
-
 
123
// Les liens pour l affichage classique ou arborescent (avec dojo)
112
 
124
$this->_url->addQueryString('affichage', 'ajax');
-
 
125
$retour .= '<a href="'.$this->_url->getURL().'">'.PROJET_AFFICHAGE_ARBORESCENT.'</a>'."\n";
-
 
126
$this->_url->addQueryString('affichage', 'standart');
Line 113... Line -...
113
$retour .= '<h2>'.PROJET_DOCUMENT_DU_PROJET.'</h2>'."\n" ;
-
 
Line -... Line 127...
-
 
127
$retour .= '<a href="'.$this->_url->getURL().'">'.PROJET_AFFICHAGE_CLASSIQUE.'</a>'."\n";
-
 
128
$this->_url->removeQueryString('affichage');
-
 
129
 
-
 
130
 
Line -... Line 131...
-
 
131
$retour .= '<noscript>';
-
 
132
$vue_liste_document->setModeAffichage('standart');
-
 
133
$retour .= $vue_liste_document->toHTML('', '') ;
-
 
134
$retour .= '</noscript>';
-
 
135
 
114
$retour .= $vue_liste_document->toHTML() ;
136
if (!isset ($_SESSION['mode_affichage'])) {
Line -... Line 137...
-
 
137
	if (isset($_GET['affichage'])) $_SESSION['mode_affichage'] = $_GET['affichage']; else $_SESSION['mode_affichage'] = 'ajax';
-
 
138
} else {
Line 115... Line 139...
115
 
139
	if (isset($_GET['affichage'])) $_SESSION['mode_affichage'] = $_GET['affichage'];
116
$arbre = document::getArbreDocument($this->_id_projet) ;
140
}