Fix quick search on tasks

This commit is contained in:
Laurent Destailleur 2016-07-03 20:15:26 +02:00
parent bad758f248
commit de157d9099
3 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2015-2016 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -62,13 +62,17 @@ if (! empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJ
{
$arrayresult['searchintoprojects']=array('text'=>img_picto('','object_projectpub').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php?search_all='.urlencode($search_boxvalue));
}
if (! empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->rights->projet->lire)
{
$arrayresult['searchintotasks']=array('text'=>img_picto('','object_task').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php?search_all='.urlencode($search_boxvalue));
}
if (! empty($conf->adherent->enabled) && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire)
{
$arrayresult['searchintomember']=array('text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php?sall='.urlencode($search_boxvalue));
}
if (! empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->rights->user->user->lire)
if (! empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire)
{
$arrayresult['searchintouser']=array('text'=>img_picto('','object_user').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/user/index.php?sall='.urlencode($search_boxvalue));
}

View File

@ -744,6 +744,7 @@ SearchIntoMembers=Members
SearchIntoUsers=Users
SearchIntoProductsOrServices=Products or services
SearchIntoProjects=Projects
SearchIntoTasks=Tasks
SearchIntoCustomerInvoices=Customer invoices
SearchIntoSupplierInvoices=Supplier invoices
SearchIntoCustomerOrders=Customer orders

View File

@ -38,7 +38,11 @@ $id=GETPOST('id','int');
$search_all=GETPOST('search_all');
$search_project=GETPOST('search_project');
if (! isset($_GET['search_projectstatus']) && ! isset($_POST['search_projectstatus'])) $search_projectstatus=1;
if (! isset($_GET['search_projectstatus']) && ! isset($_POST['search_projectstatus']))
{
if ($search_all != '') $search_projectstatus=-1;
else $search_projectstatus=1;
}
else $search_projectstatus=GETPOST('search_projectstatus');
$search_project_ref=GETPOST('search_project_ref');
$search_project_title=GETPOST('search_project_title');