From 57a267a30f054d00cc0d11bfe2bdf623fb9619de Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 30 Jun 2015 17:09:52 +0200 Subject: [PATCH] NEW Add hooks to allow an external module to complete list of events into calendar views. --- htdocs/comm/action/index.php | 48 +++++++++++++++++++------ htdocs/core/class/hookmanager.class.php | 9 ++--- 2 files changed, 43 insertions(+), 14 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index e5472727aa2..c414d3409d6 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -341,11 +341,14 @@ dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirthday,0,$filtert,0,$pid,$socid,$action,$listofextcals,$actioncode,$usergroup); dol_fiche_end(); + +// Define the legend/list of calendard to show +$s=''; $link=''; + $showextcals=$listofextcals; -// Legend -if (! empty($conf->use_javascript_ajax)) + +if (! empty($conf->use_javascript_ajax)) // If javascript on { - $s=''; $s.='' . "\n"; + // Local calendar $s.='
' . $langs->trans("LocalAgenda").'  
'; + + // External calendars if (is_array($showextcals) && count($showextcals) > 0) { $s.='