Merge pull request #773 from FHenry/develop
[ task #773 ] Add Project document in GED(ECM) modules
This commit is contained in:
commit
f85e422c59
@ -241,6 +241,16 @@ if ($type == 'directory')
|
||||
|
||||
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url);
|
||||
}
|
||||
else if ($module == 'project') // Auto area for projects
|
||||
{
|
||||
$upload_dir = $conf->projet->dir_output;
|
||||
$filearray=dol_dir_list($upload_dir,"files",1,'',array('^SPECIMEN\.pdf$','^\.','\.meta$','^temp$','^CVS$','^thumbs$'),$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
|
||||
|
||||
$param.='&module='.$module;
|
||||
$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("NoFileFound")));
|
||||
|
||||
$formfile->list_of_autoecmfiles($upload_dir,$filearray,$module,$param,1,'',$user->rights->ecm->upload,1,$textifempty,$maxlengthname,$url);
|
||||
}
|
||||
else // Manual area
|
||||
{
|
||||
$relativepath=$ecmdir->getRelativePath();
|
||||
|
||||
@ -795,6 +795,11 @@ class FormFile
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
$object_instance=new ChargeSociales($this->db);
|
||||
}
|
||||
else if ($modulepart == 'project')
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
$object_instance=new Project($this->db);
|
||||
}
|
||||
|
||||
$var=true;
|
||||
foreach($filearray as $key => $file)
|
||||
@ -821,6 +826,7 @@ class FormFile
|
||||
if ($modulepart == 'contract') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); }
|
||||
if ($modulepart == 'product') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:''); }
|
||||
if ($modulepart == 'tax') { preg_match('/(\d+)\/[^\/]+$/',$relativefile,$reg); $id=(isset($reg[1])?$reg[1]:''); }
|
||||
if ($modulepart == 'project') { preg_match('/(.*)\/[^\/]+$/',$relativefile,$reg); $ref=(isset($reg[1])?$reg[1]:'');}
|
||||
|
||||
if (! $id && ! $ref) continue;
|
||||
|
||||
|
||||
@ -390,7 +390,9 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) {
|
||||
if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersOrders"), 'desc'=>$langs->trans("ECMDocsByOrders")); }
|
||||
if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsByInvoices")); }
|
||||
if (! empty($conf->tax->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'tax', 'test'=>$conf->tax->enabled, 'label'=>$langs->trans("SocialContributions"), 'desc'=>$langs->trans("ECMDocsBySocialContributions")); }
|
||||
if (! empty($conf->projet->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'project', 'test'=>$conf->projet->enabled, 'label'=>$langs->trans("Projects"), 'desc'=>$langs->trans("ECMDocsByProjects")); }
|
||||
}
|
||||
|
||||
print_fiche_titre($langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager"));
|
||||
|
||||
print '<div class="hideonsmartphone">';
|
||||
|
||||
@ -43,6 +43,7 @@ ECMDocsByOrders=Documents linked to customers orders
|
||||
ECMDocsByContracts=Documents linked to contracts
|
||||
ECMDocsByInvoices=Documents linked to customers invoices
|
||||
ECMDocsByProducts=Documents linked to products
|
||||
ECMDocsByProjects=Documents linked to projects
|
||||
ECMNoDirectoryYet=No directory created
|
||||
ShowECMSection=Show directory
|
||||
DeleteSection=Remove directory
|
||||
|
||||
@ -43,6 +43,7 @@ ECMDocsByOrders=Documentos asociados a pedidos
|
||||
ECMDocsByContracts=Documentos asociados a contratos
|
||||
ECMDocsByInvoices=Documentos asociados a facturas
|
||||
ECMDocsByProducts=Documentos enlazados a productos
|
||||
ECMDocsByProjects=Documentos enlazados a proyectos
|
||||
ECMNoDirectoryYet=No se ha creado el directorio
|
||||
ShowECMSection=Mostrar directorio
|
||||
DeleteSection=Eliminación directorio
|
||||
|
||||
@ -43,6 +43,7 @@ ECMDocsByOrders=Documents associés aux commandes
|
||||
ECMDocsByContracts=Documents associés aux contrats
|
||||
ECMDocsByInvoices=Documents associés aux factures
|
||||
ECMDocsByProducts=Documents associés aux produits
|
||||
ECMDocsByProjects=Documents associés aux projets
|
||||
ECMNoDirectoryYet=Aucun répertoire créé
|
||||
ShowECMSection=Afficher répertoire
|
||||
DeleteSection=Suppression répertoire
|
||||
|
||||
Loading…
Reference in New Issue
Block a user