179 lines
7.6 KiB
PHP
179 lines
7.6 KiB
PHP
|
<div class="wraper responsive-width">
|
||
|
<main>
|
||
|
<div class="admin_tempblock">
|
||
|
<div class="admin_tempsec">
|
||
|
<div class="admin_sec">
|
||
|
<div class="subsec_sec">
|
||
|
<div class="subject_r subject_r_lng">
|
||
|
<div class="subject_lsec">
|
||
|
|
||
|
<div class=" mb-4">
|
||
|
<nav aria-label="breadcrumb">
|
||
|
<ol class="breadcrumb">
|
||
|
<li class="breadcrumb-item"><a href="<?= base_url() . 'admin/inventory/dashboard' ?>">Dashboard</a></li>
|
||
|
<li class="breadcrumb-item active" aria-current="page"><?= $title ?></li>
|
||
|
</ol>
|
||
|
</nav>
|
||
|
</div>
|
||
|
|
||
|
<?php if ($this->session->flashdata('success')) { ?>
|
||
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
||
|
<p><b> Success !</b> <?php echo $this->session->flashdata('success') ?></p>
|
||
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||
|
<span aria-hidden="true">×</span>
|
||
|
</button>
|
||
|
</div>
|
||
|
<?php } ?>
|
||
|
|
||
|
<?php if ($this->session->flashdata('danger')) { ?>
|
||
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
||
|
<p><b> Error !</b> <?php echo $this->session->flashdata('danger') ?></p>
|
||
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
||
|
<span aria-hidden="true">×</span>
|
||
|
</button>
|
||
|
</div>
|
||
|
<?php } ?>
|
||
|
<div class="d-flex justify-content-end mb-3 small">
|
||
|
<b style="font-weight: 500">Quick Links:</b>
|
||
|
<a href="<?= base_url() ?>admin/inventory/book-publication" class="text-primary px-1"> Publications </a> |
|
||
|
<a href="<?= base_url() ?>admin/inventory/item-categories" class="text-primary px-1"> Item Categories </a> |
|
||
|
<a href="<?= base_url() ?>admin/inventory/items" class="text-primary px-1"> Items </a> |
|
||
|
<a href="<?= base_url() ?>admin/inventory/item-stocks" class="text-primary px-1"> Stocks </a> |
|
||
|
<a href="<?= base_url() ?>admin/inventory/add-edit-new-entry/0" class="text-primary px-1"> New Purchase Entry </a> |
|
||
|
<a href="<?= base_url() ?>admin/inventory/add-new-sales-record/0" class="text-primary px-1"> New Sales Entry </a>
|
||
|
</div>
|
||
|
<div class="row justify-content-center">
|
||
|
<div class="col-md-4">
|
||
|
<div class="card">
|
||
|
<div class="card-body">
|
||
|
<h5 class="card-title">Add New Publication</h5>
|
||
|
<form method="post" action="<?php echo base_url(); ?>admin/inventory/book-publication">
|
||
|
<div class="form-group mb-0">
|
||
|
<label class="has-float-label">
|
||
|
<input type="text" id="title" name="title" class=" form-control" placeholder='Enter book publication title' required>
|
||
|
<span>Publication Title</span>
|
||
|
</label>
|
||
|
</div>
|
||
|
|
||
|
<div class="mt-4 w-100">
|
||
|
<input type="submit" name="addPublication" id="addPublication" class="btn btn-sm btn-success w-100" value="Add">
|
||
|
</div>
|
||
|
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-md-8 pl-0">
|
||
|
<div class="col-md-12 border rounded py-3">
|
||
|
|
||
|
<!-- -->
|
||
|
<table id="tbl" class="display table-responsive">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th class="textCenter">S.No</th>
|
||
|
<th class="textCenter">Title</th>
|
||
|
<th class="textCenter">Is Active</th>
|
||
|
<th class="textCenter">Action</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<?php
|
||
|
foreach ($book_publications as $bp_key => $p_value) {
|
||
|
?>
|
||
|
<tr>
|
||
|
<td><?= $bp_key + 1 ?></td>
|
||
|
<td class="text-left"><?= $p_value['title'] ?></td>
|
||
|
<td><?= ucfirst($p_value['is_active']) ?></td>
|
||
|
<td>
|
||
|
<button type="button" class="btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#updateModal<?= $p_value['id'] ?>">
|
||
|
<i class="fa fa-edit"></i>
|
||
|
</button>
|
||
|
|
||
|
<div class="modal fade" id="updateModal<?= $p_value['id'] ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||
|
<div class="modal-dialog" role="document">
|
||
|
<div class="modal-content">
|
||
|
<div class="modal-header">
|
||
|
<h5 class="modal-title" id="exampleModalLabel">Update</h5>
|
||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||
|
<span aria-hidden="true">×</span>
|
||
|
</button>
|
||
|
</div>
|
||
|
<form action="<?= base_url(); ?>admin/inventory/book-publication" method="POST" onkeydown=" return event.key != 'Enter'">
|
||
|
<div class="modal-body">
|
||
|
<input type="hidden" name="unitId" value="<?= $p_value['id'] ?>">
|
||
|
|
||
|
<div class="form-group mb-0">
|
||
|
<label class="has-float-label">
|
||
|
<input type="text" id="title" name="title" class=" form-control" value="<?= $p_value['title'] ?>" placeholder='Enter publication title' required>
|
||
|
<span>Publication Title</span>
|
||
|
</label>
|
||
|
</div>
|
||
|
<div class="form-group mt-4">
|
||
|
<label class="has-float-label">
|
||
|
<select id="is_active" class="form-control custom-select" placeholder="Is Active" name="is_active">
|
||
|
<option value="yes" <?= $p_value['is_active'] == 'yes' ? 'selected' : '' ?>>
|
||
|
Yes
|
||
|
</option>
|
||
|
<option value="no" <?= $p_value['is_active'] == 'no' ? 'selected' : '' ?>>
|
||
|
No
|
||
|
</option>
|
||
|
</select>
|
||
|
<span>Is Active</span>
|
||
|
</label>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="modal-footer">
|
||
|
<button type="button" class="btn btn-sm btn-danger" data-dismiss="modal">Close</button>
|
||
|
<input type="submit" name="updatePublication" class="btn btn-sm btn-success" value="Update">
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</td>
|
||
|
</tr>
|
||
|
<?php
|
||
|
}
|
||
|
?>
|
||
|
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</main>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<!--End right-top side-->
|
||
|
|
||
|
<!-- <script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-3.2.1.slim.min.js"></script> -->
|
||
|
<script src="<?php echo base_url(); ?>assets-bustracking/js/jquery-3.4.1.min.js"></script>
|
||
|
<script src="<?php echo base_url(); ?>assets-bustracking/js/popper.min.js"></script>
|
||
|
<script src="<?php echo base_url(); ?>assets-bustracking/js/bootstrap.min.js"></script>
|
||
|
<script src="https://cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js"></script>
|
||
|
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/all.js"></script>
|
||
|
<script defer src="<?php echo base_url(); ?>assets-bustracking/js/main.js"></script>
|
||
|
<script src="<?php echo base_url(); ?>assets-bustracking/owl-carousel/js/owl.carousel.min.js"></script>
|
||
|
<script>
|
||
|
$(document).ready(function() {
|
||
|
//table js
|
||
|
$('#tbl').DataTable({
|
||
|
"lengthMenu": [
|
||
|
[25, 50, 100, 150, -1],
|
||
|
[25, 50, 100, 150, "All"]
|
||
|
]
|
||
|
});
|
||
|
//table js end
|
||
|
|
||
|
});
|
||
|
</script>
|