From d33ed85808e8ae77d3abad8b242fdc3d7b0a37d9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 6 Sep 2005 16:33:13 +0000 Subject: [PATCH] Look: picto delete au lieu de texte --- htdocs/comm/action/document.php | 77 +++++++++++++++++---------------- htdocs/comm/action/fiche.php | 2 + htdocs/product/document.php | 3 +- 3 files changed, 44 insertions(+), 38 deletions(-) diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index fbe911fc3af..4f93ba59fab 100755 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -22,6 +22,7 @@ * $Id$ * $Source$ */ + /** \file htdocs/product/document.php \ingroup product @@ -33,9 +34,7 @@ require_once("./pre.inc.php"); require_once("../../contact.class.php"); require_once("../../cactioncomm.class.php"); require_once("../../actioncomm.class.php"); -if ($conf->webcal->enabled) { - require_once("../../lib/webcal.class.php"); -} +if ($conf->webcal->enabled) require_once("../../lib/webcal.class.php"); $langs->load("companies"); $langs->load("commercial"); @@ -83,7 +82,7 @@ if ( $_POST["sendit"] && $conf->upload) llxHeader(); -if ($id > 0) +if ($_GET["id"] > 0) { if ( $error_msg ) { @@ -116,51 +115,55 @@ if ($id > 0) dolibarr_fiche_head($head, $hselected, $langs->trans("Ref")." ".$act->id); - // Affichage fiche action en mode visu - print ''; - print ''; - print ''; - print ''; - - print ''; - print ''; - print ''; - print ''; - print ''; - print '
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Title").''.$act->label.'
'.$langs->trans("Company").''.img_object($langs->trans("ShowCompany"),'company').' '.$act->societe->nom_url.''.$langs->trans("Contact").''.img_object($langs->trans("ShowContact"),'contact').' '.$act->contact->fullname.'
'.$langs->trans("DateCreation").''.strftime('%d %B %Y %H:%M',$act->date).''.$langs->trans("Author").''.img_object($langs->trans("ShowUser"),'user').' '.$act->author->fullname.'
'; + // Affichage fiche action en mode visu + print ''; + print ''; + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + print ''; + print ''; + // Construit liste des fichiers clearstatcache(); $totalsize=0; $filearray=array(); - $errorlevel=error_reporting(); - error_reporting(0); - $handle=opendir($upload_dir); - error_reporting($errorlevel); - if ($handle) + if (is_dir($upload_dir)) { - $i=0; - while (($file = readdir($handle))!==false) + $errorlevel=error_reporting(); + error_reporting(0); + $handle=opendir($upload_dir); + error_reporting($errorlevel); + if ($handle) { - if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') + $i=0; + while (($file = readdir($handle))!==false) { - $filearray[$i]=$file; - $totalsize+=filesize($upload_dir."/".$file); - $i++; + if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') + { + $filearray[$i]=$file; + $totalsize+=filesize($upload_dir."/".$file); + $i++; + } } + closedir($handle); + } + else + { + print '
'.$langs->trans("ErrorCanNotReadDir",$upload_dir).'
'; } - closedir($handle); - } - else - { - print '
'.$langs->trans("ErrorCanNotReadDir",$upload_dir).'
'; } - print '
'.$langs->trans("Ref").''.$act->id.'
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Title").''.$act->label.'
'.$langs->trans("Company").''.img_object($langs->trans("ShowCompany"),'company').' '.$act->societe->nom_url.''.$langs->trans("Contact").''; + if ($act->contact->id) print ''.img_object($langs->trans("ShowContact"),'contact').' '.$act->contact->fullname.''; + else print $langs->trans("None"); + print '
'.$langs->trans("DateCreation").''.strftime('%d %B %Y %H:%M',$act->date).''.$langs->trans("Author").''.img_object($langs->trans("ShowUser"),'user').' '.$act->author->fullname.'
'; - //print ''; - //print ''; print ''; print ''; print '
'.$langs->trans("Ref").''.$product->ref.'
'.$langs->trans("Label").''.$product->libelle.'
'.$langs->trans("NbOfAttachedFiles").''.sizeof($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; @@ -224,7 +227,7 @@ if ($id > 0) } else { - echo ''.$langs->trans('Delete').''; + echo ''.img_delete($langs->trans('Delete')).''; } print "\n"; } diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 8042df5b7ca..b04567480ef 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -490,6 +490,7 @@ if ($_GET["id"]) print ''; print ''; + print ''; print ''; print ''; print ''; @@ -519,6 +520,7 @@ if ($_GET["id"]) { // Affichage fiche action en mode visu print '
'.$langs->trans("Ref").''.$act->id.'
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Title").''.$act->label.'
'.$langs->trans("Company").'
'; print ''; print ''; print ''; diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 4e11905bc2a..0befb69eb71 100755 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -22,6 +22,7 @@ * $Id$ * $Source$ */ + /** \file htdocs/product/document.php \ingroup product @@ -251,7 +252,7 @@ if ($productid > 0) } else { - echo ''.$langs->trans('Delete').''; + echo ''.img_delete($langs->trans('Delete')).''; } print "\n"; }
'.$langs->trans("Ref").''.$act->id.'
'.$langs->trans("Type").''.$act->type.'
'.$langs->trans("Title").''.$act->label.'
'.$langs->trans("Company").'