Add MAIN_SEARCH_FORM_ON_HOME_AREAS to disable useless search forms

This commit is contained in:
Laurent Destailleur 2017-02-21 14:17:44 +01:00
parent 7ab600781d
commit 19e60f03b9
18 changed files with 403 additions and 359 deletions

View File

@ -125,32 +125,35 @@ if ($result)
//print '<tr><td width="30%" class="notopnoleft" valign="top">'; //print '<tr><td width="30%" class="notopnoleft" valign="top">';
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
// Search contact/address
if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire)
{
$listofsearchfields['search_member']=array('text'=>'Member');
}
if (count($listofsearchfields)) if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{ {
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; // Search contact/address
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire)
print '<table class="noborder nohover centpercent">'; {
$i=0; $listofsearchfields['search_member']=array('text'=>'Member');
foreach($listofsearchfields as $key => $value) }
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;
}
print '</table>';
print '</form>';
print '<br>';
}
if (count($listofsearchfields))
{
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover centpercent">';
$i=0;
foreach($listofsearchfields as $key => $value)
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label>:</td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;
}
print '</table>';
print '</form>';
print '<br>';
}
}
/* /*

View File

@ -77,59 +77,61 @@ print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png'
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
// Search proposal if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
{ {
$listofsearchfields['search_proposal']=array('text'=>'Proposal'); // Search proposal
} if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
// Search customer order {
if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $listofsearchfields['search_proposal']=array('text'=>'Proposal');
{ }
$listofsearchfields['search_customer_order']=array('text'=>'CustomerOrder'); // Search customer order
} if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
// Search supplier proposal {
if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) $listofsearchfields['search_customer_order']=array('text'=>'CustomerOrder');
{ }
$listofsearchfields['search_supplier_proposal']=array('text'=>'SupplierProposalShort'); // Search supplier proposal
} if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire)
// Search supplier order {
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire) $listofsearchfields['search_supplier_proposal']=array('text'=>'SupplierProposalShort');
{ }
$listofsearchfields['search_supplier_order']=array('text'=>'SupplierOrder'); // Search supplier order
} if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire)
// Search intervention {
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire) $listofsearchfields['search_supplier_order']=array('text'=>'SupplierOrder');
{ }
$listofsearchfields['search_intervention']=array('text'=>'Intervention'); // Search intervention
} if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
// Search contract {
if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire) $listofsearchfields['search_intervention']=array('text'=>'Intervention');
{ }
$listofsearchfields['search_contract']=array('text'=>'Contract'); // Search contract
} if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
{
$listofsearchfields['search_contract']=array('text'=>'Contract');
}
if (count($listofsearchfields)) if (count($listofsearchfields))
{ {
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover centpercent">'; print '<table class="noborder nohover centpercent">';
$i=0; $i=0;
foreach($listofsearchfields as $key => $value) foreach($listofsearchfields as $key => $value)
{ {
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>'; print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td class="noborderbottom" rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button "></td>'; if ($i == 0) print '<td class="noborderbottom" rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button "></td>';
print '</tr>'; print '</tr>';
$i++; $i++;
} }
print '</table>'; print '</table>';
print '</form>'; print '</form>';
print '<br>'; print '<br>';
}
} }
/* /*
* Draft proposals * Draft proposals
*/ */

View File

@ -49,19 +49,22 @@ print load_fiche_titre($langs->trans("MailingArea"));
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
// Recherche emails //if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
$var=false; //{
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/mailing/list.php">'; // Recherche emails
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; $var=false;
print '<table class="noborder nohover" width="100%">'; print '<form method="post" action="'.DOL_URL_ROOT.'/comm/mailing/list.php">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAMailing").'</td></tr>'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].'><td class="nowrap">'; print '<table class="noborder nohover" width="100%">';
print $langs->trans("Ref").':</td><td><input type="text" class="flat inputsearch" name="sref"></td>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchAMailing").'</td></tr>';
print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print '<tr '.$bc[$var].'><td class="nowrap">';
print '<tr '.$bc[$var].'><td class="nowrap">'; print $langs->trans("Ref").':</td><td><input type="text" class="flat inputsearch" name="sref"></td>';
print $langs->trans("Other").':</td><td><input type="text" class="flat inputsearch" name="sall"></td>'; print '<td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '<tr '.$bc[$var].'><td class="nowrap">';
print $langs->trans("Other").':</td><td><input type="text" class="flat inputsearch" name="sall"></td>';
print "</table></form><br>\n"; print "</table></form><br>\n";
//}
// Affiche stats de tous les modules de destinataires mailings // Affiche stats de tous les modules de destinataires mailings

View File

@ -59,17 +59,17 @@ print load_fiche_titre($langs->trans("ProspectionArea"));
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
/* if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
* Search form {
*/ $var=false;
$var=false; print '<form method="post" action="'.DOL_URL_ROOT.'/comm/propal/list.php">';
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/propal/list.php">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<table class="noborder nohover" width="100%">';
print '<table class="noborder nohover" width="100%">'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[$var].'><td>';
print '<tr '.$bc[$var].'><td>'; print $langs->trans("Proposal").':</td><td><input type="text" class="flat" name="sall" size=18></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print $langs->trans("Proposal").':</td><td><input type="text" class="flat" name="sall" size=18></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print "</table></form><br>\n";
print "</table></form><br>\n"; }
/* /*

View File

@ -62,16 +62,18 @@ print load_fiche_titre($langs->trans("OrdersArea"));
//print '<tr><td valign="top" width="30%" class="notopnoleft">'; //print '<tr><td valign="top" width="30%" class="notopnoleft">';
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
// Search customer orders {
$var=false; // Search customer orders
print '<form method="post" action="'.DOL_URL_ROOT.'/commande/list.php">'; $var=false;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<form method="post" action="'.DOL_URL_ROOT.'/commande/list.php">';
print '<table class="noborder nohover" width="100%">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<table class="noborder nohover" width="100%">';
print '<tr '.$bc[$var].'><td>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print $langs->trans("CustomerOrder").':</td><td><input type="text" class="flat" name="sall" size=18></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print '<tr '.$bc[$var].'><td>';
print "</table></form><br>\n"; print $langs->trans("CustomerOrder").':</td><td><input type="text" class="flat" name="sall" size=18></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print "</table></form><br>\n";
}
/* /*

View File

@ -61,6 +61,8 @@ if ($user->societe_id > 0)
$socid = $user->societe_id; $socid = $user->societe_id;
} }
$max=3;
/* /*
* Actions * Actions
@ -88,44 +90,45 @@ print load_fiche_titre($langs->trans("AccountancyTreasuryArea"),'','title_accoun
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
$max=3; if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
// Search customer invoices
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
{
$listofsearchfields['search_invoice']=array('text'=>'CustomerInvoice');
}
// Search supplier invoices
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire)
{
$listofsearchfields['search_supplier_invoice']=array('text'=>'SupplierInvoice');
}
if (! empty($conf->don->enabled) && $user->rights->don->lire)
{
$langs->load("donations");
$listofsearchfields['search_donation']=array('text'=>'Donation');
}
if (count($listofsearchfields))
// Search customer invoices {
if (! empty($conf->facture->enabled) && $user->rights->facture->lire) print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
{ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
$listofsearchfields['search_invoice']=array('text'=>'CustomerInvoice'); print '<table class="noborder nohover centpercent">';
} $i=0;
// Search supplier invoices foreach($listofsearchfields as $key => $value)
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) {
{ if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
$listofsearchfields['search_supplier_invoice']=array('text'=>'SupplierInvoice'); print '<tr '.$bc[false].'>';
} print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'"></td>';
if (! empty($conf->don->enabled) && $user->rights->don->lire) if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
{ print '</tr>';
$langs->load("donations"); $i++;
$listofsearchfields['search_donation']=array('text'=>'Donation'); }
print '</table>';
print '</form>';
print '<br>';
}
} }
if (count($listofsearchfields))
{
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover centpercent">';
$i=0;
foreach($listofsearchfields as $key => $value)
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;
}
print '</table>';
print '</form>';
print '<br>';
}
/** /**
* Draft customers invoices * Draft customers invoices

View File

@ -72,21 +72,25 @@ print load_fiche_titre($langs->trans("ContractsArea"),'','title_commercial.png')
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
// Search contract if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
if (! empty($conf->contrat->enabled))
{ {
$var=false; // Search contract
print '<form method="post" action="'.DOL_URL_ROOT.'/contrat/list.php">'; if (! empty($conf->contrat->enabled))
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; {
print '<table class="noborder nohover" width="100%">'; $var=false;
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<form method="post" action="'.DOL_URL_ROOT.'/contrat/list.php">';
print '<tr '.$bc[$var].'>'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<td class="nowrap">'.$langs->trans("Contract").':</td><td><input type="text" class="flat" name="sall" size="18"></td>'; print '<table class="noborder nohover" width="100%">';
print '<td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print "</table></form>\n"; print '<tr '.$bc[$var].'>';
print "<br>"; print '<td class="nowrap">'.$langs->trans("Contract").':</td><td><input type="text" class="flat" name="sall" size="18"></td>';
print '<td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print "</table></form>\n";
print "<br>";
}
} }
/* /*
* Statistics * Statistics
*/ */
@ -251,7 +255,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
$i = 0; $i = 0;
//$tot_ttc = 0; //$tot_ttc = 0;
while ($i < $num && $i < 20) while ($i < $num)
{ {
$obj = $db->fetch_object($resql); $obj = $db->fetch_object($resql);
print '<tr '.$bc[$var].'><td class="nowrap">'; print '<tr '.$bc[$var].'><td class="nowrap">';

View File

@ -81,30 +81,34 @@ print load_fiche_titre($langs->trans("DonationsArea"));
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
if (! empty($conf->don->enabled) && $user->rights->don->lire) if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{ {
$listofsearchfields['search_donation']=array('text'=>'Donation'); if (! empty($conf->don->enabled) && $user->rights->don->lire)
{
$listofsearchfields['search_donation']=array('text'=>'Donation');
}
if (count($listofsearchfields))
{
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover centpercent">';
$i=0;
foreach($listofsearchfields as $key => $value)
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;
}
print '</table>';
print '</form>';
print '<br>';
}
} }
if (count($listofsearchfields))
{
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover centpercent">';
$i=0;
foreach($listofsearchfields as $key => $value)
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;
}
print '</table>';
print '</form>';
print '<br>';
}
print '<table class="noborder nohover" width="100%">'; print '<table class="noborder nohover" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';

View File

@ -47,14 +47,16 @@ print load_fiche_titre($langs->trans("SendingsArea"));
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
$var=false; if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
print '<form method="post" action="list.php">'; {
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<form method="post" action="list.php">';
print '<table class="noborder nohover" width="100%">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<table class="noborder nohover" width="100%">';
print '<tr '.$bc[$var].'><td>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print $langs->trans("Shipment").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print '<tr '.$bc[$var].'><td>';
print "</table></form><br>\n"; print $langs->trans("Shipment").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print "</table></form><br>\n";
}
/* /*
* Shipments to validate * Shipments to validate

View File

@ -59,16 +59,18 @@ print load_fiche_titre($langs->trans("InterventionsArea"));
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
// Search ficheinter {
$var=false; // Search ficheinter
print '<table class="noborder nohover" width="100%">'; $var=false;
print '<form method="post" action="'.DOL_URL_ROOT.'/fichinter/list.php">'; print '<table class="noborder nohover" width="100%">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<form method="post" action="'.DOL_URL_ROOT.'/fichinter/list.php">';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<tr '.$bc[$var].'><td>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print $langs->trans("Intervention").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print '<tr '.$bc[$var].'><td>';
print "</form></table><br>\n"; print $langs->trans("Intervention").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print "</form></table><br>\n";
}
/* /*

View File

@ -53,17 +53,17 @@ print load_fiche_titre($langs->trans("SuppliersOrdersArea"));
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
/* if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
* Search form {
*/ $var=false;
$var=false; print '<form method="post" action="list.php">';
print '<form method="post" action="list.php">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<table class="noborder nohover" width="100%">';
print '<table class="noborder nohover" width="100%">'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<tr '.$bc[$var].'><td>';
print '<tr '.$bc[$var].'><td>'; print $langs->trans("SupplierOrder").':</td><td><input type="text" class="flat" name="search_all" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print $langs->trans("SupplierOrder").':</td><td><input type="text" class="flat" name="search_all" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print "</table></form><br>\n";
print "</table></form><br>\n"; }
/* /*

View File

@ -77,40 +77,42 @@ print load_fiche_titre($langs->trans("HRMArea"),'', 'title_hrm.png');
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
{ {
$langs->load("holiday"); if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
$listofsearchfields['search_holiday']=array('text'=>'TitreRequestCP'); {
} $langs->load("holiday");
if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) $listofsearchfields['search_holiday']=array('text'=>'TitreRequestCP');
{ }
$langs->load("trips"); if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
$listofsearchfields['search_deplacement']=array('text'=>'ExpenseReport'); {
} $langs->load("trips");
if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) $listofsearchfields['search_deplacement']=array('text'=>'ExpenseReport');
{ }
$langs->load("trips"); if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire)
$listofsearchfields['search_expensereport']=array('text'=>'ExpenseReport'); {
} $langs->load("trips");
if (count($listofsearchfields)) $listofsearchfields['search_expensereport']=array('text'=>'ExpenseReport');
{ }
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; if (count($listofsearchfields))
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; {
print '<table class="noborder nohover centpercent">'; print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
$i=0; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
foreach($listofsearchfields as $key => $value) print '<table class="noborder nohover centpercent">';
{ $i=0;
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; foreach($listofsearchfields as $key => $value)
print '<tr '.$bc[false].'>'; {
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; print '<tr '.$bc[false].'>';
print '</tr>'; print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
$i++; if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
} print '</tr>';
print '</table>'; $i++;
print '</form>'; }
print '<br>'; print '</table>';
print '</form>';
print '<br>';
}
} }

View File

@ -77,35 +77,35 @@ print load_fiche_titre($transAreaType,$linkback,'title_products.png');
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
/* if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
* Search Area of product/service
*/
// Search contract
if ((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire))
{ {
$listofsearchfields['search_product']=array('text'=>'ProductOrService'); // Search contract
if ((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire))
{
$listofsearchfields['search_product']=array('text'=>'ProductOrService');
}
if (count($listofsearchfields))
{
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover centpercent">';
$i=0;
foreach($listofsearchfields as $key => $value)
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;
}
print '</table>';
print '</form>';
print '<br>';
}
} }
if (count($listofsearchfields))
{
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover centpercent">';
$i=0;
foreach($listofsearchfields as $key => $value)
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;
}
print '</table>';
print '</form>';
print '<br>';
}
/* /*
* Number of products and/or services * Number of products and/or services

View File

@ -48,17 +48,18 @@ print load_fiche_titre($langs->trans("StocksArea"));
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
/* if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
* Zone recherche entrepot {
*/ print '<form method="post" action="'.DOL_URL_ROOT.'/product/stock/list.php">';
print '<form method="post" action="'.DOL_URL_ROOT.'/product/stock/list.php">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<table class="noborder nohover" width="100%">';
print '<table class="noborder nohover" width="100%">'; print "<tr class=\"liste_titre\">";
print "<tr class=\"liste_titre\">"; print '<td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<td colspan="3">'.$langs->trans("Search").'</td></tr>'; print "<tr ".$bc[false]."><td>";
print "<tr ".$bc[false]."><td>"; print $langs->trans("Warehouse").':</td><td><input class="flat" type="text" size="18" name="sall"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print $langs->trans("Warehouse").':</td><td><input class="flat" type="text" size="18" name="sall"></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print "</table></form><br>";
print "</table></form><br>"; }
$sql = "SELECT e.label, e.rowid, e.statut"; $sql = "SELECT e.label, e.rowid, e.statut";
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e"; $sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e";

View File

@ -74,33 +74,36 @@ else
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
// Search project
if (! empty($conf->projet->enabled) && $user->rights->projet->lire) if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{ {
$listofsearchfields['search_task']=array('text'=>'Task'); // Search project
if (! empty($conf->projet->enabled) && $user->rights->projet->lire)
{
$listofsearchfields['search_task']=array('text'=>'Task');
}
if (count($listofsearchfields))
{
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover centpercent">';
$i=0;
foreach($listofsearchfields as $key => $value)
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;
}
print '</table>';
print '</form>';
print '<br>';
}
} }
if (count($listofsearchfields))
{
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<table class="noborder nohover centpercent">';
$i=0;
foreach($listofsearchfields as $key => $value)
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;
}
print '</table>';
print '</form>';
print '<br>';
}
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
/* Affichage de la liste des projets d'aujourd'hui */ /* Affichage de la liste des projets d'aujourd'hui */
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
@ -156,8 +159,11 @@ print "</tr>\n";
print "</table>"; print "</table>";
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
/* Affichage de la liste des projets d'hier */ /* Affichage de la liste des projets d'hier */
print '<br><table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans('ActivityOnProjectYesterday').'</td>'; print '<td>'.$langs->trans('ActivityOnProjectYesterday').'</td>';
print '<td align="right">'.$langs->trans("Time").'</td>'; print '<td align="right">'.$langs->trans("Time").'</td>';

View File

@ -98,30 +98,34 @@ else dol_print_error($db);
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
// Search project
if (! empty($conf->projet->enabled) && $user->rights->projet->lire)
{
$listofsearchfields['search_project']=array('text'=>'Project');
}
if (count($listofsearchfields)) if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{ {
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; // Search project
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; if (! empty($conf->projet->enabled) && $user->rights->projet->lire)
print '<table class="noborder nohover centpercent">'; {
$i=0; $listofsearchfields['search_project']=array('text'=>'Project');
foreach($listofsearchfields as $key => $value) }
{
if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; if (count($listofsearchfields))
print '<tr '.$bc[false].'>'; {
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>'; print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '</tr>'; print '<table class="noborder nohover centpercent">';
$i++; $i=0;
} foreach($listofsearchfields as $key => $value)
print '</table>'; {
print '</form>'; if ($i == 0) print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print '<br>'; print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;
}
print '</table>';
print '</form>';
print '<br>';
}
} }

View File

@ -57,36 +57,38 @@ print load_fiche_titre($transAreaType,$linkback,'title_companies.png');
print '<div class="fichecenter"><div class="fichethirdleft">'; print '<div class="fichecenter"><div class="fichethirdleft">';
if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
// Search thirdparty
if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
{
$listofsearchfields['search_thirdparty']=array('text'=>'ThirdParty');
}
// Search contact/address
if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
{
$listofsearchfields['search_contact']=array('text'=>'Contact');
}
// Search thirdparty if (count($listofsearchfields))
if (! empty($conf->societe->enabled) && $user->rights->societe->lire) {
{ print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">';
$listofsearchfields['search_thirdparty']=array('text'=>'ThirdParty'); print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
} print '<table class="noborder nohover centpercent">';
// Search contact/address $i=0;
if (! empty($conf->societe->enabled) && $user->rights->societe->lire) foreach($listofsearchfields as $key => $value)
{ {
$listofsearchfields['search_contact']=array('text'=>'Contact'); if ($i == 0) print '<tr class="liste_titre"><th colspan="3">'.$langs->trans("Search").'</th></tr>';
} print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if (count($listofsearchfields)) if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
{ print '</tr>';
print '<form method="post" action="'.DOL_URL_ROOT.'/core/search.php">'; $i++;
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; }
print '<table class="noborder nohover centpercent">'; print '</table>';
$i=0; print '</form>';
foreach($listofsearchfields as $key => $value) print '<br>';
{ }
if ($i == 0) print '<tr class="liste_titre"><th colspan="3">'.$langs->trans("Search").'</th></tr>';
print '<tr '.$bc[false].'>';
print '<td class="nowrap"><label for="'.$key.'">'.$langs->trans($value["text"]).'</label></td><td><input type="text" class="flat inputsearch" name="'.$key.'" id="'.$key.'" size="18"></td>';
if ($i == 0) print '<td rowspan="'.count($listofsearchfields).'"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td>';
print '</tr>';
$i++;
}
print '</table>';
print '</form>';
print '<br>';
} }

View File

@ -60,15 +60,19 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
/* /*
* Search form * Search form
*/ */
$var=false;
print '<form method="post" action="'.DOL_URL_ROOT.'/supplier_proposal/list.php">'; if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; {
print '<table class="noborder nohover" width="100%">'; $var=false;
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>'; print '<form method="post" action="'.DOL_URL_ROOT.'/supplier_proposal/list.php">';
print '<tr '.$bc[$var].'><td>'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print $langs->trans("SupplierProposal").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print '<table class="noborder nohover" width="100%">';
print '</tr>'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("Search").'</td></tr>';
print "</table></form><br>\n"; print '<tr '.$bc[$var].'><td>';
print $langs->trans("SupplierProposal").':</td><td><input type="text" class="flat" name="sall" size="18"></td><td><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>';
print '</tr>';
print "</table></form><br>\n";
}
/* /*