bbone/application/modules/Business/views/module_list.php
2023-07-21 17:12:54 +05:30

69 lines
2.4 KiB
PHP

<head>
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css'>
</head>
<div class="col-md-12 col-sm-12 ">
<div class="x_panel">
<div class="x_title">
<h1>Module List</h1>
<div class="clearfix"></div>
</div>
<div class="x_content">
<div class="row">
<div class="col-sm-12">
<div class="card-box table-responsive">
<table id="datatable" class="table table-striped table-bordered dataTable no-footer" width="100%">
<thead>
<tr class="headings">
<th class="column-title">Modules </th>
<th class="column-title" >Action </th>
</tr>
</thead>
<tbody>
<?php foreach ($module_list as $key => $value) { ?>
<tr class="even pointer">
<td class=" "> <?php echo $value->modules; ?> </td>
<td style=" text-align: center; font-size: 16px;">
<a href="<?php echo base_url()?>Business/edit_module/<?php echo md5($value->id);?>" ><i class="fa fa-pencil"></i></a> &nbsp;
<a href="#"><i class="fa fa-trash delete" aria-hidden="true" title="Delete" data-toggle="modal" data-target=".bs-example-modal-sm" id= "<?php echo md5($value->id); ?>"></i></a>&nbsp;
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<br/>
<!-- Large modal -->
<!-- <button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bs-example-modal-lg" hidden>Large modal</button> -->
<div class="modal fade bs-example-modal-lg" id="ItemModal" tabindex="-1" role="dialog" aria-hidden="true"></div>
<div class="modal bs-example-modal-sm" tabindex="-1" role="dialog" aria-hidden="true" id="popup"> </div>
<div style="display:none" id="sub-value">
<script>
$('.delete').click(function() {
var id = $(this).attr('id');
alert(id);
var url = "<?php echo base_url()?>Business/delete_module";
$.ajax({
url: "<?php echo base_url()?>Business/getDeleteConfirmationPopup",
type:"GET",
success:function(data){
$('#popup').html(JSON.parse(data));
$('.delete_id').attr('value',id);
$('.delete_url').attr('action',url);
}
});
});
</script>