From c632cef129831aae60497e37ad89c5ac0a5063d2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Jan 2010 23:35:52 +0000 Subject: [PATCH] Can filter action on project --- htdocs/comm/action/index.php | 78 +++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 36 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 10b3dde8bd5..808a6e343db 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Eric Seigne - * Copyright (C) 2004-2009 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -175,46 +175,52 @@ if ($canedit || $conf->projet->enabled) print ''; print ''; print ''; - if ($canedit) + if ($canedit || $conf->projet->enabled) { - $rowspan=3; - if ($conf->projet->enabled) $rowspan++; - print ''; - print ''; - print ''; print ''; - - print ''; - print ''; - - print ''; - print ''; - } - if ($conf->projet->enabled) - { - print ''; - print ''; } print '
'; - print $langs->trans("ActionsAskedBy"); - print ''; - print $form->select_users($filtera,'userasked',1,'',!$canedit); + print '
'; + + print ''; + + if ($canedit) + { + print ''; + print ''; + print ''; + + print ''; print ''; + print ''; + print ''; + } + + if ($conf->projet->enabled) + { + print ''; + print ''; + } + + print '
'; + print $langs->trans("ActionsAskedBy"); + print ''; + print $form->select_users($filtera,'userasked',1,'',!$canedit); + print '
'; print $langs->trans("ActionsToDoBy"); + print ''; + print $form->select_users($filtert,'usertodo',1,'',!$canedit); + print '
'; + print $langs->trans("ActionsDoneBy"); + print ''; + print $form->select_users($filterd,'userdone',1,'',!$canedit); + print '
'; + print $langs->trans("Project").'   '; print ''; select_projects($socid,$_REQUEST["projectid"],'projectid'); print '
'; print '
'; + + // Buttons + print ''; print img_picto($langs->trans("ViewList"),'object_list').' '; print '
'; print '
'; print img_picto($langs->trans("ViewCal"),'object_calendar').' '; print '
'; - print $langs->trans("ActionsToDoBy"); - print ''; - print $form->select_users($filtert,'usertodo',1,'',!$canedit); - print '
'; - print $langs->trans("ActionsDoneBy"); - print ''; - print $form->select_users($filterd,'userdone',1,'',!$canedit); - print '
'; - print $langs->trans("Project"); - print ''; - select_projects($socid,$_REQUEST["projectid"],'projectid'); - print '
'; print '
'; @@ -257,7 +263,7 @@ else // To limit array $sql.= ' AND ('; $sql.= ' (datep BETWEEN '.$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7)); // Start 7 days before - $sql.= ' AND '.$db->idate(dol_mktime(0,0,0,$month,28,$year)+(60*60*24*10)).')'; // End 7 days after + 3 to go from 28 to 31 + $sql.= ' AND '.$db->idate(dol_mktime(0,0,0,$month,28,$year)+(60*60*24*10)).')'; // End 7 days after + 3 to go from 28 to 31 $sql.= ' OR '; $sql.= ' (datep2 BETWEEN '.$db->idate(dol_mktime(0,0,0,$month,1,$year)-(60*60*24*7)); $sql.= ' AND '.$db->idate(dol_mktime(0,0,0,$month,28,$year)+(60*60*24*10)).')'; @@ -344,8 +350,8 @@ if ($resql) //} //else //{ - $actionarray[$daykey][]=$action; - $j++; + $actionarray[$daykey][]=$action; + $j++; //} $daykey+=60*60*24; if ($daykey > $action->date_end_in_calendar) $loop=false;