diff --git a/core/class/template.class.php b/core/class/template.class.php index c4883eaa..541888f0 100644 --- a/core/class/template.class.php +++ b/core/class/template.class.php @@ -884,6 +884,10 @@ class template $html = '
'; // Début tableau $html .= ''; + // Pas de tableau d'Id transmis, générer une numérotation + if (empty($rowsId)) { + $rowsId = range(0, count($body)); + } // Entêtes if ($head) { // Début des entêtes @@ -891,21 +895,17 @@ class template $html .= ''; $i = 0; foreach ($head as $th) { - $html .= ''; + $html .= ''; } // Fin des entêtes $html .= ''; $html .= ''; } - // Pas de tableau d'Id transmis, générer une numérotation - if (empty($rowsId)) { - $rowsId = range(0, count($body)); - } // Début contenu $j = 0; foreach ($body as $tr) { // Id de ligne pour les tableaux drag and drop - $html .= ''; + $html .= ''; $i = 0; foreach ($tr as $td) { $html .= '';
' . $th . '' . $th . '
' . $td . '