BenitoDannes

list.php

Mar 10th, 2020
617
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.64 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.  
  4. <head>
  5.     <?php $this->load->view("admin/_partials/head.php") ?>
  6. </head>
  7.  
  8. <body class="sb-nav-fixed">
  9.     <?php $this->load->view("admin/_partials/navbar.php") ?>
  10.     <div id="layoutSidenav">
  11.         <div id="layoutSidenav_nav">
  12.             <?php $this->load->view("admin/_partials/sidebar.php") ?>
  13.         </div>
  14.         <div id="layoutSidenav_content">
  15.             <div class="container-fluid">
  16.                 <h1 class="mt-4">List Product</h1>
  17.                 <?php $this->load->view("admin/_partials/breadcrumb.php") ?>
  18.  
  19.                 <!-- DataTables -->
  20.                 <div class="card mb-3">
  21.                     <div class="card-header">
  22.                         <a href="<?php echo site_url('admin/products/add') ?>">
  23.                             <i class="fas fa-plus"></i>
  24.                             Add New
  25.                         </a>
  26.                     </div>
  27.  
  28.                     <div class="card-body">
  29.                         <div class="table-responsive">
  30.                             <table class="table table-hover" id="dataTable" width="100%" cellspacing="0">
  31.                                 <thead>
  32.                                     <tr>
  33.                                         <th>Name</th>
  34.                                         <th>Price</th>
  35.                                         <th>Photo</th>
  36.                                         <th>Description</th>
  37.                                         <th>Action</th>
  38.                                     </tr>
  39.                                 </thead>
  40.                                 <tbody>
  41.                                     <?php foreach ($products as $product): ?>
  42.                                     <tr>
  43.                                         <td width="150">
  44.                                             <?php echo $product->name ?>
  45.                                         </td>
  46.                                         <td>
  47.                                             <?php echo $product->price ?>
  48.                                         </td>
  49.                                         <td>
  50.                                             <img src="<?php echo base_url('upload/product/'.$product->image) ?>" width="64"/>
  51.                                         </td>
  52.                                         <td class="small">
  53.                                             <?php echo substr($product->description, 0, 120) ?>...</td>
  54.                                         </td>
  55.                                         <td width="250">
  56.                                             <a href="<?php echo site_url('admin/products/edit/'.$product->product_id) ?>" class="btn btn-small">
  57.                                                 <i class="fas fa-edit"></i>
  58.                                                 Edit
  59.                                             </a>
  60.                                             <a onclick="deleteConfirm('<?php echo site_url('admin/products/delete/'.$product->product_id) ?>')" href="#!" class="btn btn-small text-danger">
  61.                                                 <i class="fas fa-trash"></i>
  62.                                                 Hapus
  63.                                             </a>
  64.                                         </td>
  65.                                     </tr>
  66.                                     <?php endforeach; ?>
  67.                                 </tbody>
  68.                             </table>
  69.                         </div>
  70.                     </div>
  71.                 </div>
  72.             </div>
  73.             <!-- /.container-fluid -->
  74.  
  75.             <!-- Sticky Footer -->
  76.             <?php $this->load->view("admin/_partials/footer.php") ?>
  77.         </div>
  78.         <!-- /.content-wrapper -->
  79.     </div>
  80.     <!-- /.wrapper -->
  81.  
  82.     <?php $this->load->view("admin/_partials/scrolltop.php") ?>
  83.     <?php $this->load->view("admin/_partials/modal.php") ?>
  84.     <?php $this->load->view("admin/_partials/js.php") ?>
  85.  
  86.     <script>
  87.     function deleteConfirm(url) {
  88.         $('#btn-delete').attr('href', url);
  89.         $('#deleteModal').modal();
  90.     }
  91.     </script>
  92. </body>
  93. </html>
Advertisement
Add Comment
Please, Sign In to add comment