Add some hooks to add new buttons (compensation of removal of tabs).

This commit is contained in:
Laurent Destailleur 2021-01-12 13:58:16 +01:00
parent 3906acc951
commit 75323859e4
4 changed files with 38 additions and 4 deletions

View File

@ -454,6 +454,15 @@ $viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsm
$viewmode .= '<span class="marginrightonly"></span>';
// Add more views from hooks
$parameters = array(); $object = null;
$reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action);
if (empty($reshook)) {
$viewmode .= $hookmanager->resPrint;
} elseif ($reshook > 1) {
$viewmode = $hookmanager->resPrint;
}
$newcardbutton = '';
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)

View File

@ -472,11 +472,9 @@ if ($resql)
// Calendars from hooks
$parameters = array(); $object = null;
$reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action);
if (empty($reshook))
{
if (empty($reshook)) {
$s .= $hookmanager->resPrint;
} elseif ($reshook > 1)
{
} elseif ($reshook > 1) {
$s = $hookmanager->resPrint;
}
@ -513,6 +511,15 @@ if ($resql)
$viewmode .= '<span class="marginrightonly"></span>';
// Add more views from hooks
$parameters = array(); $object = null;
$reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action);
if (empty($reshook)) {
$viewmode .= $hookmanager->resPrint;
} elseif ($reshook > 1) {
$viewmode = $hookmanager->resPrint;
}
$tmpforcreatebutton = dol_getdate(dol_now(), true);
$newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year'];

View File

@ -384,6 +384,15 @@ $viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsm
$viewmode .= '<span class="marginrightonly"></span>';
// Add more views from hooks
$parameters = array(); $object = null;
$reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action);
if (empty($reshook)) {
$viewmode .= $hookmanager->resPrint;
} elseif ($reshook > 1) {
$viewmode = $hookmanager->resPrint;
}
$newcardbutton = '';
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)

View File

@ -389,6 +389,15 @@ $viewmode .= '<span class="valignmiddle text-plus-circle btnTitle-label hideonsm
$viewmode .= '<span class="marginrightonly"></span>';
// Add more views from hooks
$parameters = array(); $object = null;
$reshook = $hookmanager->executeHooks('addCalendarView', $parameters, $object, $action);
if (empty($reshook)) {
$viewmode .= $hookmanager->resPrint;
} elseif ($reshook > 1) {
$viewmode = $hookmanager->resPrint;
}
$newcardbutton = '';
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)