<?php $ligne = 0; foreach ($self->results as $item) { $class = $ligne % 2 === 0 ? "even" : ""; echo "<tr class=\"{$class}\">"; // class="even" echo "\n <td class=\"ck-column\">\n <input type=\"checkbox\" name=\"itemId[]\" value=\"" . $item[$self->primaryKey] . "\" />\n </td>\n "; foreach ($self->columns as $table => $conf) { if ($conf["showInTable"] === false) { continue; } $celValue = $item[$table]; $celValue = strip_tags($celValue); //$celValue = \Core\CString::utf8decode($celValue); // Trim text si long if (\Core\CString::strlen($celValue) > 15) { $celValue = substr($celValue, 0, 14) . "..."; } if (trim($celValue) === "") { $celValue = " -- "; } echo "<td>"; if (isset($conf["link"]) && $conf["link"] === true) { echo "<a \n class=\"edit_" . $randId . "\"\n href=\"#\"\n data-form=\"" . $randId . "\"\n data-table=\"" . $table . "\"\n data-value=\"" . $item[$self->primaryKey] . "\"\n >" . $celValue . "</a>"; } else { echo $celValue; } echo "</td>"; } echo "</tr>"; $ligne++;