From 54b359ab8ac5d1444f5a7e7f98aa158ca078dcfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charl=C3=A8ne=20Benke?= <1179011+defrance@users.noreply.github.com> Date: Fri, 18 Jul 2025 03:01:36 +0200 Subject: [PATCH] NEW implement box on product and interventional index page (#34629) * implement box on product and interventional index page * Update index.php --------- Co-authored-by: Laurent Destailleur --- htdocs/core/class/infobox.class.php | 2 ++ htdocs/fichinter/index.php | 37 ++++++++++++++++++++++++----- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index 68340e873d2..a3bd4a75c6b 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -44,7 +44,9 @@ class InfoBox 1 => 'UsersHome', 2 => 'MembersHome', 3 => 'ThirdpartiesHome', + 4 => 'productindex', 11 => 'TicketsHome', + 20 => 'interventionindex', 27 => 'AccountancyHome' ); } else { diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 6e3ef81ede7..9486d63c551 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -1,10 +1,10 @@ - * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2015 Charlene Benke - * Copyright (C) 2019 Nicolas ZABOURI - * Copyright (C) 2024-2025 Frédéric France +/* Copyright (C) 2003-2004 Rodolphe Quiedeville + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015-2025 Charlene Benke + * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2024-2025 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,6 +29,7 @@ // Load Dolibarr environment require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; @@ -59,6 +60,9 @@ if ($user->socid > 0) { $socid = $user->socid; } +// Load $resultboxes +$resultboxes = FormOther::getBoxesArea($user, "20"); + $max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT', 5); @@ -395,6 +399,27 @@ if (isModEnabled('intervention')) { print ''; +// boxes +print '
'; +print '
'; + +$boxlist = '
'; + +$boxlist .= '
'; + +$boxlist .= $resultboxes['boxlista']; +$boxlist .= "
\n"; + +$boxlist .= '
'; +$boxlist .= $resultboxes['boxlistb']; +$boxlist .= '
'."\n"; + +$boxlist .= "
\n"; + +print $boxlist; + +print '
'; + $parameters = array('user' => $user); $reshook = $hookmanager->executeHooks('dashboardInterventions', $parameters, $object); // Note that $action and $object may have been modified by hook