Search criteria on several columns
This commit is contained in:
parent
0ceeb0f4e6
commit
4a7ed4881b
@ -121,12 +121,12 @@ $userstatic = new User($db);
|
||||
// Ajout rubriques automatiques
|
||||
$rowspan=0;
|
||||
$sectionauto=array();
|
||||
if ($conf->societe->enabled) { $rowspan++; $sectionauto[]=array('test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsByThirdParties")); }
|
||||
if ($conf->propal->enabled) { $rowspan++; $sectionauto[]=array('test'=>$conf->propal->enabled, 'label'=>$langs->trans("Proposals"), 'desc'=>$langs->trans("ECMDocsByProposals")); }
|
||||
if ($conf->commande->enabled) { $rowspan++; $sectionauto[]=array('test'=>$conf->commande->enabled,'label'=>$langs->trans("Orders"), 'desc'=>$langs->trans("ECMDocsByOrders")); }
|
||||
if ($conf->contrat->enabled) { $rowspan++; $sectionauto[]=array('test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsByContracts")); }
|
||||
if ($conf->facture->enabled) { $rowspan++; $sectionauto[]=array('test'=>$conf->facture->enabled, 'label'=>$langs->trans("Invoices"), 'desc'=>$langs->trans("ECMDocsByInvoices")); }
|
||||
if ($conf->produit->enabled) { $rowspan++; $sectionauto[]=array('test'=>$conf->produit->enabled, 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); }
|
||||
if ($conf->societe->enabled) { $rowspan++; $sectionauto[]=array('module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsByThirdParties")); }
|
||||
if ($conf->propal->enabled) { $rowspan++; $sectionauto[]=array('module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Prop"), 'desc'=>$langs->trans("ECMDocsByProposals")); }
|
||||
if ($conf->commande->enabled) { $rowspan++; $sectionauto[]=array('module'=>'order', 'test'=>$conf->commande->enabled,'label'=>$langs->trans("Orders"), 'desc'=>$langs->trans("ECMDocsByOrders")); }
|
||||
if ($conf->contrat->enabled) { $rowspan++; $sectionauto[]=array('module'=>'contract','test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsByContracts")); }
|
||||
if ($conf->facture->enabled) { $rowspan++; $sectionauto[]=array('module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("Invoices"), 'desc'=>$langs->trans("ECMDocsByInvoices")); }
|
||||
if ($conf->produit->enabled) { $rowspan++; $sectionauto[]=array('module'=>'product', 'test'=>$conf->produit->enabled, 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); }
|
||||
|
||||
|
||||
//***********************
|
||||
@ -160,18 +160,26 @@ print '</td><td width="50%" valign="top">';
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/ecm/search.php">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td colspan="3">'.$langs->trans("ECMSearchByEntity").'</td></tr>';
|
||||
|
||||
|
||||
print '<td colspan="4">'.$langs->trans("ECMSearchByEntity").'</td></tr>';
|
||||
|
||||
$buthtml='<td rowspan="'.$rowspan.'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
|
||||
$butshown=0;
|
||||
if ($conf->societe->enabled) { print "<tr $bc[0]><td>".$langs->trans("ThirdParty").':</td><td><input type="text" name="sf_ref" class="flat" size="18"></td>'.($butshown?'':$buthtml).'</tr>'; $butshown++; }
|
||||
if ($conf->contrat->enabled) { print "<tr $bc[0]><td>".$langs->trans("Contrat").':</td><td><input type="text" name="sf_ref" class="flat" size="18"></td>'.($butshown?'':$buthtml).'</tr>'; $butshown++; }
|
||||
if ($conf->propal->enabled) { print "<tr $bc[0]><td>".$langs->trans("Proposal").':</td><td><input type="text" name="sf_ref" class="flat" size="18"></td>'.($butshown?'':$buthtml).'</tr>'; $butshown++; }
|
||||
if ($conf->commande->enabled) { print "<tr $bc[0]><td>".$langs->trans("Order").':</td><td><input type="text" name="sf_ref" class="flat" size="18"></td>'.($butshown?'':$buthtml).'</tr>'; $butshown++; }
|
||||
if ($conf->facture->enabled) { print "<tr $bc[0]><td>".$langs->trans("Invoice").':</td><td><input type="text" name="sf_ref" class="flat" size="18"></td>'.($butshown?'':$buthtml).'</tr>'; $butshown++; }
|
||||
if ($conf->produit->enabled) { print "<tr $bc[0]><td>".$langs->trans("ProductsAndServices").':</td><td><input type="text" name="sf_ref" class="flat" size="18"></td>'.($butshown?'':$buthtml).'</tr>'; $butshown++; }
|
||||
foreach($sectionauto as $section)
|
||||
{
|
||||
if (! $section['test']) continue;
|
||||
if ($butshown % 2 == 0) print '<tr '. $bc[0].'>';
|
||||
print "<td>".$section['label'].':</td>';
|
||||
print '<td';
|
||||
if ($butshown % 2 == 1) print ' align="right"';
|
||||
print '>';
|
||||
print '<input type="text" name="search_'.$section['module'].'" class="flat" size="6">';
|
||||
print '</td>';
|
||||
if ($butshown % 2 == 1) print '</tr>';
|
||||
$butshown++;
|
||||
}
|
||||
if ($butshown % 2 == 1) print '<td> </td><td> </td></tr>';
|
||||
|
||||
print '<tr '. $bc[0].'><td colspan="4" align="center"><input type="submit" class="button" value="'.$langs->trans("Search").'"></td></tr>';
|
||||
print "</table></form><br>";
|
||||
//print $langs->trans("ECMAutoOrgDesc");
|
||||
|
||||
|
||||
@ -373,9 +373,10 @@ class FormFile
|
||||
* \param param Parameters on sort links
|
||||
* \param forcedownload Mime type is forced to 'application/binary' to have a download
|
||||
* \param relativepath Relative path of docs (autodefined if not provided)
|
||||
* \param permtodelete Permission to delete
|
||||
* \return int <0 if KO, nb of files shown if OK
|
||||
*/
|
||||
function list_of_documents($filearray,$object,$modulepart,$param,$forcedownload=0,$relativepath='')
|
||||
function list_of_documents($filearray,$object,$modulepart,$param,$forcedownload=0,$relativepath='',$permtodelete=1)
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
global $bc;
|
||||
@ -422,7 +423,10 @@ class FormFile
|
||||
print '<td align="center">'.dolibarr_print_date($file['date'],"dayhour").'</td>';
|
||||
print '<td align="right">';
|
||||
//print ' ';
|
||||
print '<a href="'.$url.'?id='.$object->id.'&section='.$_REQUEST["section"].'&action=delete&urlfile='.urlencode($file['name']).'">'.img_delete().'</a>';
|
||||
if ($permtodelete)
|
||||
print '<a href="'.$url.'?id='.$object->id.'&section='.$_REQUEST["section"].'&action=delete&urlfile='.urlencode($file['name']).'">'.img_delete().'</a>';
|
||||
else
|
||||
print ' ';
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@ -412,6 +412,9 @@ Permission2401=Read actions (events or tasks) linked to his account
|
||||
Permission2402=Create/modify/delete actions (events or tasks) linked to his account
|
||||
Permission2403=Read actions (events or tasks) of others
|
||||
Permission2405=Create/modify/delete actions (events or tasks) of others
|
||||
Permission2500=Read documents
|
||||
Permission2501=Submit or delete documents
|
||||
Permission2515=Setup documents directories
|
||||
DictionnaryCompanyType=Company types
|
||||
DictionnaryCompanyJuridicalType=Juridical kinds of company
|
||||
DictionnaryProspectLevel=Prospect potential level
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
ErrorDuplicateTrigger=A trigger file with class nam '<b>%s</b>' is present sevaral times. Remove duplicate trigger file in directory '<b>%s</b>'.
|
||||
ErrorFailToDeleteFile=Failed to remove file '<b>%s</b>'.
|
||||
ErrorFailToCreateFile=Failed to create file '<b>%s</b>'.
|
||||
ErrorFailToRenameDir=Failed to rename directory '<b>%s</b>' into '<b>%s</b>'.
|
||||
ErrorThisContactIsAlreadyDefinedAsThisType=This contact is already defined as contact for this type.
|
||||
ErrorCashAccountAcceptsOnlyCashMoney=This bank account is a cash account, so it accepts payments of type cash only.
|
||||
ErrorFromToAccountsMustDiffers=Source and targets bank accounts must be different.
|
||||
|
||||
@ -410,6 +410,9 @@ Permission2401=Lire les actions (
|
||||
Permission2402=Creer/modifier/supprimer les actions (évènements ou tâches) liées à son compte
|
||||
Permission2403=Lire les actions (évènements ou tâches) des autres
|
||||
Permission2405=Creer/modifier/supprimer les actions (évènements ou tâches) pour les autres
|
||||
Permission2500=Consulter les documents
|
||||
Permission2501=Soumettre ou supprimer des documents
|
||||
Permission2515=Administrer les rubriques de documents
|
||||
DictionnaryCompanyType=Types de sociétés
|
||||
DictionnaryCompanyJuridicalType=Formes juridiques
|
||||
DictionnaryProspectLevel=Niveau de potentiel des prospects
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
ErrorDuplicateTrigger=Un fichier trigger de classe '<b>%s</b>' est present plusieurs fois. Supprimer le doublon du répertoire '<b>%s</b>'.
|
||||
ErrorFailToCreateFile=Echec de la création du fichier '<b>%s</b>'.
|
||||
ErrorFailToDeleteFile=Echec de l'effacement du fichier '<b>%s</b>'.
|
||||
ErrorFailToRenameDir=Echec du renommage du répertoire '<b>%s</b>' en '<b>%s</b>'.
|
||||
ErrorThisContactIsAlreadyDefinedAsThisType=Ce contact est déjà défini comme contact pour ce type.
|
||||
ErrorCashAccountAcceptsOnlyCashMoney=Ce compte bancaire est de type caisse et n'accepte que les mode de réglement de type <b>espèce</b>.
|
||||
ErrorFromToAccountsMustDiffers=Le compte source et destination doivent etre différents.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user