';
diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php
index b02b2850346..82cc7584c07 100644
--- a/htdocs/comm/action/document.php
+++ b/htdocs/comm/action/document.php
@@ -63,6 +63,9 @@ if ($id > 0) {
$object->fetch_thirdparty();
}
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$hookmanager->initHooks(array('actioncard', 'globalcard'));
+
// Get parameters
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
$sortfield = GETPOST('sortfield', 'aZ09comma');
@@ -155,6 +158,15 @@ if ($object->id > 0) {
$out .= '
'.img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"');
$out .= ''.$langs->trans("ViewDay").'';
+ // Add more views from hooks
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action);
+ if (empty($reshook)) {
+ $out .= $hookmanager->resPrint;
+ } elseif ($reshook > 1) {
+ $out = $hookmanager->resPrint;
+ }
+
$linkback .= $out;
$morehtmlref = '';
diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php
index 749ca6a0c62..d4588223b26 100644
--- a/htdocs/comm/action/info.php
+++ b/htdocs/comm/action/info.php
@@ -39,6 +39,9 @@ $langs->load("commercial");
$id = GETPOST('id', 'int');
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$hookmanager->initHooks(array('actioncard', 'globalcard'));
+
// Security check
if ($user->socid > 0) {
$action = '';
@@ -83,6 +86,15 @@ $out .= '
'.img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"');
$out .= ''.$langs->trans("ViewDay").'';
+// Add more views from hooks
+$parameters = array();
+$reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action);
+if (empty($reshook)) {
+ $out .= $hookmanager->resPrint;
+} elseif ($reshook > 1) {
+ $out = $hookmanager->resPrint;
+}
+
$linkback .= $out;
$morehtmlref = '
';
diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php
index c063e049f44..eedfcc06245 100644
--- a/htdocs/resource/element_resource.php
+++ b/htdocs/resource/element_resource.php
@@ -324,6 +324,9 @@ if (!$ret) {
if (($element_id || $element_ref) && $element == 'action') {
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
+ // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+ $hookmanager->initHooks(array('actioncard', 'globalcard'));
+
$act = fetchObjectByElement($element_id, $element, $element_ref);
if (is_object($act)) {
$head = actions_prepare_head($act);
@@ -344,6 +347,15 @@ if (!$ret) {
$out .= '
'.img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"');
$out .= ''.$langs->trans("ViewDay").'';
+ // Add more views from hooks
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action);
+ if (empty($reshook)) {
+ $out .= $hookmanager->resPrint;
+ } elseif ($reshook > 1) {
+ $out = $hookmanager->resPrint;
+ }
+
$linkback .= $out;
$morehtmlref = '';