Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into

develop
This commit is contained in:
Laurent Destailleur
2022-12-01 18:45:30 +01:00
parent 51bb473752
commit 20b707b245
2 changed files with 13 additions and 1 deletions

View File

@@ -209,6 +209,19 @@ function project_prepare_head(Project $project, $moreparam = '')
$h++;
}
if (isModEnabled('ticket') && $user->hasRight('ticket', 'read')) {
require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php';
$Tickettatic = new Ticket($db);
$nbTicket = count($Tickettatic->getAllItemsLinkedByObjectID($project->id, '*', 'fk_project', 'ticket'));
$head[$h][0] = DOL_URL_ROOT.'/ticket/list.php?projectid='.((int) $project->id);
$head[$h][1] = $langs->trans("Ticket");
if ($nbTicket > 0) {
$head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbTicket).'</span>';
}
$head[$h][2] = 'ticket';
$h++;
}
if (isModEnabled('eventorganization') && !empty($project->usage_organize_event)) {
$langs->load('eventorganization');
$head[$h][0] = DOL_URL_ROOT . '/eventorganization/conferenceorbooth_list.php?projectid=' . $project->id;