diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index edb67718f78..554f5496775 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -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 = ''; $lienfin=''; //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); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 822ec3d4c9d..1a27b2e4d6a 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -484,7 +484,7 @@ else // View by day echo " \n"; echo " \n"; echo ' '; - 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 "\n"; echo " \n"; echo ''; @@ -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 ''; 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 '
'; + print '
'."\n"; + } + else + { + if ($showinfo) + { + print $langs->trans("EventOnFullDay").'
'."\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 '
'; + print $langs->trans("Location").': '.$action->location; + } + } print ''; // Status - Percent print '';