Merge duplicate menus/page on projects
This commit is contained in:
parent
fc5d96b84b
commit
ec7d48931e
@ -1226,29 +1226,32 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$langs->load("projects");
|
||||
|
||||
// Project affected to user
|
||||
$newmenu->add("/projet/index.php?leftmenu=myprojects&mode=mine", $langs->trans("MyProjects"), 0, $user->rights->projet->lire, '', $mainmenu, 'myprojects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=myprojects&action=create&mode=mine", $langs->trans("NewProject"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/list.php?leftmenu=myprojects&mode=mine&search_status=99", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects&search_project_user=".GETPOST('search_project_user'), $langs->trans("Projects"), 0, $user->rights->projet->lire, '', $mainmenu, 'projects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=projects&action=create&search_project_user=".GETPOST('search_project_user'), $langs->trans("NewProject"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/list.php?leftmenu=projects&search_project_user=".GETPOST('search_project_user')."&search_status=99", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
|
||||
// All project i have permission on
|
||||
/*
|
||||
$newmenu->add("/projet/index.php?leftmenu=projects", $langs->trans("Projects"), 0, $user->rights->projet->lire && $user->rights->projet->lire, '', $mainmenu, 'projects');
|
||||
$newmenu->add("/projet/card.php?leftmenu=projects&action=create", $langs->trans("NewProject"), 1, $user->rights->projet->creer && $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/list.php?leftmenu=projects&search_status=99", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
*/
|
||||
$newmenu->add("/projet/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
|
||||
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
// Project affected to user
|
||||
$newmenu->add("/projet/activity/index.php?leftmenu=mytasks&mode=mine", $langs->trans("MyActivities"), 0, $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/tasks.php?leftmenu=mytasks&action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/tasks/list.php?leftmenu=mytasks&mode=mine", $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/activity/perweek.php?leftmenu=mytasks&mode=mine", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/activity/index.php?leftmenu=tasks&search_project_user=".GETPOST('search_project_user'), $langs->trans("Activities"), 0, $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/tasks/list.php?leftmenu=tasks&search_project_user=".GETPOST('search_project_user'), $langs->trans("List"), 1, $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks&search_project_user=".GETPOST('search_project_user'), $langs->trans("NewTimeSpent"), 1, $user->rights->projet->lire);
|
||||
|
||||
// All project i have permission on
|
||||
$newmenu->add("/projet/activity/index.php", $langs->trans("Activities"), 0, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
/*$newmenu->add("/projet/activity/index.php", $langs->trans("Activities"), 0, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/tasks.php?action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer && $user->rights->projet->creer);
|
||||
$newmenu->add("/projet/tasks/list.php", $langs->trans("List"), 1, $user->rights->projet->lire && $user->rights->projet->lire);
|
||||
$newmenu->add("/projet/activity/perweek.php", $langs->trans("NewTimeSpent"), 1, $user->rights->projet->creer && $user->rights->projet->lire);
|
||||
*/
|
||||
}
|
||||
|
||||
// Categories
|
||||
|
||||
@ -9,6 +9,9 @@ ProjectsArea=Projects Area
|
||||
ProjectStatus=Project status
|
||||
SharedProject=Everybody
|
||||
PrivateProject=Project contacts
|
||||
ProjectsImContactFor=Projects I'm explicitely a contact of
|
||||
AllAllowedProjects=All project I can read (mine + public)
|
||||
AllProjects=All projects
|
||||
MyProjectsDesc=This view is limited to projects you are a contact for (whatever is the type).
|
||||
ProjectsPublicDesc=This view presents all projects you are allowed to read.
|
||||
TasksOnProjectsPublicDesc=This view presents all tasks on projects you are allowed to read.
|
||||
@ -23,6 +26,7 @@ TasksDesc=This view presents all projects and tasks (your user permissions grant
|
||||
AllTaskVisibleButEditIfYouAreAssigned=All tasks for such project are visible, but you can enter time only for task assigned to you. Assign task to yourself if you need to enter time on it.
|
||||
OnlyYourTaskAreVisible=Only tasks assigned to you are visible. Assign task to yourself if it is not visible and you need to enter time on it.
|
||||
ImportDatasetTasks=Tasks of projects
|
||||
ProjectCategories=Project tags/categories
|
||||
NewProject=New project
|
||||
AddProject=Create project
|
||||
DeleteAProject=Delete a project
|
||||
|
||||
@ -58,11 +58,27 @@ $taskstatic=new Task($db);
|
||||
$tasktmp=new Task($db);
|
||||
|
||||
$title=$langs->trans("Activities");
|
||||
if ($mine) $title=$langs->trans("MyActivities");
|
||||
//if ($mine) $title=$langs->trans("MyActivities");
|
||||
|
||||
llxHeader("",$title);
|
||||
|
||||
print load_fiche_titre($title, '', 'title_project');
|
||||
|
||||
// Title for combo list see all projects
|
||||
$titleall=$langs->trans("AllAllowedProjects");
|
||||
if (! empty($user->rights->projet->all->lire) && ! $socid) $titleall=$langs->trans("AllProjects");
|
||||
else $titleall=$langs->trans("AllAllowedProjects").'<br><br>';
|
||||
|
||||
|
||||
$morehtml='';
|
||||
$morehtml.='<form name="projectform">';
|
||||
$morehtml.='<SELECT name="mode">';
|
||||
$morehtml.='<option name="all" value="all"'.($mine?'':' selected').'>'.$titleall.'</option>';
|
||||
$morehtml.='<option name="mine" value="mine"'.($mine?' selected':'').'>'.$langs->trans("ProjectsImContactFor").'</option>';
|
||||
$morehtml.='</SELECT>';
|
||||
$morehtml.='<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'">';
|
||||
|
||||
print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'title_project.png', 0, $morehtml);
|
||||
//print load_fiche_titre($title, '', 'title_project');
|
||||
|
||||
if ($mine) print $langs->trans("MyTasksDesc").'<br><br>';
|
||||
else
|
||||
|
||||
@ -345,7 +345,7 @@ if ($mine) print $langs->trans("MyTasksDesc").($onlyopenedproject?' '.$langs->tr
|
||||
else
|
||||
{
|
||||
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").($onlyopenedproject?' '.$langs->trans("OnlyOpenedProject"):'').'<br>';
|
||||
else print $langs->trans("ProjectsPublicTaskDesc").($onlyopenedproject?' '.$langs->trans("AlsoOnlyOpenedProject"):'').'<br>';
|
||||
else print $langs->trans("ProjectsPublicTaskDesc").($onlyopenedproject?' '.$langs->trans("OnlyOpenedProject"):'').'<br>';
|
||||
}
|
||||
if ($mine)
|
||||
{
|
||||
|
||||
@ -341,7 +341,7 @@ if ($mine) print $langs->trans("MyTasksDesc").($onlyopenedproject?' '.$langs->tr
|
||||
else
|
||||
{
|
||||
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").($onlyopenedproject?' '.$langs->trans("OnlyOpenedProject"):'').'<br>';
|
||||
else print $langs->trans("ProjectsPublicTaskDesc").($onlyopenedproject?' '.$langs->trans("AlsoOnlyOpenedProject"):'').'<br>';
|
||||
else print $langs->trans("ProjectsPublicTaskDesc").($onlyopenedproject?' '.$langs->trans("OnlyOpenedProject"):'').'<br>';
|
||||
}
|
||||
if ($mine)
|
||||
{
|
||||
|
||||
@ -34,6 +34,7 @@ $langs->load("projects");
|
||||
$langs->load("companies");
|
||||
|
||||
$mine = GETPOST('mode')=='mine' ? 1 : 0;
|
||||
$search_project_user = GETPOST('search_project_user','int');
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
@ -59,10 +60,25 @@ $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,($mine?$min
|
||||
|
||||
llxHeader("",$langs->trans("Projects"),"EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos");
|
||||
|
||||
$text=$langs->trans("ProjectsArea");
|
||||
if ($mine) $text=$langs->trans("MyProjectsArea");
|
||||
$title=$langs->trans("ProjectsArea");
|
||||
//if ($mine) $title=$langs->trans("MyProjectsArea");
|
||||
|
||||
print load_fiche_titre($text,'','title_project.png');
|
||||
|
||||
// Title for combo list see all projects
|
||||
$titleall=$langs->trans("AllAllowedProjects");
|
||||
if (! empty($user->rights->projet->all->lire) && ! $socid) $titleall=$langs->trans("AllProjects");
|
||||
else $titleall=$langs->trans("AllAllowedProjects").'<br><br>';
|
||||
|
||||
|
||||
$morehtml='';
|
||||
$morehtml.='<form name="projectform">';
|
||||
$morehtml.='<SELECT name="search_project_user">';
|
||||
$morehtml.='<option name="all" value="0"'.($mine?'':' selected').'>'.$titleall.'</option>';
|
||||
$morehtml.='<option name="mine" value="'.$user->id.'"'.(($search_project_user == $user->id)?' selected':'').'>'.$langs->trans("ProjectsImContactFor").'</option>';
|
||||
$morehtml.='</SELECT>';
|
||||
$morehtml.='<input type="submit" class="button" name="refresh" value="'.$langs->trans("Refresh").'">';
|
||||
|
||||
print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'title_project.png', 0, $morehtml);
|
||||
|
||||
// Show description of content
|
||||
if ($mine) print $langs->trans("MyProjectsDesc").'<br><br>';
|
||||
|
||||
@ -75,12 +75,12 @@ $search_opp_percent=GETPOST("search_opp_percent",'alpha');
|
||||
$search_opp_amount=GETPOST("search_opp_amount",'alpha');
|
||||
$search_budget_amount=GETPOST("search_budget_amount",'alpha');
|
||||
$search_public=GETPOST("search_public",'int');
|
||||
$search_user=GETPOST('search_user','int');
|
||||
$search_project_user=GETPOST('search_project_user','int');
|
||||
$search_sale=GETPOST('search_sale','int');
|
||||
$optioncss = GETPOST('optioncss','alpha');
|
||||
|
||||
$mine = $_REQUEST['mode']=='mine' ? 1 : 0;
|
||||
if ($mine) { $search_user = $user->id; $mine=0; }
|
||||
if ($mine) { $search_project_user = $user->id; $mine=0; }
|
||||
|
||||
$sday = GETPOST('sday','int');
|
||||
$smonth = GETPOST('smonth','int');
|
||||
@ -170,7 +170,7 @@ if (empty($reshook))
|
||||
$search_budget_amount='';
|
||||
$search_public="";
|
||||
$search_sale="";
|
||||
$search_user='';
|
||||
$search_project_user='';
|
||||
$sday="";
|
||||
$smonth="";
|
||||
$syear="";
|
||||
@ -193,7 +193,8 @@ $formother = new FormOther($db);
|
||||
$formproject = new FormProjets($db);
|
||||
|
||||
$title=$langs->trans("Projects");
|
||||
if ($search_user == $user->id) $title=$langs->trans("MyProjects");
|
||||
//if ($search_project_user == $user->id) $title=$langs->trans("MyProjects");
|
||||
|
||||
|
||||
// Get list of project id allowed to user (in a string list separated by coma)
|
||||
if (! $user->rights->projet->all->lire) $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user,0,1,$socid);
|
||||
@ -238,7 +239,7 @@ if (! empty($search_categ)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_proje
|
||||
// For external user, no check is done on company permission because readability is managed by public status of project and assignement.
|
||||
//if ($search_sale > 0 || (! $user->rights->societe->client->voir && ! $socid)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid";
|
||||
if ($search_sale > 0) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid";
|
||||
if ($search_user > 0)
|
||||
if ($search_project_user > 0)
|
||||
{
|
||||
$sql.=", ".MAIN_DB_PREFIX."element_contact as ecp";
|
||||
}
|
||||
@ -296,7 +297,7 @@ if ($search_public!='') $sql .= " AND p.public = ".$db->escape($search_public);
|
||||
if ($search_sale > 0) $sql.= " AND sc.fk_user = " .$search_sale;
|
||||
// For external user, no check is done on company permission because readability is managed by public status of project and assignement.
|
||||
//if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND ((s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id.") OR (s.rowid IS NULL))";
|
||||
if ($search_user > 0) $sql.= " AND ecp.fk_c_type_contact IN (".join(',',array_keys($listofprojectcontacttype)).") AND ecp.element_id = p.rowid AND ecp.fk_socpeople = ".$search_user;
|
||||
if ($search_project_user > 0) $sql.= " AND ecp.fk_c_type_contact IN (".join(',',array_keys($listofprojectcontacttype)).") AND ecp.element_id = p.rowid AND ecp.fk_socpeople = ".$search_project_user;
|
||||
if ($search_opp_amount != '') $sql .= natural_search('p.opp_amount', $search_opp_amount, 1);
|
||||
if ($search_budget_amount != '') $sql .= natural_search('p.budget_amount', $search_budget_amount, 1);
|
||||
// Add where from extra fields
|
||||
@ -368,7 +369,7 @@ if ($search_status >= 0) $param.='&search_status='.$search_status;
|
||||
if ((is_numeric($search_opp_status) && $search_opp_status >= 0) || in_array($search_opp_status, array('all','openedopp','none'))) $param.='&search_opp_status='.urlencode($search_opp_status);
|
||||
if ((is_numeric($search_opp_percent) && $search_opp_percent >= 0) || in_array($search_opp_percent, array('all','openedopp','none'))) $param.='&search_opp_percent='.urlencode($search_opp_percent);
|
||||
if ($search_public != '') $param.='&search_public='.$search_public;
|
||||
if ($search_user > 0) $param.='&search_user='.$search_user;
|
||||
if ($search_project_user != '') $param.='&search_project_user='.$search_project_user;
|
||||
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
|
||||
if ($search_opp_amount != '') $param.='&search_opp_amount='.$search_opp_amount;
|
||||
if ($search_budget_amount != '') $param.='&search_budget_amount='.$search_budget_amount;
|
||||
@ -381,9 +382,6 @@ foreach ($search_array_options as $key => $val)
|
||||
if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
|
||||
}
|
||||
|
||||
$text=$langs->trans("Projects");
|
||||
if ($search_user == $user->id) $text=$langs->trans('MyProjects');
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -394,10 +392,10 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print_barre_liste($text, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $nbtotalofrecords, 'title_project', 0, '', '', $limit);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $nbtotalofrecords, 'title_project', 0, '', '', $limit);
|
||||
|
||||
// Show description of content
|
||||
if ($search_user == $user->id) print $langs->trans("MyProjectsDesc").'<br><br>';
|
||||
if ($search_project_user == $user->id) print $langs->trans("MyProjectsDesc").'<br><br>';
|
||||
else
|
||||
{
|
||||
if ($user->rights->projet->all->lire && ! $socid) print $langs->trans("ProjectsDesc").'<br><br>';
|
||||
@ -417,7 +415,7 @@ if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$langs->trans('ProjectCategories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories('project',$search_categ,'search_categ',1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
@ -427,7 +425,7 @@ $moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('ProjectsWithThisUserAsContact'). ': ';
|
||||
$includeonly='';
|
||||
if (empty($user->rights->user->user->lire)) $includeonly=array($user->id);
|
||||
$moreforfilter.=$form->select_dolusers($search_user, 'search_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
$moreforfilter.=$form->select_dolusers($search_project_user?$search_project_user:'', 'search_project_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
$moreforfilter.='</div>';
|
||||
|
||||
// If the user can view thirdparties other than his'
|
||||
|
||||
@ -37,6 +37,7 @@ $langs->load('companies');
|
||||
$id=GETPOST('id','int');
|
||||
|
||||
$search_all=GETPOST('search_all');
|
||||
$search_categ=GETPOST("search_categ",'alpha');
|
||||
$search_project=GETPOST('search_project');
|
||||
if (! isset($_GET['search_projectstatus']) && ! isset($_POST['search_projectstatus']))
|
||||
{
|
||||
@ -142,9 +143,10 @@ if (empty($reshook))
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||
|
||||
// Purge search criteria
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
|
||||
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All tests are required to be compatible with all browsers
|
||||
{
|
||||
$search_all="";
|
||||
$search_categ="";
|
||||
$search_project="";
|
||||
$search_projectstatus=-1;
|
||||
$search_project_ref="";
|
||||
@ -184,7 +186,7 @@ if ($search_project_user > 0) $puser->fetch($search_project_user);
|
||||
if ($search_task_user > 0) $tuser->fetch($search_task_user);
|
||||
|
||||
$title=$langs->trans("Activities");
|
||||
if ($search_task_user == $user->id) $title=$langs->trans("MyActivities");
|
||||
//if ($search_task_user == $user->id) $title=$langs->trans("MyActivities");
|
||||
|
||||
if ($id)
|
||||
{
|
||||
@ -232,6 +234,8 @@ $sql = "SELECT ".$distinct." p.rowid as projectid, p.ref as projectref, p.title
|
||||
$sql.= ", s.nom as name, s.rowid as socid";
|
||||
$sql.= ", t.datec as date_creation, t.dateo as date_start, t.datee as date_end, t.tms as date_update";
|
||||
$sql.= ", t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress, t.fk_statut";
|
||||
// We'll need these fields in order to filter by categ
|
||||
if ($search_categ) $sql .= ", cs.fk_categorie, cs.fk_project";
|
||||
// Add fields from extrafields
|
||||
foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key.' as options_'.$key : '');
|
||||
// Add fields from hooks
|
||||
@ -239,8 +243,10 @@ $parameters=array();
|
||||
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid,";
|
||||
$sql.= " ".MAIN_DB_PREFIX."projet_task as t";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid";
|
||||
// We'll need this table joined to the select in order to filter by categ
|
||||
if (! empty($search_categ)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_project as cs ON p.rowid = cs.fk_project"; // We'll need this table joined to the select in order to filter by categ
|
||||
$sql.= ", ".MAIN_DB_PREFIX."projet_task as t";
|
||||
if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||
if ($search_project_user > 0) $sql.=", ".MAIN_DB_PREFIX."element_contact as ecp";
|
||||
if ($search_task_user > 0) $sql.=", ".MAIN_DB_PREFIX."element_contact as ect";
|
||||
@ -249,6 +255,8 @@ $sql.= " AND p.entity IN (".getEntity('project',1).')';
|
||||
if (! $user->rights->projet->all->lire) $sql.=" AND p.rowid IN (".($projectsListId?$projectsListId:'0').")"; // public and assigned to projects, or restricted to company for external users
|
||||
// No need to check company, as filtering of projects must be done by getProjectsAuthorizedForUser
|
||||
if ($socid) $sql.= " AND (p.fk_soc IS NULL OR p.fk_soc = 0 OR p.fk_soc = ".$socid.")";
|
||||
if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$db->escape($search_categ);
|
||||
if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL";
|
||||
if ($search_project_ref) $sql .= natural_search('p.ref', $search_project_ref);
|
||||
if ($search_project_title) $sql .= natural_search('p.title', $search_project_title);
|
||||
if ($search_task_ref) $sql .= natural_search('t.ref', $search_task_ref);
|
||||
@ -359,7 +367,7 @@ if ($search_societe != '') $param.='&search_societe='.$search_societe;
|
||||
if ($search_projectstatus != '') $param.='&search_projectstatus='.$search_projectstatus;
|
||||
if ((is_numeric($search_opp_status) && $search_opp_status >= 0) || in_array($search_opp_status, array('all','none'))) $param.='&search_opp_status='.urlencode($search_opp_status);
|
||||
if ($search_public != '') $param.='&search_public='.$search_public;
|
||||
if ($search_project_user > 0) $param.='&search_project_user='.$search_project_user;
|
||||
if ($search_project_user != '') $param.='&search_project_user='.$search_project_user;
|
||||
if ($search_task_user > 0) $param.='&search_task_user='.$search_task_user;
|
||||
if ($optioncss != '') $param.='&optioncss='.$optioncss;
|
||||
// Add $param from extra fields
|
||||
@ -395,12 +403,24 @@ if ($search_all)
|
||||
print $langs->trans("FilterOnInto", $search_all) . join(', ',$fieldstosearchall);
|
||||
}
|
||||
|
||||
$morehtmlfilter = '';
|
||||
|
||||
// Filter on categories
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('ProjectCategories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories('project',$search_categ,'search_categ',1);
|
||||
$moreforfilter.='</div>';
|
||||
}
|
||||
|
||||
// If the user can view users
|
||||
$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.=$langs->trans('ProjectsWithThisUserAsContact'). ' ';
|
||||
$includeonly='';
|
||||
if (empty($user->rights->user->user->lire)) $includeonly=array($user->id);
|
||||
$moreforfilter.=$form->select_dolusers($search_project_user, 'search_project_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
$moreforfilter.=$form->select_dolusers($search_project_user?$search_project_user:'', 'search_project_user', 1, '', 0, $includeonly, '', 0, 0, 0, '', 0, '', 'maxwidth300');
|
||||
$moreforfilter.='</div>';
|
||||
|
||||
// If the user can view users
|
||||
|
||||
@ -425,6 +425,7 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id.'&lineid='.$_GET["lineid"].($withproject?'&withproject=1':''),$langs->trans("DeleteATimeSpent"),$langs->trans("ConfirmDeleteATimeSpent"),"confirm_delete",'','',1);
|
||||
}
|
||||
|
||||
print '<div class="fichecenter">';
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
$param=($withproject?'&withproject=1':'');
|
||||
@ -492,7 +493,8 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
print '</div>';
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
|
||||
@ -268,7 +268,7 @@ input.select2-input {
|
||||
border-bottom: solid 1px rgba(0,0,0,.2) !important; /* required to avoid to lose bottom line when focus is lost on select2. */
|
||||
}
|
||||
|
||||
.liste_titre input[name=month], .liste_titre input[name=month_lim] {
|
||||
.liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre input[name=month_lim] {
|
||||
margin-right: 4px;
|
||||
}
|
||||
input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select {
|
||||
@ -282,9 +282,14 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla
|
||||
}
|
||||
input {
|
||||
line-height: 17px;
|
||||
padding: 4px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
select {
|
||||
padding: 4px;
|
||||
padding-left: 2px;
|
||||
}
|
||||
input, select {
|
||||
padding: 4px;
|
||||
margin-left:0px;
|
||||
margin-bottom:1px;
|
||||
margin-top:1px;
|
||||
@ -4003,7 +4008,7 @@ a span.select2-chosen
|
||||
}
|
||||
.select2-container .select2-choice {
|
||||
background-image: none;
|
||||
line-height: 24px;
|
||||
/* line-height: 24px; */
|
||||
}
|
||||
.select2-results .select2-no-results, .select2-results .select2-searching, .select2-results .select2-ajax-error, .select2-results .select2-selection-limit
|
||||
{
|
||||
|
||||
@ -292,18 +292,24 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla
|
||||
outline: none;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
input, select {
|
||||
border-bottom: solid 1px rgba(0,0,0,.1);
|
||||
|
||||
input {
|
||||
line-height: 17px;
|
||||
padding: 4px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
select {
|
||||
padding: 4px;
|
||||
padding-left: 2px;
|
||||
}
|
||||
input, select {
|
||||
margin-left:0px;
|
||||
margin-bottom:1px;
|
||||
margin-top:1px;
|
||||
}
|
||||
input {
|
||||
padding:4px;
|
||||
}
|
||||
select {
|
||||
padding:1px;
|
||||
|
||||
input, select {
|
||||
border-bottom: solid 1px rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
textarea {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user