Enhancement in ecm module

This commit is contained in:
Laurent Destailleur 2008-10-26 01:26:18 +00:00
parent f67962a049
commit 32801a3655
13 changed files with 623 additions and 584 deletions

View File

@ -236,7 +236,7 @@ print '<table class="nobordernopadding" width="100%"><tr><td valign="top">';
if (eregi('search',$action)) if (eregi('search',$action))
{ {
//print_fiche_titre($langs->trans("ECMManualOrg")); //print_fiche_titre($langs->trans("ECMSectionsManual"));
print '<form method="post" action="'.DOL_URL_ROOT.'/ecm/search.php">'; print '<form method="post" action="'.DOL_URL_ROOT.'/ecm/search.php">';
print '<table class="nobordernopadding" width="100%">'; print '<table class="nobordernopadding" width="100%">';
@ -249,7 +249,7 @@ if (eregi('search',$action))
print "</table></form>"; print "</table></form>";
//print $langs->trans("ECMManualOrgDesc"); //print $langs->trans("ECMManualOrgDesc");
//print_fiche_titre($langs->trans("ECMAutoOrg")); //print_fiche_titre($langs->trans("ECMSectionAuto"));
print '<form method="post" action="'.DOL_URL_ROOT.'/ecm/search.php">'; print '<form method="post" action="'.DOL_URL_ROOT.'/ecm/search.php">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
@ -279,7 +279,7 @@ if (eregi('search',$action))
print '<tr '. $bc[false].'><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans("Search").'"></td></tr>'; print '<tr '. $bc[false].'><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans("Search").'"></td></tr>';
print "</table></form>"; print "</table></form>";
//print $langs->trans("ECMAutoOrgDesc"); //print $langs->trans("ECMSectionAutoDesc");
} }
@ -300,7 +300,7 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td class="liste_titre" align="left">'.$langs->trans("ECMSections").'</td>'; print '<td class="liste_titre" align="left">'.$langs->trans("ECMSections").'</td>';
print '<td class="liste_titre" colspan="4" align="right">'; print '<td class="liste_titre" colspan="5" align="right">';
print '<a href="'.$_SERVER["PHP_SELF"].'?action=refreshmanual'.($section?'&amp;section='.$section:'').'">'.$langs->trans("Refresh").' '.img_picto($langs->trans("Refresh"),'refresh').'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=refreshmanual'.($section?'&amp;section='.$section:'').'">'.$langs->trans("Refresh").' '.img_picto($langs->trans("Refresh"),'refresh').'</a>';
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
@ -313,13 +313,14 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $
print '<table class="nobordernopadding"><tr class="nobordernopadding">'; print '<table class="nobordernopadding"><tr class="nobordernopadding">';
print '<td align="left" width="24px">'; print '<td align="left" width="24px">';
print img_picto_common('','treemenu/base.gif'); print img_picto_common('','treemenu/base.gif');
print '</td><td align="left">'.$langs->trans("ECMRoot").' ('.$langs->trans("ECMSectionAuto").')'; print '</td><td align="left">'.$langs->trans("ECMRoot").' ('.$langs->trans("ECMSectionsAuto").')';
print '</td>'; print '</td>';
print '</tr></table>'; print '</tr></table>';
print '</td>'; print '</td>';
print '<td align="right">&nbsp;</td>'; print '<td align="right">&nbsp;</td>';
print '<td align="right">&nbsp;</td>'; print '<td align="right">&nbsp;</td>';
print '<td align="right">&nbsp;</td>'; print '<td align="right">&nbsp;</td>';
print '<td align="right">&nbsp;</td>';
print '<td align="center">'; print '<td align="center">';
$htmltooltip=$langs->trans("ECMAreaDesc2"); $htmltooltip=$langs->trans("ECMAreaDesc2");
print $form->textwithhelp('',$htmltooltip,1,0); print $form->textwithhelp('',$htmltooltip,1,0);
@ -343,15 +344,28 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $
print '<td align="left">'; print '<td align="left">';
print '<table class="nobordernopadding"><tr class="nobordernopadding"><td>'; print '<table class="nobordernopadding"><tr class="nobordernopadding"><td>';
tree_showpad($sectionauto,$key); tree_showpad($sectionauto,$key);
print '</td><td valign="top">'; print '</td>';
print img_picto('','object_dir');
print '</td><td valign="middle">&nbsp;'; print '<td valign="top">';
$n=3;
$ref=img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/plustop'.$n.'.gif','',1);
$oldref=$ecmdirstatic->ref;
$ecmdirstatic->ref=$ref;
print $ecmdirstatic->getNomUrl(0,$option);
$ecmdirstatic->ref=$oldref;
print img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/folder.gif','',1);
print '</td>';
print '<td valign="middle">';
print '<a href="'.DOL_URL_ROOT.'/ecm/docother.php">'; print '<a href="'.DOL_URL_ROOT.'/ecm/docother.php">';
print $val['label']; print $val['label'];
print '</a></td></tr></table>'; print '</a></td></tr></table>';
print "</td>\n"; print "</td>\n";
// Nb of doc // Nb of doc in dir
print '<td align="right">&nbsp;</td>';
// Nb of doc in subdir
print '<td align="right">&nbsp;</td>'; print '<td align="right">&nbsp;</td>';
// Edit link // Edit link
@ -363,7 +377,7 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $
// Info // Info
print '<td align="center">'; print '<td align="center">';
$htmltooltip='<b>'.$langs->trans("ECMSection").'</b>: '.$val['label'].'<br>'; $htmltooltip='<b>'.$langs->trans("ECMSection").'</b>: '.$val['label'].'<br>';
$htmltooltip='<b>'.$langs->trans("Type").'</b>: '.$langs->trans("ECMAutoOrg").'<br>'; $htmltooltip='<b>'.$langs->trans("Type").'</b>: '.$langs->trans("ECMSectionAuto").'<br>';
$htmltooltip.='<b>'.$langs->trans("ECMCreationUser").'</b>: '.$langs->trans("ECMTypeAuto").'<br>'; $htmltooltip.='<b>'.$langs->trans("ECMCreationUser").'</b>: '.$langs->trans("ECMTypeAuto").'<br>';
$htmltooltip.='<b>'.$langs->trans("Description").'</b>: '.$val['desc']; $htmltooltip.='<b>'.$langs->trans("Description").'</b>: '.$val['desc'];
print $form->textwithhelp('',$htmltooltip,1,0); print $form->textwithhelp('',$htmltooltip,1,0);
@ -382,7 +396,7 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $
print '<table class="nobordernopadding"><tr class="nobordernopadding">'; print '<table class="nobordernopadding"><tr class="nobordernopadding">';
print '<td align="left" width="24px">'; print '<td align="left" width="24px">';
print img_picto_common('','treemenu/base.gif'); print img_picto_common('','treemenu/base.gif');
print '</td><td align="left">'.$langs->trans("ECMRoot").' ('.$langs->trans("ECMSectionManual").')'; print '</td><td align="left">'.$langs->trans("ECMRoot").' ('.$langs->trans("ECMSectionsManual").')';
print '</td>'; print '</td>';
print '</tr></table></td>'; print '</tr></table></td>';
print '<td align="right">'; print '<td align="right">';
@ -390,6 +404,7 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $
print '<td align="right">&nbsp;</td>'; print '<td align="right">&nbsp;</td>';
//print '<td align="right"><a href="'.DOL_URL_ROOT.'/ecm/docdir.php?action=create">'.img_edit_add().'</a></td>'; //print '<td align="right"><a href="'.DOL_URL_ROOT.'/ecm/docdir.php?action=create">'.img_edit_add().'</a></td>';
print '<td align="right">&nbsp;</td>'; print '<td align="right">&nbsp;</td>';
print '<td align="right">&nbsp;</td>';
print '<td align="center">'; print '<td align="center">';
$htmltooltip=$langs->trans("ECMAreaDesc2"); $htmltooltip=$langs->trans("ECMAreaDesc2");
print $form->textwithhelp('',$htmltooltip,1,0); print $form->textwithhelp('',$htmltooltip,1,0);
@ -488,8 +503,11 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $
print '<table class="nobordernopadding"><tr class="nobordernopadding"><td>'; print '<table class="nobordernopadding"><tr class="nobordernopadding"><td>';
$resarray=tree_showpad($fulltree,$key); $resarray=tree_showpad($fulltree,$key);
$a=$resarray[0]; $a=$resarray[0];
$b=$resarray[1]; $nbofsubdir=$resarray[1];
$c=$resarray[2];
$nboffilesinsubdir=$resarray[3];
print '</td>'; print '</td>';
// Show picto // Show picto
print '<td valign="top">'; print '<td valign="top">';
//print $val['fullpath']."(".$showline.")"; //print $val['fullpath']."(".$showline.")";
@ -515,7 +533,12 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $
print "</td>\n"; print "</td>\n";
// Nb of docs // Nb of docs
print '<td align="right">'.$val['cachenbofdoc'].'</td>'; print '<td align="right">';
print $val['cachenbofdoc'];
print '</td>';
print '<td align="left">';
if ($nbofsubdir && $nboffilesinsubdir) print '<font color="#AAAAAA">+'.$nboffilesinsubdir.'</font> ';
print '</td>';
// Edit link // Edit link
print '<td align="right"><a href="'.DOL_URL_ROOT.'/ecm/docmine.php?section='.$val['id'].'">'.img_edit().'</a></td>'; print '<td align="right"><a href="'.DOL_URL_ROOT.'/ecm/docmine.php?section='.$val['id'].'">'.img_edit().'</a></td>';
@ -529,10 +552,13 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $
$userstatic->id=$val['fk_user_c']; $userstatic->id=$val['fk_user_c'];
$userstatic->nom=$val['login_c']; $userstatic->nom=$val['login_c'];
$htmltooltip='<b>'.$langs->trans("ECMSection").'</b>: '.$val['label'].'<br>'; $htmltooltip='<b>'.$langs->trans("ECMSection").'</b>: '.$val['label'].'<br>';
$htmltooltip='<b>'.$langs->trans("Type").'</b>: '.$langs->trans("ECMManualOrg").'<br>'; $htmltooltip='<b>'.$langs->trans("Type").'</b>: '.$langs->trans("ECMSectionManual").'<br>';
$htmltooltip.='<b>'.$langs->trans("ECMCreationUser").'</b>: '.$userstatic->getNomUrl(1).'<br>'; $htmltooltip.='<b>'.$langs->trans("ECMCreationUser").'</b>: '.$userstatic->getNomUrl(1).'<br>';
$htmltooltip.='<b>'.$langs->trans("ECMCreationDate").'</b>: '.dolibarr_print_date($val['date_c'],"dayhour").'<br>'; $htmltooltip.='<b>'.$langs->trans("ECMCreationDate").'</b>: '.dolibarr_print_date($val['date_c'],"dayhour").'<br>';
$htmltooltip.='<b>'.$langs->trans("Description").'</b>: '.$val['description']; $htmltooltip.='<b>'.$langs->trans("Description").'</b>: '.$val['description'].'<br>';
$htmltooltip.='<b>'.$langs->trans("ECMNbOfFilesInDir").'</b>: '.$val['cachenbofdoc'].'<br>';
if ($nbofsubdir) $htmltooltip.='<b>'.$langs->trans("ECMNbOfFilesInSubDir").'</b>: '.$nboffilesinsubdir;
else $htmltooltip.='<b>'.$langs->trans("ECMNbOfSubDir").'</b>: '.$nbofsubdir.'<br>';
print $form->textwithhelp('',$htmltooltip,1,0); print $form->textwithhelp('',$htmltooltip,1,0);
print "</td>"; print "</td>";

View File

@ -13,6 +13,8 @@ ECMNbOfDocsSmall=Nb of doc.
ECMSection=Directory ECMSection=Directory
ECMSectionManual=Manual directory ECMSectionManual=Manual directory
ECMSectionAuto=Automatic directory ECMSectionAuto=Automatic directory
ECMSectionsManual=Manual directories
ECMSectionsAuto=Automatic directories
ECMSections=Directories ECMSections=Directories
ECMRoot=Root ECMRoot=Root
ECMNewSection=New directory ECMNewSection=New directory
@ -20,6 +22,9 @@ ECMAddSection=Add a manual directory
ECMNewSection=New manual directory ECMNewSection=New manual directory
ECMNewDocument=New document ECMNewDocument=New document
ECMCreationDate=Creation date ECMCreationDate=Creation date
ECMNbOfFilesInDir=Number of files in directory
ECMNbOfSubDir=Number of sub-directories
ECMNbOfFilesInSubDir=Nunber of iles in sub-directories
ECMCreationUser=Creator ECMCreationUser=Creator
ECMArea=ECM area ECMArea=ECM area
ECMAreaDesc=The ECM (Electronic Content Management) area allows you to save, share and search quickly all kind of documents in Dolibarr. ECMAreaDesc=The ECM (Electronic Content Management) area allows you to save, share and search quickly all kind of documents in Dolibarr.
@ -37,8 +42,6 @@ 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
ECMManualOrg=Manual directory
ECMAutoOrg=Automatic directory
ECMNoDirecotyYet=No directory created ECMNoDirecotyYet=No directory created
ShowECMSection=Show directory ShowECMSection=Show directory
DeleteSection=Remove directory DeleteSection=Remove directory

View File

@ -8,28 +8,33 @@ DocsContracts=Documents contrats
DocsProposals=Documents propositions DocsProposals=Documents propositions
DocsOrders=Documents commandes DocsOrders=Documents commandes
DocsInvoices=Documents factures DocsInvoices=Documents factures
ECMNbOfDocs=Nb de documents de la rubrique ECMNbOfDocs=Nb de documents du répertoire
ECMNbOfDocsSmall=Nb de doc. ECMNbOfDocsSmall=Nb de doc.
ECMSection=Rubrique ECMSection=Répertoire
ECMSectionManual=Rubriques manuelles ECMSectionManual=Répertoire manuel
ECMSectionAuto=Rubriques automatiques ECMSectionAuto=Répertoire automatique
ECMSections=Rubriques ECMSectionsManual=Répertoires manuels
ECMSectionsAuto=Répertoires automatiques
ECMSections=Répertoires
ECMRoot=Racine ECMRoot=Racine
ECMNewSection=Nouvelle rubrique ECMNewSection=Nouveau répertoire
ECMAddSection=Ajouter rubrique manuelle ECMAddSection=Ajouter répertoire manuel
ECMNewSection=Nouvelle rubrique manuelle ECMNewSection=Nouveau répertoire manuel
ECMNewDocument=Nouveau document ECMNewDocument=Nouveau document
ECMCreationDate=Date création ECMCreationDate=Date création
ECMNbOfFilesInDir=Nombre de fichiers dans le répertoire
ECMNbOfSubDir=Nombre de sous-répertoires
ECMNbOfFilesInSubDir=Nombre de fichiers dans les sous-répertoires
ECMCreationUser=Créateur ECMCreationUser=Créateur
ECMArea=Espace GED ECMArea=Espace GED
ECMAreaDesc=L'espace GED (Gestion Electronique de Documents) vous permet de stocker dans Dolibarr et retrouver rapidement tout type de documents. ECMAreaDesc=L'espace GED (Gestion Electronique de Documents) vous permet de stocker dans Dolibarr et retrouver rapidement tout type de documents.
ECMAreaDesc2=* Les rubriques automatiques sont alimentées automatiquement lors de l'ajout d'un document depuis une fiche objet (propal, facture...).<br>* Les rubriques manuelles peuvent etre utilisées pour stocker des documents divers, non liés à un objet particulier. ECMAreaDesc2=* Les répertoires automatiques sont alimentées automatiquement lors de l'ajout d'un document depuis une fiche objet (propal, facture...).<br>* Les répertoires manuels peuvent etre utilisées pour stocker des documents divers, non liés à un objet particulier.
ECMSectionWasRemoved=La rubrique <b>%s</b> a été effacée. ECMSectionWasRemoved=Le répertoire <b>%s</b> a été effacée.
ECMDocumentsSection=Document de la section ECMDocumentsSection=Document de la section
ECMSearchByKeywords=Recherche par mots clés ECMSearchByKeywords=Recherche par mots clés
ECMSearchByEntity=Recherche par objet ECMSearchByEntity=Recherche par objet
ECMSectionOfDocuments=Rubriques des documents ECMSectionOfDocuments=Répertoires des documents
ECMTypeManual=Manuelle ECMTypeManual=Manuel
ECMTypeAuto=Automatique ECMTypeAuto=Automatique
ECMDocsByThirdParties=Documents associés aux tiers ECMDocsByThirdParties=Documents associés aux tiers
ECMDocsByProposals=Documents associés aux propositions ECMDocsByProposals=Documents associés aux propositions
@ -37,13 +42,11 @@ ECMDocsByOrders=Documents associ
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
ECMManualOrg=Rubrique manuelle ECMNoDirecotyYet=Aucun répertoire créée
ECMAutoOrg=Rubrique automatique ShowECMSection=Afficher répertoire
ECMNoDirecotyYet=Aucune rubrique créée DeleteSection=Suppression répertoire
ShowECMSection=Afficher rubrique ConfirmDeleteSection=Confirmez-vous la suppression du répertoire <b>%s</b> ?
DeleteSection=Suppression rubrique
ConfirmDeleteSection=Confirmez-vous la suppression de la rubrique <b>%s</b> ?
ECMDirectoryForFiles=Répertoire relatif pour les fichiers ECMDirectoryForFiles=Répertoire relatif pour les fichiers
CannotRemoveDirectoryContainsFiles=Suppression impossible car des fichiers sont présents CannotRemoveDirectoryContainsFiles=Suppression impossible car des fichiers sont présents
ECMFileManager=Gestionnaire fichier ECMFileManager=Gestionnaire fichier
ECMSelectASection=Selectionner une rubrique sur l'arbre de gauche... ECMSelectASection=Selectionner un répertoire sur l'arbre de gauche...

View File

@ -91,6 +91,8 @@ function tree_showpad(&$fulltree,$key,$selected=0)
$atleastonofthislevelafter=0; $atleastonofthislevelafter=0;
$nbofhigherlevelafter=0; $nbofhigherlevelafter=0;
$nbofdirinsub=0;
$nbofdocinsub=0;
$found=0; $found=0;
//print 'x'.$key; //print 'x'.$key;
foreach($fulltree as $key2 => $val2) foreach($fulltree as $key2 => $val2)
@ -99,6 +101,8 @@ function tree_showpad(&$fulltree,$key,$selected=0)
{ {
if ($fulltree[$key2]['level'] > $pos) if ($fulltree[$key2]['level'] > $pos)
{ {
$nbofdirinsub++;
$nbofdocinsub+=$fulltree[$key2]['cachenbofdoc'];
$nbofhigherlevelafter++; $nbofhigherlevelafter++;
} }
if ($fulltree[$key2]['level'] == $pos) if ($fulltree[$key2]['level'] == $pos)
@ -110,7 +114,10 @@ function tree_showpad(&$fulltree,$key,$selected=0)
break; break;
} }
} }
if ($key2 == $key) $found=1; if ($key2 == $key)
{
$found=1;
}
} }
//print $atleastonofthislevelafter; //print $atleastonofthislevelafter;
@ -127,7 +134,7 @@ function tree_showpad(&$fulltree,$key,$selected=0)
$pos++; $pos++;
} }
return array($atleastonofthislevelafter,$nbofhigherlevelafter); return array($atleastonofthislevelafter,$nbofhigherlevelafter,$nbofdirinsub,$nbofdocinsub);
} }