Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="x_panel">
- <div class="x_title">
- <h2><button type="button" class="add btn btn-primary"><i class="fa fa-plus-square"></i> Tambah Data </button></h2>
- <div class="clearfix"></div>
- </div>
- <table class="table table-striped table-responsive" id="datatables">
- <thead>
- <tr>
- <th>Nomor</th>
- <th>Kode Produk</th>
- <th>Nama Produk</th>
- <th>Action</th>
- </tr>
- </thead>
- <tbody>
- <?php $no=1;
- foreach($datatables->result() as $row){
- echo "<tr>";
- echo "<td>".$no."</td>";
- echo "<td>".$row->kode_produk."</td>";
- echo "<td>".$row->nama_produk."</td>";
- echo "<td>
- <button type='button' class='btn btn-primary btn-xs' onclick=edit('".$row->id_produk."') ><i class='fa fa-edit'></i></button>
- <button type='button' class='btn btn-warning btn-xs' onclick=del('".$row->id_produk."') ><i class='fa fa-trash'></i></button>
- </td>";
- echo "</tr>";
- $no++;} ?>
- </tbody>
- </table>
- </div>
- <!-- Data tables -->
- <style type="text/css">@import url("<?php echo base_url() . 'js/datatables/jquery.dataTables.min.css'; ?>");</style>
- <script type='text/javascript' src="<?php echo base_url(); ?>js/datatables/jquery.dataTables.min.js"></script>
- <script type='text/javascript' src="<?php echo base_url(); ?>js/datatables/dataTables.bootstrap.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $('#datatables').dataTable();
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement