New: Enhancement in actions list management. Show location in day view
This commit is contained in:
parent
e17b26e988
commit
344219cb13
@ -61,6 +61,7 @@ class ActionComm extends CommonObject
|
||||
var $priority;
|
||||
var $fulldayevent = 0; // 1=Event on full day
|
||||
var $punctual = 1;
|
||||
var $location;
|
||||
|
||||
var $usertodo; // Object user that must do action
|
||||
var $userdone; // Object user that did action
|
||||
@ -577,7 +578,12 @@ class ActionComm extends CommonObject
|
||||
else $lien = '<a '.($classname?'class="'.$classname.'" ':'').'href="'.DOL_URL_ROOT.'/comm/action/fiche.php?id='.$this->id.'">';
|
||||
$lienfin='</a>';
|
||||
//print $this->libelle;
|
||||
if (empty($this->libelle))
|
||||
if ($withpicto == 2)
|
||||
{
|
||||
$libelle=$langs->trans("Action".$this->type_code);
|
||||
$libelleshort='';
|
||||
}
|
||||
else if (empty($this->libelle))
|
||||
{
|
||||
$libelle=$langs->trans("Action".$this->type_code);
|
||||
$libelleshort=$langs->trans("Action".$this->type_code,'','','','',$maxlength);
|
||||
|
||||
@ -484,7 +484,7 @@ else // View by day
|
||||
echo " </tr>\n";
|
||||
echo " <tr>\n";
|
||||
echo ' <td class="'.$style.'" width="14%" valign="top" nowrap="nowrap">';
|
||||
show_day_events ($db, $day, $month, $year, $month, $style, $actionarray, 0, 80, $newparam);
|
||||
show_day_events ($db, $day, $month, $year, $month, $style, $actionarray, 0, 80, $newparam, 1);
|
||||
echo "</td>\n";
|
||||
echo " </tr>\n";
|
||||
echo '</table>';
|
||||
@ -510,10 +510,9 @@ llxFooter('$Date$ - $Revision$');
|
||||
* @param $maxPrint Nb of actions to show each day on month view (0 means non limit)
|
||||
* @param $maxnbofchar Nb of characters to show for event line
|
||||
* @param $newparam Parameters on current URL
|
||||
* @param $companystatic Object thirdparty
|
||||
* @param $contactstatic Object contact
|
||||
* @param $showinfo Add extended information (used by day view)
|
||||
*/
|
||||
function show_day_events($db, $day, $month, $year, $monthshown, $style, &$actionarray, $maxPrint=0, $maxnbofchar=14, $newparam='')
|
||||
function show_day_events($db, $day, $month, $year, $monthshown, $style, &$actionarray, $maxPrint=0, $maxnbofchar=14, $newparam='', $showinfo=0)
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
global $filter, $filtera, $filtert, $filterd, $status;
|
||||
@ -565,6 +564,11 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$action
|
||||
print '<td nowrap="nowrap">';
|
||||
if ($action->type_code != 'BIRTHDAY')
|
||||
{
|
||||
if ($showinfo)
|
||||
{
|
||||
print $action->getNomUrl(2).' ';
|
||||
}
|
||||
|
||||
if (empty($action->fulldayevent))
|
||||
{
|
||||
// Show hours (start ... end)
|
||||
@ -599,7 +603,14 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$action
|
||||
if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour)
|
||||
print dol_print_date($action->date_end_in_calendar,'%H:%M');
|
||||
}
|
||||
print '<br>';
|
||||
print '<br>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($showinfo)
|
||||
{
|
||||
print $langs->trans("EventOnFullDay").'<br>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
// If action related to company / contact
|
||||
@ -635,6 +646,15 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$action
|
||||
{
|
||||
print $action->getNomUrl(1,$maxnbofchar,'cal_event','birthday','contact');
|
||||
}
|
||||
// Show location
|
||||
if ($showinfo)
|
||||
{
|
||||
if ($action->location)
|
||||
{
|
||||
print '<br>';
|
||||
print $langs->trans("Location").': '.$action->location;
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
// Status - Percent
|
||||
print '<td align="right" nowrap="nowrap">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user