Subversion Repositories Applications.projet

Compare Revisions

Ignore whitespace Rev 215 → Rev 216

/branches/livraison_narmer/actions/documents.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: documents.php,v 1.7 2007-04-19 15:34:35 neiluj Exp $
// CVS : $Id: documents.php,v 1.7.2.1 2007-05-11 13:38:32 alexandre_tb Exp $
/**
* Application projet
*
31,7 → 31,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2005
*@version $Revision: 1.7 $
*@version $Revision: 1.7.2.1 $
// +------------------------------------------------------------------------------------------------------+
*/
 
49,22 → 49,31
$projet = new projet ($this->_db, $this->_id_projet) ;
 
// recuperation de la liste des documents associes
$liste_documents = $projet->getListesDocuments(PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES) ;
// en filtrant sur le repertoire courant pour limiter le nombre de resultat
if ($this->_id_repertoire != "") {
$id_repertoire = $this->_id_repertoire;
} else {
$id_repertoire = 0 ;
}
 
 
$liste_documents = $projet->getListesDocuments(PROJET_CHEMIN_FICHIER, PROJET_CHEMIN_ICONES, $id_repertoire) ;
 
// creation de la vue liste de document, on nettoie l'url
//$this->_url->removeQueryString(PROJET_VARIABLE_ACTION) ;
include_once PROJET_CHEMIN_CLASSES.'AJAX_arbreDocuments.class.php' ;
 
include_once PROJET_CHEMIN_CLASSES.'HTML_listeDocuments.class.php' ;
$this->_url->addQueryString(PROJET_VARIABLE_ACTION, $this->_action) ;
 
$vue_liste_document = new AJAX_arbreDocuments($this->_url, false, $this->_id_repertoire, $this->_auth) ;
$vue_liste_document = new HTML_listeDocuments($this->_url, false, $this->_id_repertoire, $this->_auth, $projet->getId()) ;
 
// reglage de parametres de la vue
$vue_liste_document->setAction (array ("couper" => PROJET_ACTION_COUPER, "modifier" => PROJET_ACTION_MODIFIER, "supprimer" => PROJET_SUPPRESSION_FICHIER)) ;
$vue_liste_document->setCheminIcones(PROJET_CHEMIN_ICONES) ;
 
$tableau_navigation = document::getCheminIdRepertoire($this->_id_repertoire, $this->_db) ;
 
$tableau_navigation = document::getPath($this->_id_repertoire, $this->_db) ;
//$retour .= $GLOBALS['log'];
$tableau_navigation = array_merge(is_array ($tableau_navigation) ? array_reverse($tableau_navigation) : array(), array($id_repertoire));
$vue_liste_document->setCheminNavigation ($tableau_navigation) ;
 
// verification des droits de l'utilisateur
111,12 → 120,27
$retour .= '<h1>'.PROJET_PROJET.' : '.$projet->getTitre()."</h1>" ;
 
$retour .= '<h2>'.PROJET_DOCUMENT_DU_PROJET.'</h2>'."\n" ;
$retour .= $vue_liste_document->toHTML() ;
// Les liens pour l affichage classique ou arborescent (avec dojo)
$this->_url->addQueryString('affichage', 'ajax');
$retour .= '<a href="'.$this->_url->getURL().'">'.PROJET_AFFICHAGE_ARBORESCENT.'</a>'."\n";
$this->_url->addQueryString('affichage', 'standart');
$retour .= '<a href="'.$this->_url->getURL().'">'.PROJET_AFFICHAGE_CLASSIQUE.'</a>'."\n";
$this->_url->removeQueryString('affichage');
 
$arbre = document::getArbreDocument($this->_id_projet) ;
 
$retour .= '<noscript>';
$vue_liste_document->setModeAffichage('standart');
$retour .= $vue_liste_document->toHTML('', '') ;
$retour .= '</noscript>';
 
$retour .= $vue_liste_document->AJAX_construitListe ($this->_id_projet, $droits, '', $this->_db) ;
if (!isset ($_SESSION['mode_affichage'])) {
if (isset($_GET['affichage'])) $_SESSION['mode_affichage'] = $_GET['affichage']; else $_SESSION['mode_affichage'] = 'ajax';
} else {
if (isset($_GET['affichage'])) $_SESSION['mode_affichage'] = $_GET['affichage'];
}
$vue_liste_document->setModeAffichage($_SESSION['mode_affichage']);
 
$retour .= $vue_liste_document->toHTML($projet->getId(), $droits);
//$retour .= $GLOBALS['log'];
 
?>