BBnepal-Accounts/library/application/views/lms-admin/books-reload.php
Sampanna Rimal 9cd05ef3cb commitall
2024-07-10 18:28:19 +05:45

72 lines
2.4 KiB
PHP

<table id="tbl" class="display dataTable table-responsive text-center">
<thead>
<tr>
<th>S.No</th>
<th>ISBN</th>
<th>Title</th>
<th>Category</th>
<th>Author</th>
<th>Rack No</th>
<th>Total</th>
<th>Issued</th>
<th>Available</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php if (isset($bookDetail) && !empty($bookDetail)) {
$i = 1;
foreach ($bookDetail as $bData) {
$where = " id=" . $bData['category_id'];
$categoryData = $this->LmsAdmin_Model->getData('lms_categories', $where);
$catName = '';
if ($categoryData) {
$catName = $categoryData['name'];
}
?>
<tr>
<td><?= $i; ?></td>
<td><?= $bData['isbn']; ?></td>
<td><?= $bData['title']; ?></td>
<td><?= $catName; ?></td>
<td><?= $bData['author']; ?></td>
<td><?= $bData['rack_no']; ?></td>
<td><?= $bData['total_quantity']; ?></td>
<td><?= $bData['total_quantity'] - $bData['remaining_quantity']; ?></td>
<td><?= $bData['remaining_quantity']; ?></td>
<td>
<div class="sub_tabbtnsec">
<a href="<?= base_url(); ?>add-edit-book/<?= $bData['id']; ?>">
<div class="sub_editbtn"><i class="fas fa-pencil-alt"></i></div>
</a>
<div class="sub_delbtn" onclick="deleteBook(<?= $bData['id']; ?>)"><i class="fa fa-trash" aria-hidden="true"></i></div>
</div>
</td>
</tr>
<?php $i++;
}
} ?>
</tbody>
</table>
<script>
$(document).ready(function() {
$('.user-drpdown').click(function() {
$('.drpdown-items').toggle();
});
});
//table js
$('#tbl').DataTable({
"lengthMenu": [
[5, 10, 25, 50, -1],
[5, 10, 25, 50, "All"]
]
});
//table js end
//multiple select js start
$('select').selectpicker();
//multiple select js end
</script>