diff --git a/core/class/template.class.php b/core/class/template.class.php
index 9072a2e9..b550386e 100644
--- a/core/class/template.class.php
+++ b/core/class/template.class.php
@@ -598,56 +598,58 @@ class template {
}
/**
- * Crée un tableau
- * @param array $cols Cols des colonnes (format: [col colonne1, col colonne2, etc])
- * @param array $body Contenu (format: [[contenu1, contenu2, etc], [contenu1, contenu2, etc]])
- * @param array $head Entêtes (format : [[titre colonne1, titre colonne2, etc])
- * @param array $attributes Attributs ($key => $value)
- * @return string
- */
- public static function table(array $cols = [], array $body = [], array $head = [], array $attributes = []) {
- // Attributs par défaut
- $attributes = array_merge([
- 'class' => '',
- 'classWrapper' => '',
- 'id' => ''
- ], $attributes);
- // Début du wrapper
- $html = '
';
- // Début tableau
- $html .= '
';
- // Entêtes
- if($head) {
- // Début des entêtes
- $html .= '';
- $html .= '';
- $i = 0;
- foreach($head as $th) {
- $html .= '' . $th . ' | ';
- }
- // Fin des entêtes
- $html .= '
';
- $html .= '';
- }
- // Début contenu
- $html .= '';
- foreach($body as $tr) {
- $html .= '';
- $i = 0;
- foreach($tr as $td) {
- $html .= '' . $td . ' | ';
- }
- $html .= '
';
- }
- // Fin contenu
- $html .= '';
- // Fin tableau
- $html .= '
';
- // Fin container
- $html .= '
';
- // Retourne le html
- return $html;
- }
+ * Crée un tableau
+ * @param array $cols Cols des colonnes (format: [col colonne1, col colonne2, etc])
+ * @param array $body Contenu (format: [[contenu1, contenu2, etc], [contenu1, contenu2, etc]])
+ * @param array $head Entêtes (format : [[titre colonne1, titre colonne2, etc])
+ * @param array $attributes Attributs ($key => $value)
+ * @return string
+ */
+ public static function table(array $cols = [], array $body = [], array $head = [], array $attributes = [], array $rowsId = []) {
+ // Attributs par défaut
+ $attributes = array_merge([
+ 'class' => '',
+ 'classWrapper' => '',
+ 'id' => ''
+ ], $attributes);
+ // Début du wrapper
+ $html = '';
+ // Début tableau
+ $html .= '
';
+ // Entêtes
+ if($head) {
+ // Début des entêtes
+ $html .= '';
+ $html .= '';
+ $i = 0;
+ foreach($head as $th) {
+ $html .= '' . $th . ' | ';
+ }
+ // Fin des entêtes
+ $html .= '
';
+ $html .= '';
+ }
+ // Début contenu
+ $j = 0;
+ foreach($body as $tr) {
+ // Id de ligne pour les tableaux drag and drop
+ $html .= '';
+ $j++;
+ $i = 0;
+ foreach($tr as $td) {
+ $html .= '' . $td . ' | ';
+ }
+ $html .= '
';
+ }
+ // Fin contenu
+ $html .= '';
+ // Fin tableau
+ $html .= '
';
+ // Fin container
+ $html .= '
';
+ // Retourne le html
+ return $html;
+ }
/**
* Crée un champ texte court