[ task #773 ] Add Project document in GED(ECM) modules
This commit is contained in:
parent
4fb4734eed
commit
7881502b52
@ -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);
|
$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
|
else // Manual area
|
||||||
{
|
{
|
||||||
$relativepath=$ecmdir->getRelativePath();
|
$relativepath=$ecmdir->getRelativePath();
|
||||||
|
|||||||
@ -795,6 +795,11 @@ class FormFile
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||||
$object_instance=new ChargeSociales($this->db);
|
$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;
|
$var=true;
|
||||||
foreach($filearray as $key => $file)
|
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 == '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 == '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 == '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;
|
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'=>'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->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->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_fiche_titre($langs->trans("ECMArea").' - '.$langs->trans("ECMFileManager"));
|
||||||
|
|
||||||
print '<div class="hideonsmartphone">';
|
print '<div class="hideonsmartphone">';
|
||||||
|
|||||||
@ -43,6 +43,7 @@ ECMDocsByOrders=Documents linked to customers orders
|
|||||||
ECMDocsByContracts=Documents linked to contracts
|
ECMDocsByContracts=Documents linked to contracts
|
||||||
ECMDocsByInvoices=Documents linked to customers invoices
|
ECMDocsByInvoices=Documents linked to customers invoices
|
||||||
ECMDocsByProducts=Documents linked to products
|
ECMDocsByProducts=Documents linked to products
|
||||||
|
ECMDocsByProjects=Documents linked to projects
|
||||||
ECMNoDirectoryYet=No directory created
|
ECMNoDirectoryYet=No directory created
|
||||||
ShowECMSection=Show directory
|
ShowECMSection=Show directory
|
||||||
DeleteSection=Remove directory
|
DeleteSection=Remove directory
|
||||||
|
|||||||
@ -43,6 +43,7 @@ ECMDocsByOrders=Documentos asociados a pedidos
|
|||||||
ECMDocsByContracts=Documentos asociados a contratos
|
ECMDocsByContracts=Documentos asociados a contratos
|
||||||
ECMDocsByInvoices=Documentos asociados a facturas
|
ECMDocsByInvoices=Documentos asociados a facturas
|
||||||
ECMDocsByProducts=Documentos enlazados a productos
|
ECMDocsByProducts=Documentos enlazados a productos
|
||||||
|
ECMDocsByProjects=Documentos enlazados a proyectos
|
||||||
ECMNoDirectoryYet=No se ha creado el directorio
|
ECMNoDirectoryYet=No se ha creado el directorio
|
||||||
ShowECMSection=Mostrar directorio
|
ShowECMSection=Mostrar directorio
|
||||||
DeleteSection=Eliminación directorio
|
DeleteSection=Eliminación directorio
|
||||||
|
|||||||
@ -43,6 +43,7 @@ ECMDocsByOrders=Documents associés aux commandes
|
|||||||
ECMDocsByContracts=Documents associés aux contrats
|
ECMDocsByContracts=Documents associés aux contrats
|
||||||
ECMDocsByInvoices=Documents associés aux factures
|
ECMDocsByInvoices=Documents associés aux factures
|
||||||
ECMDocsByProducts=Documents associés aux produits
|
ECMDocsByProducts=Documents associés aux produits
|
||||||
|
ECMDocsByProjects=Documents associés aux projets
|
||||||
ECMNoDirectoryYet=Aucun répertoire créé
|
ECMNoDirectoryYet=Aucun répertoire créé
|
||||||
ShowECMSection=Afficher répertoire
|
ShowECMSection=Afficher répertoire
|
||||||
DeleteSection=Suppression répertoire
|
DeleteSection=Suppression répertoire
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user