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 '
';
+ // Affichage fiche action en mode visu
+ print '| '.$langs->trans("Ref").' | '.$act->id.' | ';
+ print '| '.$langs->trans("Type").' | '.$act->type.' |
';
+ print '| '.$langs->trans("Title").' | '.$act->label.' |
';
+ print '| '.$langs->trans("Company").' | ';
+ print ''.img_object($langs->trans("ShowCompany"),'company').' '.$act->societe->nom_url.' | ';
+
+ print ''.$langs->trans("Contact").' | ';
+ print '';
+ if ($act->contact->id) print ''.img_object($langs->trans("ShowContact"),'contact').' '.$act->contact->fullname.'';
+ else print $langs->trans("None");
+ print ' |
';
+ print '| '.$langs->trans("DateCreation").' | '.strftime('%d %B %Y %H:%M',$act->date).' | ';
+ print ''.$langs->trans("Author").' | ';
+ print ''.img_object($langs->trans("ShowUser"),'user').' '.$act->author->fullname.' |
';
+
// 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 '';
- //print '| '.$langs->trans("Ref").' | '.$product->ref.' |
';
- //print '| '.$langs->trans("Label").' | '.$product->libelle.' |
';
print '| '.$langs->trans("NbOfAttachedFiles").' | '.sizeof($filearray).' |
';
print '| '.$langs->trans("TotalSizeOfAttachedFiles").' | '.$totalsize.' '.$langs->trans("bytes").' |
';
print '
';
@@ -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 '| '.$langs->trans("Ref").' | '.$act->id.' |
';
print '| '.$langs->trans("Type").' | '.$act->type.' |
';
print '| '.$langs->trans("Title").' | '.$act->label.' |
';
print '| '.$langs->trans("Company").' | ';
@@ -519,6 +520,7 @@ if ($_GET["id"])
{
// Affichage fiche action en mode visu
print '| '.$langs->trans("Ref").' | '.$act->id.' | ';
print '| '.$langs->trans("Type").' | '.$act->type.' |
';
print '| '.$langs->trans("Title").' | '.$act->label.' |
';
print '| '.$langs->trans("Company").' | ';
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";
}