New: Can filter on project on agenda

This commit is contained in:
Laurent Destailleur 2010-01-12 09:22:05 +00:00
parent 3b6d0c77d3
commit 4157b32a7f
3 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
*
@ -688,6 +688,7 @@ if ($_GET["id"])
print $html->select_societes($act->societe->id,'socid',1,1);
print '</td>';
// Contact
print '<td>'.$langs->trans("Contact").'</td><td width="30%">';
$html->select_array("contactid", $act->societe->contact_array(), $act->contact->id, 1);
print '</td></tr>';
@ -714,12 +715,12 @@ if ($_GET["id"])
print $act->author->getNomUrl(1);
print '</td></tr>';
// Affecte a
// Affected to
print '<tr><td nowrap>'.$langs->trans("ActionAffectedTo").'</td><td colspan="3">';
$html->select_users($act->usertodo->id,'affectedto',1);
print '</td></tr>';
// Realise par
// Realised by
print '<tr><td nowrap>'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
$html->select_users($act->userdone->id,'doneby',1);
print '</td></tr>';

View File

@ -238,6 +238,7 @@ $sql.= ', '.MAIN_DB_PREFIX.'user as u';
$sql.= ' WHERE a.fk_action = ca.id';
$sql.= ' AND a.fk_user_author = u.rowid';
$sql.= ' AND u.entity in (0,'.$conf->entity.')';
if ($_REQUEST["projectid"]) $sql.=" AND a.fk_project=".addslashes($_REQUEST["projectid"]);
if ($_GET["action"] == 'show_day')
{
$sql.= ' AND (';

View File

@ -2263,6 +2263,7 @@ class Form
* @param d 1=Affiche aussi les jours, mois, annees
* @param addnowbutton Add a button "Now"
* @param nooutput Do not output zone but return it
* @return nothing or string if nooutput is 1
*/
function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowbutton=0, $nooutput=0)
{
@ -2323,7 +2324,7 @@ class Form
if ("$conf->use_popup_calendar" == "eldy") // Laisser conf->use_popup_calendar entre quote
{
// Zone de saisie manuelle de la date
$retstring ='<input id="'.$prefix.'" name="'.$prefix.'" type="text" size="9" maxlength="11" value="'.$formated_date.'"';
$retstring.='<input id="'.$prefix.'" name="'.$prefix.'" type="text" size="9" maxlength="11" value="'.$formated_date.'"';
$retstring.=' onChange="dpChangeDay(\''.$prefix.'\',\''.$conf->format_date_short_java.'\'); "';
$retstring.='>';
@ -2531,7 +2532,7 @@ class Form
if (! empty($nooutput)) return $retstring;
print $restring;
print $retstring;
return;
}