<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
   <section class="content-header">
      <div class="container-fluid">
         <div class="row mb-2">
            <div class="col-sm-6">
               <h4><?php echo htmlspecialchars($title) ?></h4>
            </div>
            <div class="col-sm-6">
               <ol class="breadcrumb float-sm-right">
                  <li class="breadcrumb-item"><a href="<?php echo base_url() ?>admin">Home</a></li>
                  <li class="breadcrumb-item active"><?php echo htmlspecialchars($title) ?></li>
               </ol>
            </div>
         </div>
      </div>
      <!-- /.container-fluid -->
   </section>
   <section class="content">
      <div class="container">
         <div class="row"> 
            <div class="col-md-6 col-lg-6">
               <div class="container-fluid">
                  <?php echo form_open(base_url().'admin/career/add_new_job_category'); ?>
                  <div class="card card-default">
                     <div class="card-header">
                     <h3 class="card-title">Add New Category</h3>
                  </div>
                     <div class="card-body">

                        <div class="tab-content">

                           <!--Application Details-->
                           <div class="tab-pane active" id="general_setting">
                              <div class="form-group row">
                                 <label for="inputName" class="col-sm-12 col-form-label">Add Category Name</label>
                                 <div class="col-sm-12">
                                    <input type="text" name="category_name" class="form-control" id="inputName" placeholder="Enter Category Name" required="required">
                                 </div>
                              </div>
                           </div>
                        </div>
                        <div class="offset-sm-2 col-sm-10">
                           <button style="float: right;" type="submit" class="btn btn-success setting-submit" name="submit">Save</button>
                        </div>
                     </div>
                     <?php echo form_close(); ?>
                  </div>
               </div>
            </div>
   
            <div class="col-md-6 col-lg-6">
               <div class="card">
                  <div class="card-header">
                     <h3 class="card-title">All Job Category List</h3>
                  </div>
                  <!-- /.card-header -->
                  <div class="card-body">
                     <table width="100%" id="example1" class="table table-bordered table-striped">
                        <thead>
                           <tr>
                              <th>Category Name</th>
                              <th></th>
                           </tr>
                        </thead>
                        <tbody>
                           <?php foreach ($get_all_category as $key => $category):?>
                           <tr>
                              <td><?php echo $category->category_name ?></td>

                              <td>
                                 <div class="input-group-prepend">
                                      <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                                        Action
                                      </button>
                                      <div class="dropdown-menu" style="">
                                          <a class="dropdown-item" href="#" data-toggle="modal" data-target="#modal-info<?php echo $category->id ?>"><i class="fa fa-edit" aria-hidden="true"></i>
                                            &nbsp;Edit</a>
                                      
                                       <div class="dropdown-divider"></div>
                                        <a class="dropdown-item" onclick="return confirm('Are you sure?')" href="<?php echo base_url(); ?>admin/career/delete_job_category/<?php echo $category->id ?>"><i class="fa fa-trash" aria-hidden="true"></i>
                                         &nbsp;Delete</a>
                                      </div>
                                 </div>
                              </td>
                           </tr>
                             <div class="modal fade" id="modal-info<?php echo $category->id ?>">
                             <div class="modal-dialog">
                               <div class="modal-content ">
                                 <div class="modal-header">
                                   <h4 class="modal-title">Update Job Category</h4>
                                   <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                     <span aria-hidden="true">&times;</span></button>
                                 </div>
                                 <?php echo form_open('admin/career/update_job_category'); ?>
                                 <div class="modal-body">
                                   <div class="form-group row">
                                      <label for="inputName" class="col-sm-12 col-form-label">Category Name</label>
                                      <div class="col-sm-12">
                                         <input type="text" name="category_name" class="form-control" id="inputName" placeholder="Enter Slider Title" required="required" value="<?php echo $category->category_name;?>">
                                      </div>
                                   </div>
                                   
                                   <input type="hidden" name="category_id" value="<?php echo $category->id ?>">
                                   
                                 <div class="modal-footer justify-content-between">
                                   <button type="button" class="btn btn-outline-light" data-dismiss="modal">Close</button>
                                   <button type="submit" class="btn btn-success">Update</button>
                                 </div>
                               </div>
                               <?php echo form_close() ?>
                               <!-- /.modal-content -->
                             </div>
                             
                             <!-- /.modal-dialog -->
                           </div>
                        <?php endforeach; ?>
                        </tbody>
                     </table>
                  </div>
                  <!-- /.card-body -->
               </div>
               <!-- /.card -->
            </div>
         </div>
      </div>
   </div>
   
</section>
</div>
<!-- /.content-wrapper -->
