NEW : print event type on third party card tab agenda list (only if AGENDA_USE_EVENT_TYPE = 1)
Conflicts: htdocs/core/lib/company.lib.php
This commit is contained in:
parent
c42859e85a
commit
f18c983ba5
@ -897,7 +897,7 @@ function show_addresses($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,$user;
|
global $bc,$user,$conf;
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (! is_object($object)) dol_print_error('','BadParameter');
|
if (! is_object($object)) dol_print_error('','BadParameter');
|
||||||
@ -915,12 +915,22 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||||||
$out.="\n";
|
$out.="\n";
|
||||||
$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="2">';
|
if($conf->global->AGENDA_USE_EVENT_TYPE) $out.='<td colspan="3">';
|
||||||
|
else $out.='<td colspan="2">';
|
||||||
if (get_class($object) == 'Societe') $out.='<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?socid='.$object->id.'&status=todo">';
|
if (get_class($object) == 'Societe') $out.='<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?socid='.$object->id.'&status=todo">';
|
||||||
$out.=$langs->trans("ActionsToDoShort");
|
$out.=$langs->trans("ActionsToDoShort");
|
||||||
if (get_class($object) == 'Societe') $out.='</a>';
|
if (get_class($object) == 'Societe') $out.='</a>';
|
||||||
$out.='</td>';
|
$out.='</td>';
|
||||||
$out.='<td colspan="5" align="right">';
|
|
||||||
|
if($conf->global->AGENDA_USE_EVENT_TYPE) {
|
||||||
|
$out.='<td>';
|
||||||
|
$out.=$langs->trans("Type");
|
||||||
|
$out.='</td>';
|
||||||
|
$out.='<td colspan="4" align="right">';
|
||||||
|
} else {
|
||||||
|
$out.='<td colspan="5" align="right">';
|
||||||
|
}
|
||||||
|
|
||||||
$out.='</td>';
|
$out.='</td>';
|
||||||
$out.='</tr>';
|
$out.='</tr>';
|
||||||
|
|
||||||
@ -965,7 +975,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||||||
$var = !$var;
|
$var = !$var;
|
||||||
|
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
$actionstatic->fetch($obj->id);
|
||||||
$datep=$db->jdate($obj->dp);
|
$datep=$db->jdate($obj->dp);
|
||||||
$datep2=$db->jdate($obj->dp2);
|
$datep2=$db->jdate($obj->dp2);
|
||||||
|
|
||||||
@ -999,8 +1009,13 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||||||
|
|
||||||
// Title of event
|
// Title of event
|
||||||
//$out.='<td colspan="2">'.dol_trunc($obj->label,40).'</td>';
|
//$out.='<td colspan="2">'.dol_trunc($obj->label,40).'</td>';
|
||||||
$out.='<td colspan="2">'.$actionstatic->getNomUrl(1,120).'</td>';
|
$out.='<td>'.$actionstatic->getNomUrl(1,120).'</td>';
|
||||||
|
|
||||||
|
if($conf->global->AGENDA_USE_EVENT_TYPE) {
|
||||||
|
$out.= '<td>';
|
||||||
|
$out.=$actionstatic->type;
|
||||||
|
$out.='</td>';
|
||||||
|
}
|
||||||
// Contact pour cette action
|
// Contact pour cette action
|
||||||
if (empty($objcon->id) && $obj->fk_contact > 0)
|
if (empty($objcon->id) && $obj->fk_contact > 0)
|
||||||
{
|
{
|
||||||
@ -1063,7 +1078,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,$user;
|
global $bc,$user,$conf;
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
if (! is_object($object)) dol_print_error('','BadParameter');
|
if (! is_object($object)) dol_print_error('','BadParameter');
|
||||||
@ -1202,12 +1217,22 @@ 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="2">';
|
if($conf->global->AGENDA_USE_EVENT_TYPE) $out.='<td colspan="3">';
|
||||||
|
else $out.='<td colspan="2">';
|
||||||
if (get_class($object) == 'Societe') $out.='<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?socid='.$object->id.'&status=done">';
|
if (get_class($object) == 'Societe') $out.='<a href="'.DOL_URL_ROOT.'/comm/action/listactions.php?socid='.$object->id.'&status=done">';
|
||||||
$out.=$langs->trans("ActionsDoneShort");
|
$out.=$langs->trans("ActionsDoneShort");
|
||||||
if (get_class($object) == 'Societe') $out.='</a>';
|
if (get_class($object) == 'Societe') $out.='</a>';
|
||||||
$out.='</td>';
|
$out.='</td>';
|
||||||
$out.='<td colspan="5" align="right">';
|
|
||||||
|
if($conf->global->AGENDA_USE_EVENT_TYPE) {
|
||||||
|
$out.='<td>';
|
||||||
|
$out.=$langs->trans("Type");
|
||||||
|
$out.='</td>';
|
||||||
|
$out.='<td colspan="4" align="right">';
|
||||||
|
} else {
|
||||||
|
$out.='<td colspan="5" align="right">';
|
||||||
|
}
|
||||||
|
|
||||||
$out.='</td>';
|
$out.='</td>';
|
||||||
$out.='</tr>';
|
$out.='</tr>';
|
||||||
|
|
||||||
@ -1215,7 +1240,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
$out.="<tr ".$bc[$var].">";
|
$out.="<tr ".$bc[$var].">";
|
||||||
|
$actionstatic->fetch($histo[$key]['id']);
|
||||||
// Champ date
|
// Champ date
|
||||||
$out.='<td width="120" class="nowrap">';
|
$out.='<td width="120" class="nowrap">';
|
||||||
$out.=dol_print_date($histo[$key]['datestart'],'dayhour');
|
$out.=dol_print_date($histo[$key]['datestart'],'dayhour');
|
||||||
@ -1251,7 +1276,12 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
|||||||
$out.=dol_trunc($libelle,120);
|
$out.=dol_trunc($libelle,120);
|
||||||
}
|
}
|
||||||
$out.='</td>';
|
$out.='</td>';
|
||||||
|
|
||||||
|
if($conf->global->AGENDA_USE_EVENT_TYPE) {
|
||||||
|
$out.='<td>';
|
||||||
|
$out.=$actionstatic->type;
|
||||||
|
$out.='</td>';
|
||||||
|
}
|
||||||
// Title of event
|
// Title of event
|
||||||
//$out.='<td>'.dol_trunc($histo[$key]['note'], 40).'</td>';
|
//$out.='<td>'.dol_trunc($histo[$key]['note'], 40).'</td>';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user