nhance/app/Views/view_file_upload_emp_list.php

70 lines
1.8 KiB
PHP
Executable File

<style>
.table th,
.table td {
padding: 8px;
}
table.dataTable tbody td {
padding: 4px 4px !important;
}
</style>
<div class="responsive-table-plugin">
<div class="table-rep-plugin">
<div class="table-responsive" data-pattern="priority-columns">
<table data-custom-table-css="table" id="tech-companies-1" class="table table-striped">
<thead class="bg-light">
<?php foreach ($thead as $header): ?>
<th><?php echo $header; ?></th>
<?php endforeach; ?>
</thead>
<tbody class="font-12">
<?php helper('excel_util_helper'); foreach ($tbody as $body) { if(check_row_is_empty_or_null($body)){break;} ?>
<tr>
<?php foreach ($body as $data){ ?>
<td><?= esc($data) ?></td>
<?php } ?>
</tr>
<?php } ?>
</tbody>
</table>
</div> <!-- end .table-responsive -->
</div> <!-- end .table-rep-plugin-->
</div> <!-- end .responsive-table-plugin-->
<script>
$('#tech-companies-1').DataTable({
// Enable sorting
"ordering": true,
// Enable filtering/search
"searching": true,
// Enable pagination
"paging": true,
// Set the number of records per page
"pageLength": 10, // Adjust as needed
// Define the initial sorting order (optional)
"order": [[ 0, "asc" ]], // Sort by the first column in ascending order
// Customization for the pagination buttons (optional)
"language": {
"paginate": {
"first": "First",
"last": "Last",
"next": "Next",
"previous": "Previous"
}
}
});
</script>