New: Add button to create event from event list
This commit is contained in:
parent
a6f48336f5
commit
bfe277ceb1
@ -23,7 +23,7 @@
|
|||||||
* \file htdocs/lib/company.lib.php
|
* \file htdocs/lib/company.lib.php
|
||||||
* \brief Ensemble de fonctions de base pour le module societe
|
* \brief Ensemble de fonctions de base pour le module societe
|
||||||
* \ingroup societe
|
* \ingroup societe
|
||||||
* \version $Id: company.lib.php,v 1.124 2011/08/17 19:43:18 hregis Exp $
|
* \version $Id: company.lib.php,v 1.125 2011/08/24 12:18:56 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -592,7 +592,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
|||||||
*/
|
*/
|
||||||
function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||||
{
|
{
|
||||||
global $bc;
|
global $bc,$user;
|
||||||
|
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
$out='';
|
$out='';
|
||||||
@ -610,7 +610,17 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||||||
|
|
||||||
$out.='<table width="100%" class="noborder">';
|
$out.='<table width="100%" class="noborder">';
|
||||||
$out.='<tr class="liste_titre">';
|
$out.='<tr class="liste_titre">';
|
||||||
$out.='<td colspan="6"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?socid='.$object->id.'&status=todo">'.$langs->trans("ActionsToDoShort").'</a></td><td align="right"> </td>';
|
$out.='<td colspan="2"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?socid='.$object->id.'&status=todo">'.$langs->trans("ActionsToDoShort").'</a></td>';
|
||||||
|
$out.='<td colspan="5" align="right">';
|
||||||
|
$permok=$user->rights->agenda->myactions->create;
|
||||||
|
if (($object->id || $objcon->id) && $permok)
|
||||||
|
{
|
||||||
|
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$object->id.'&contactid='.$objcon->id.'&backtopage=1&percentage=-1">';
|
||||||
|
$out.=$langs->trans("AddAnAction").' ';
|
||||||
|
$out.=img_picto($langs->trans("AddAnAction"),'filenew');
|
||||||
|
$out.="</a>";
|
||||||
|
}
|
||||||
|
$out.='</td>';
|
||||||
$out.='</tr>';
|
$out.='</tr>';
|
||||||
|
|
||||||
$sql = "SELECT a.id, a.label,";
|
$sql = "SELECT a.id, a.label,";
|
||||||
@ -728,7 +738,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||||||
*/
|
*/
|
||||||
function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||||
{
|
{
|
||||||
global $bc;
|
global $bc,$user;
|
||||||
|
|
||||||
$out='';
|
$out='';
|
||||||
$histo=array();
|
$histo=array();
|
||||||
@ -766,7 +776,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$histo[$numaction]=array('type'=>'action','id'=>$obj->id,'date'=>$db->jdate($obj->dp2),'note'=>$obj->label,'percent'=>$obj->percent,
|
$histo[$numaction]=array('type'=>'action','id'=>$obj->id,'datestart'=>$db->jdate($obj->dp),'date'=>$db->jdate($obj->dp2),'note'=>$obj->label,'percent'=>$obj->percent,
|
||||||
'acode'=>$obj->acode,'libelle'=>$obj->libelle,
|
'acode'=>$obj->acode,'libelle'=>$obj->libelle,
|
||||||
'userid'=>$obj->user_id,'login'=>$obj->login,
|
'userid'=>$obj->user_id,'login'=>$obj->login,
|
||||||
'contact_id'=>$obj->fk_contact,'name'=>$obj->name,'firstname'=>$obj->firstname,
|
'contact_id'=>$obj->fk_contact,'name'=>$obj->name,'firstname'=>$obj->firstname,
|
||||||
@ -839,7 +849,17 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||||||
$out.="\n";
|
$out.="\n";
|
||||||
$out.='<table class="noborder" width="100%">';
|
$out.='<table class="noborder" width="100%">';
|
||||||
$out.='<tr class="liste_titre">';
|
$out.='<tr class="liste_titre">';
|
||||||
$out.='<td colspan="7"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?socid='.$object->id.'&status=done">'.$langs->trans("ActionsDoneShort").'</a></td>';
|
$out.='<td colspan="2"><a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?socid='.$object->id.'&status=done">'.$langs->trans("ActionsDoneShort").'</a></td>';
|
||||||
|
$out.='<td colspan="5" align="right">';
|
||||||
|
$permok=$user->rights->agenda->myactions->create;
|
||||||
|
if (($object->id || $objcon->id) && $permok)
|
||||||
|
{
|
||||||
|
$out.='<a href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$object->id.'&contactid='.$objcon->id.'&backtopage=1&percentage=-1">';
|
||||||
|
$out.=$langs->trans("AddAnAction").' ';
|
||||||
|
$out.=img_picto($langs->trans("AddAnAction"),'filenew');
|
||||||
|
$out.="</a>";
|
||||||
|
}
|
||||||
|
$out.='</td>';
|
||||||
$out.='</tr>';
|
$out.='</tr>';
|
||||||
|
|
||||||
foreach ($histo as $key=>$value)
|
foreach ($histo as $key=>$value)
|
||||||
@ -848,7 +868,10 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||||||
$out.="<tr ".$bc[$var].">";
|
$out.="<tr ".$bc[$var].">";
|
||||||
|
|
||||||
// Champ date
|
// Champ date
|
||||||
$out.='<td width="120" nowrap="nowrap">'.dol_print_date($histo[$key]['date'],'dayhour')."</td>\n";
|
$out.='<td width="120" nowrap="nowrap">';
|
||||||
|
if ($histo[$key]['date']) $out.=dol_print_date($histo[$key]['date'],'dayhour');
|
||||||
|
else if ($histo[$key]['datestart']) $out.=dol_print_date($histo[$key]['datestart'],'dayhour');
|
||||||
|
$out.="</td>\n";
|
||||||
|
|
||||||
// Picto
|
// Picto
|
||||||
$out.='<td width="16"> </td>';
|
$out.='<td width="16"> </td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user