OK ребята, у меня есть страница с динамичном таблицы с помощью Jquery DataTablesКак добавить таблеткула в существующие данные?
<div class="widget">
<div class="widget-head">
<h5>Usuarios</h5>
</div>
<div class="widget-body">
<div class="row">
<div class="col-md-12">
<div class="table-responsive">
<table cellpadding="0" cellspacing="0" border="0" id="data-table" width="100%">
<thead>
<tr>
<th><?php echo lang('index_fname_th');?></th>
<th><?php echo lang('index_lname_th');?></th>
<th><?php echo lang('index_email_th');?></th>
<th><?php echo lang('index_groups_th');?></th>
<th><?php echo lang('index_code_th');?></th>
<th><?php echo lang('index_status_th');?></th>
<th><?php echo lang('index_action_th');?></th>
<th><?php echo lang('index_net_th');?></th>
</tr>
</thead>
<tbody>
<?php foreach ($users as $user):?>
<tr>
<td><?php echo htmlspecialchars($user->first_name,ENT_QUOTES,'UTF-8');?></td>
<td><?php echo htmlspecialchars($user->last_name,ENT_QUOTES,'UTF-8');?></td>
<td><?php echo htmlspecialchars($user->email,ENT_QUOTES,'UTF-8');?></td>
<td>
<?php foreach ($user->groups as $group):?>
<?php echo anchor("auth/edit_group/".$group->id, htmlspecialchars($group->name,ENT_QUOTES,'UTF-8')) ;?><br />
<?php endforeach?>
</td>
<td><?php echo htmlspecialchars($user->codigo,ENT_QUOTES,'UTF-8');?></td>
<td><?php echo ($user->active) ? anchor("auth/deactivate/".$user->id, lang('index_active_link')) : anchor("auth/activate/". $user->id, lang('index_inactive_link'));?></td>
<td><?php echo anchor("auth/edit_user/".$user->id, 'Edit') ;?></td>
<td><?php echo htmlspecialchars($user->red,ENT_QUOTES,'UTF-8');?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<th><?php echo lang('index_fname_th');?></th>
<th><?php echo lang('index_lname_th');?></th>
<th><?php echo lang('index_email_th');?></th>
<th><?php echo lang('index_groups_th');?></th>
<th><?php echo lang('index_code_th');?></th>
<th><?php echo lang('index_status_th');?></th>
<th><?php echo lang('index_action_th');?></th>
<th><?php echo lang('index_net_th');?></th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<div class="widget-foot">
</div>
</div>
редактировать:
это мой JS скрипт:
/* Data Table */
/* ********** */
$(document).ready(function() {
$('#data-table').dataTable({
"sPaginationType": "full_numbers",
"dom": 'T<"clear">lfrtip'
});
});
/* ****************************** */
и мой КСС большой файл, загрузка с веб-страницы datatables.
Я потратил почти неделю на то, чтобы добавить таблетулы в свой код, я просто не могу понять документацию, может ли кто-нибудь указать мне в правильном направлении, пожалуйста.
Спасибо всем!
ли вы имеете в виду «таблицы инструментов» из «Таблицы данных»? – Jobst
Да, это тот. – mtzStrada
так что он делает или НЕ делает .... или работает или не работает ... или появляется таблица или не отображается ... Также где вы заголовок, чтобы увидеть JS и CSS, необходимые для таблицы данных для работы ... – Jobst