diff --git a/core/tpl/digiquali_mass_control_list.tpl.php b/core/tpl/digiquali_mass_control_list.tpl.php new file mode 100644 index 00000000..d42f7ab9 --- /dev/null +++ b/core/tpl/digiquali_mass_control_list.tpl.php @@ -0,0 +1,56 @@ +fetchAll('', '', 0, 0, ['fk_control' => $object->id]); + +// Start the responsive table container +print '
'; + +// Load and print the title for the control list section +print load_fiche_titre($langs->trans('LinkedControlList'), '', ''); + +// Start the table +print '
'; + +// Define table headers with appropriate translations +$tableHeaders = [ + $langs->trans('Nom'), + $langs->trans('Verdict'), + $langs->trans('NoteControl'), + $langs->trans('QRCode'), + $langs->trans('Document'), + $langs->trans('Action'), +]; + +// Create header row using divs +print '
'; +foreach ($tableHeaders as $header) { + print '
' . $header . '
'; +} +print '
'; + +// Check if there are any mass controls and print them +if (is_array($massControlList) && !empty($massControlList)) { + foreach ($massControlList as $massControl) { + print '
'; + print '
' . $massControl->getNomUrl(1) . '
'; + print '
' . $massControl->getVerdict() . '
'; + print '
'; + } +} else { + // If no mass controls are found, display a message + print '
'; + print '
' . $langs->trans('NoMassControlFound') . '
'; + print '
'; +} + +print '
'; // End of table +print '
'; // End of responsive container + +?>