';
@@ -1131,7 +1133,7 @@ class FormFile
// Show list of documents
if (empty($useinecm)) print load_fiche_titre($langs->trans("AttachedFiles"));
if (empty($url)) $url=$_SERVER["PHP_SELF"];
- print '
';
+ print '
'."\n";
print '
';
$sortref="fullname";
if ($modulepart == 'invoice_supplier') $sortref='level1name';
@@ -1140,7 +1142,7 @@ class FormFile
print_liste_field_titre($langs->trans("Size"),$url,"size","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Date"),$url,"date","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre('','','');
- print '
';
+ print ''."\n";
// To show ref or specific information according to view to show (defined by $module)
if ($modulepart == 'company')
@@ -1276,6 +1278,7 @@ class FormFile
if (! $found > 0 || ! is_object($this->cache_objects[$modulepart.'_'.$id.'_'.$ref])) continue; // We do not show orphelins files
$var=!$var;
+ print ''."\n";
print '
';
print '
';
if ($found > 0 && is_object($this->cache_objects[$modulepart.'_'.$id.'_'.$ref])) print $this->cache_objects[$modulepart.'_'.$id.'_'.$ref]->getNomUrl(1,'document');
diff --git a/htdocs/ecm/docfile.php b/htdocs/ecm/docfile.php
index ce4bf480668..89caaf91824 100644
--- a/htdocs/ecm/docfile.php
+++ b/htdocs/ecm/docfile.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2008-2016 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
@@ -159,14 +159,13 @@ llxHeader();
$form=new Form($db);
-$fullpath=$conf->ecm->dir_output.'/'.$ecmdir->label.'/'.$urlfile;
+$fullpath=$conf->ecm->dir_output.'/'.$relativepath.$urlfile;
$file = new stdClass();
$file->section_id=$ecmdir->id;
$file->label=$urlfile;
$head = ecm_file_prepare_head($file);
-dol_fiche_head($head, 'card', $langs->trans("File"), 0, 'generic');
if ($_GET["action"] == 'edit')
{
@@ -177,8 +176,10 @@ if ($_GET["action"] == 'edit')
print '';
}
+dol_fiche_head($head, 'card', $langs->trans("File"), 0, 'generic');
+
print '
';
-print '
'.$langs->trans("Ref").'
';
+print '
'.$langs->trans("Ref").'
';
$s='';
$tmpecmdir=new EcmDirectory($db); // Need to create a new one
$tmpecmdir->fetch($ecmdir->id);
@@ -203,7 +204,7 @@ while ($tmpecmdir && $result > 0)
print img_picto('','object_dir').' '.$langs->trans("ECMRoot").' -> ';
print $s;
print ' -> ';
-if (GETPOST('action') == 'edit') print '';
+if (GETPOST('action') == 'edit') print '';
else print $urlfile;
print '
';
-}
+
+// Define $urlwithroot
+$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
+$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
+//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
+
+print '