Пример #1
0
print '<thead>';
print '<tr>';
print '<th>';
print '</th>';
$obj->aoColumns[$i]->mDataProp = "_id";
$obj->aoColumns[$i]->bUseRendered = false;
$obj->aoColumns[$i]->bSearchable = false;
$obj->aoColumns[$i]->bVisible = false;
$i++;
print '<th class="essential">';
print $langs->trans("Company");
print '</th>';
$obj->aoColumns[$i]->mDataProp = "ThirdPartyName";
$obj->aoColumns[$i]->bUseRendered = false;
$obj->aoColumns[$i]->bSearchable = true;
$obj->aoColumns[$i]->fnRender = $object->datatablesFnRender("ThirdPartyName", "url");
$i++;
foreach ($object->fk_extrafields->longList as $aRow) {
    print '<th class="essential">';
    print $langs->trans($aRow);
    print '</th>';
    $obj->aoColumns[$i] = $object->fk_extrafields->fields->{$aRow}->aoColumns;
    if (isset($object->fk_extrafields->{$aRow}->default)) {
        $obj->aoColumns[$i]->sDefaultContent = $object->fk_extrafields->{$aRow}->default;
    } else {
        $obj->aoColumns[$i]->sDefaultContent = "";
    }
    $obj->aoColumns[$i]->mDataProp = $aRow;
    $i++;
}
print '<th class="essential">';