Merge pull request #19928 from thomas-Ngr/develop_new_add_header_before_public_ticket_list

NEW : add hook before the public ticket list
This commit is contained in:
Laurent Destailleur 2022-01-26 12:01:37 +01:00 committed by GitHub
commit e2734eca43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,6 +77,9 @@ if (isset($_SESSION['email_customer'])) {
$object = new Ticket($db);
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('ticketpubliclist', 'globalcard'));
if (empty($conf->ticket->enabled)) {
accessforbidden('', 0, 0, 1);
}
@ -407,6 +410,11 @@ if ($action == "view_ticketlist") {
$varpage = empty($contextpage) ? $url_page_current : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
// allow to display information before list
$parameters=array('arrayfields'=>$arrayfields);
$reshook=$hookmanager->executeHooks('printFieldListHeader', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '<table class="liste '.($moreforfilter ? "listwithfilterbefore" : "").'">';
// Filter bar