From 0c2bfc6f49c8bf9054122764138ac3d75bc083e2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 10 Feb 2005 22:55:42 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Corrections=20probl=E8mes=20divers=20sur?= =?UTF-8?q?=20le=20module=20fiche=20interventions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/fichinter/fiche.php | 124 ++++++++++++++------------- htdocs/fichinter/fichinter.class.php | 32 ++++--- htdocs/fichinter/index.php | 48 ++++------- 3 files changed, 103 insertions(+), 101 deletions(-) diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index eac271c47df..eea45365183 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,6 +20,12 @@ * $Source$ */ +/** \file htdocs/ficheinter.php + \brief Fichier fiche intervention + \ingroup ficheinter + \version $Revision$ +*/ + require("./pre.inc.php"); require("./fichinter.class.php"); require("../project.class.php"); @@ -160,9 +166,9 @@ if ($_GET["action"] == 'create') print ''; print ''; - print ""; + print ""; - print "\n"; - print "\n"; + print "\n"; + print "\n"; - /* - * Projet associé - * - */ - print ''; @@ -238,7 +245,7 @@ if ($_GET["action"] == 'create') print ''; print ''; print '
Société".$objsoc->nom."
".$langs->trans("Company")."".$objsoc->nom."
Date"; + print "
".$langs->trans("Date").""; $cday = date("d", time()); print ""; - print "
Numéro
Durée (en jours)
".$langs->trans("Ref")."
".$langs->trans("Duration")." (".$langs->trans("days").")
Projet
'.$langs->trans("Project").''; - $sql = "SELECT p.rowid, p.title FROM ".MAIN_DB_PREFIX."projet as p WHERE p.fk_soc = $socidp"; - - if ( $db->query($sql) ) - { - $i = 0 ; - $numprojet = $db->num_rows(); - while ($i < $numprojet) - { - $projet = $db->fetch_object(); - print ""; - $i++; - } - $db->free(); - } - print ''; + if ($numprojet==0) { + print 'Cette société n\'a pas de projet. '; + print ''.$langs->trans("Add").''; + } - if ($numprojet==0) { - print 'Cette société n\'a pas de projet. '; - print 'Créer un projet'; } print '
'; - print "trans("Save")."\">"; + print "trans("Add")."\">"; print '
'; print ''; @@ -286,27 +293,23 @@ if ($_GET["action"] == 'edit') print ""; - print 'Numéro'.$fichinter->ref.''; - print 'Durée (en jours)'; + print ''.$langs->trans("Ref").''.$fichinter->ref.''; + print ''.$langs->trans("Duration")." (".$langs->trans("days").')'; - /* - * - * Projet associé - * - */ - - print 'Projet'; - - $sel = new Form($db); - $sel->select_array("projetidp",$listeprj,$fichinter->projet_id); - - if (sizeof($listeprj) == 0) - { - print 'Cette société n\'a pas de projet. '; - print 'Créer un projet'; - } - print ''; - + if ($conf->projet->enabled) { + // Projet associé + print ''.$langs->trans("Project").''; + + $sel = new Form($db); + $sel->select_array("projetidp",$listeprj,$fichinter->projet_id); + + if (sizeof($listeprj) == 0) + { + print 'Cette société n\'a pas de projet. '; + print 'Créer un projet'; + } + print ''; + } print ''.$langs->trans("Description").''; print '