diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php
index af259296c37..ef20c2e96c0 100644
--- a/htdocs/adherents/index.php
+++ b/htdocs/adherents/index.php
@@ -125,34 +125,37 @@ if ($result)
//print '
';
print '';
-// 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 ' ';
- print ' ';
+ // Search contact/address
+ if (! empty($conf->adherent->enabled) && $user->rights->adherent->lire)
+ {
+ $listofsearchfields['search_member']=array('text'=>'Member');
+ }
+
+ if (count($listofsearchfields))
+ {
+ print ' ';
+ print ' ';
+ }
}
-
/*
* Statistics
*/
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index 4e99b7072fc..c967f303648 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -77,57 +77,59 @@ print load_fiche_titre($langs->trans("CommercialArea"),'','title_commercial.png'
print ' ';
-// Search proposal
-if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
- $listofsearchfields['search_proposal']=array('text'=>'Proposal');
+ // Search proposal
+ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
+ {
+ $listofsearchfields['search_proposal']=array('text'=>'Proposal');
+ }
+ // Search customer order
+ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
+ {
+ $listofsearchfields['search_customer_order']=array('text'=>'CustomerOrder');
+ }
+ // Search supplier proposal
+ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire)
+ {
+ $listofsearchfields['search_supplier_proposal']=array('text'=>'SupplierProposalShort');
+ }
+ // Search supplier order
+ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire)
+ {
+ $listofsearchfields['search_supplier_order']=array('text'=>'SupplierOrder');
+ }
+ // Search intervention
+ if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
+ {
+ $listofsearchfields['search_intervention']=array('text'=>'Intervention');
+ }
+ // Search contract
+ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
+ {
+ $listofsearchfields['search_contract']=array('text'=>'Contract');
+ }
+
+ if (count($listofsearchfields))
+ {
+ print ' ';
+ print ' ';
+ }
}
-// Search customer order
-if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
-{
- $listofsearchfields['search_customer_order']=array('text'=>'CustomerOrder');
-}
-// Search supplier proposal
-if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire)
-{
- $listofsearchfields['search_supplier_proposal']=array('text'=>'SupplierProposalShort');
-}
-// Search supplier order
-if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire)
-{
- $listofsearchfields['search_supplier_order']=array('text'=>'SupplierOrder');
-}
-// Search intervention
-if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
-{
- $listofsearchfields['search_intervention']=array('text'=>'Intervention');
-}
-// Search contract
-if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
-{
- $listofsearchfields['search_contract']=array('text'=>'Contract');
-}
-
-if (count($listofsearchfields))
-{
- print ' ';
- print ' ';
-}
-
/*
diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php
index ba8c2481411..0ea109960e7 100644
--- a/htdocs/comm/mailing/index.php
+++ b/htdocs/comm/mailing/index.php
@@ -49,19 +49,22 @@ print load_fiche_titre($langs->trans("MailingArea"));
print ' ';
-// Recherche emails
-$var=false;
-print ' \n";
+//if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+//{
+ // Recherche emails
+ $var=false;
+ print ' \n";
+//}
// Affiche stats de tous les modules de destinataires mailings
diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php
index 4b03cb48429..82d57f721da 100644
--- a/htdocs/comm/propal/index.php
+++ b/htdocs/comm/propal/index.php
@@ -59,17 +59,17 @@ print load_fiche_titre($langs->trans("ProspectionArea"));
print ' ';
-/*
- * Search form
- */
-$var=false;
-print ' \n";
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+{
+ $var=false;
+ print ' \n";
+}
/*
diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index 5731535697e..24e07b5ab07 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -62,16 +62,18 @@ print load_fiche_titre($langs->trans("OrdersArea"));
//print ' ';
print '';
-
-// Search customer orders
-$var=false;
-print ' \n";
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+{
+ // Search customer orders
+ $var=false;
+ print ' \n";
+}
/*
diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php
index add2a4cfcb1..44d9aa4d3c1 100644
--- a/htdocs/compta/index.php
+++ b/htdocs/compta/index.php
@@ -61,6 +61,8 @@ if ($user->societe_id > 0)
$socid = $user->societe_id;
}
+$max=3;
+
/*
* Actions
@@ -88,44 +90,45 @@ print load_fiche_titre($langs->trans("AccountancyTreasuryArea"),'','title_accoun
print ' ';
-$max=3;
-
-
-// Search customer invoices
-if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
- $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');
+ // 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))
+ {
+ print ' ';
+ print ' ';
+ }
}
-if (count($listofsearchfields))
-{
- print ' ';
- print ' ';
-}
/**
* Draft customers invoices
diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php
index 2a2d2d35891..b1d99c60d20 100644
--- a/htdocs/contrat/index.php
+++ b/htdocs/contrat/index.php
@@ -72,21 +72,25 @@ print load_fiche_titre($langs->trans("ContractsArea"),'','title_commercial.png')
print ' ';
-// Search contract
-if (! empty($conf->contrat->enabled))
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
- $var=false;
- print ' \n";
- print " ";
+ // Search contract
+ if (! empty($conf->contrat->enabled))
+ {
+ $var=false;
+ print ' \n";
+ print " ";
+ }
}
+
/*
* Statistics
*/
@@ -251,7 +255,7 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
$i = 0;
//$tot_ttc = 0;
- while ($i < $num && $i < 20)
+ while ($i < $num)
{
$obj = $db->fetch_object($resql);
print ' ';
diff --git a/htdocs/don/index.php b/htdocs/don/index.php
index 5e4b2966051..daf82d85bbc 100644
--- a/htdocs/don/index.php
+++ b/htdocs/don/index.php
@@ -81,30 +81,34 @@ print load_fiche_titre($langs->trans("DonationsArea"));
print '';
-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 ' ';
+ print ' ';
+ }
}
-if (count($listofsearchfields))
-{
- print ' ';
- print ' ';
-}
print ' ';
print '';
diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php
index 33aae04c5ab..e9bfa8a484c 100644
--- a/htdocs/expedition/index.php
+++ b/htdocs/expedition/index.php
@@ -47,14 +47,16 @@ print load_fiche_titre($langs->trans("SendingsArea"));
print '';
-$var=false;
-print ' \n";
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+{
+ print ' \n";
+}
/*
* Shipments to validate
diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php
index 54392795f13..f1592b1e13b 100644
--- a/htdocs/fichinter/index.php
+++ b/htdocs/fichinter/index.php
@@ -59,16 +59,18 @@ print load_fiche_titre($langs->trans("InterventionsArea"));
print ' ';
-
-// Search ficheinter
-$var=false;
-print ' \n";
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+{
+ // Search ficheinter
+ $var=false;
+ print ' \n";
+}
/*
diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php
index fe702b5838b..8ad4b9f4857 100644
--- a/htdocs/fourn/commande/index.php
+++ b/htdocs/fourn/commande/index.php
@@ -53,17 +53,17 @@ print load_fiche_titre($langs->trans("SuppliersOrdersArea"));
print ' ';
-/*
- * Search form
- */
-$var=false;
-print ' \n";
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+{
+ $var=false;
+ print ' \n";
+}
/*
diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php
index 30d0c911ba1..e8038497e2c 100644
--- a/htdocs/hrm/index.php
+++ b/htdocs/hrm/index.php
@@ -77,40 +77,42 @@ print load_fiche_titre($langs->trans("HRMArea"),'', 'title_hrm.png');
print ' ';
-
-if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
- $langs->load("holiday");
- $listofsearchfields['search_holiday']=array('text'=>'TitreRequestCP');
-}
-if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
-{
- $langs->load("trips");
- $listofsearchfields['search_deplacement']=array('text'=>'ExpenseReport');
-}
-if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire)
-{
- $langs->load("trips");
- $listofsearchfields['search_expensereport']=array('text'=>'ExpenseReport');
-}
-if (count($listofsearchfields))
-{
- print ' ';
- print ' ';
+ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
+ {
+ $langs->load("holiday");
+ $listofsearchfields['search_holiday']=array('text'=>'TitreRequestCP');
+ }
+ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
+ {
+ $langs->load("trips");
+ $listofsearchfields['search_deplacement']=array('text'=>'ExpenseReport');
+ }
+ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire)
+ {
+ $langs->load("trips");
+ $listofsearchfields['search_expensereport']=array('text'=>'ExpenseReport');
+ }
+ if (count($listofsearchfields))
+ {
+ print ' ';
+ print ' ';
+ }
}
diff --git a/htdocs/product/index.php b/htdocs/product/index.php
index 74a974804ff..84991a76db2 100644
--- a/htdocs/product/index.php
+++ b/htdocs/product/index.php
@@ -77,35 +77,35 @@ print load_fiche_titre($transAreaType,$linkback,'title_products.png');
print ' ';
-/*
- * Search Area of product/service
- */
-
-// Search contract
-if ((! empty($conf->product->enabled) || ! empty($conf->service->enabled)) && ($user->rights->produit->lire || $user->rights->service->lire))
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
- $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 ' ';
+ print ' ';
+ }
}
-if (count($listofsearchfields))
-{
- print ' ';
- print ' ';
-}
/*
* Number of products and/or services
diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php
index 5f075370df6..7349b48d1c9 100644
--- a/htdocs/product/stock/index.php
+++ b/htdocs/product/stock/index.php
@@ -48,17 +48,18 @@ print load_fiche_titre($langs->trans("StocksArea"));
print ' ';
-/*
- * Zone recherche entrepot
- */
-print ' ";
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+{
+ print ' ";
+}
+
$sql = "SELECT e.label, e.rowid, e.statut";
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot as e";
diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php
index adf6efbc95c..4586c8d52a6 100644
--- a/htdocs/projet/activity/index.php
+++ b/htdocs/projet/activity/index.php
@@ -74,33 +74,36 @@ else
print ' ';
-// 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 ' ';
+ print ' ';
+ }
}
-if (count($listofsearchfields))
-{
- print ' ';
- print ' ';
-}
-
-print ' ';
/* Affichage de la liste des projets d'aujourd'hui */
print ' ';
@@ -156,8 +159,11 @@ print "\n";
print " ";
+print ' ';
+
+
/* Affichage de la liste des projets d'hier */
-print ' ';
+print '';
print '';
print '| '.$langs->trans('ActivityOnProjectYesterday').' | ';
print ''.$langs->trans("Time").' | ';
diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php
index c91bfe1f980..f3690eee61e 100644
--- a/htdocs/projet/index.php
+++ b/htdocs/projet/index.php
@@ -98,30 +98,34 @@ else dol_print_error($db);
print '';
-// 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 ' ';
- print ' ';
+ // Search project
+ if (! empty($conf->projet->enabled) && $user->rights->projet->lire)
+ {
+ $listofsearchfields['search_project']=array('text'=>'Project');
+ }
+
+ if (count($listofsearchfields))
+ {
+ print ' ';
+ print ' ';
+ }
}
diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php
index 333ee590f2d..5fa0fd37210 100644
--- a/htdocs/societe/index.php
+++ b/htdocs/societe/index.php
@@ -57,36 +57,38 @@ print load_fiche_titre($transAreaType,$linkback,'title_companies.png');
print ' ';
-
-// Search thirdparty
-if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
{
- $listofsearchfields['search_thirdparty']=array('text'=>'ThirdParty');
-}
-// Search contact/address
-if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
-{
- $listofsearchfields['search_contact']=array('text'=>'Contact');
-}
-
-if (count($listofsearchfields))
-{
- print ' ';
- print ' ';
+ // 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');
+ }
+
+ if (count($listofsearchfields))
+ {
+ print ' ';
+ print ' ';
+ }
}
diff --git a/htdocs/supplier_proposal/index.php b/htdocs/supplier_proposal/index.php
index 9e07aaf5d96..eec34a02987 100644
--- a/htdocs/supplier_proposal/index.php
+++ b/htdocs/supplier_proposal/index.php
@@ -60,15 +60,19 @@ print ' ';
/*
* Search form
*/
-$var=false;
-print ' \n";
+
+if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo
+{
+ $var=false;
+ print ' \n";
+}
/*
| | |