<!-- 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-12 col-lg-12">
               <div class="card">
                  <div class="card-header">
                     <h3 class="card-title">All Job Category List</h3>
                     <div class="card-tools">
                       <a href="<?php echo base_url(); ?>admin/career/add_new_job" class="btn btn-success btn-sm"><i class="fa fa-plus" aria-hidden="true"></i> Add New Job</a>
                     </div>
                  </div>
                  <!-- /.card-header -->
                  <div class="card-body">
                     <table width="100%" id="example1" class="table table-bordered table-striped">
                        <thead>
                           <tr>
                              <th>Job Title</th>
                              <th>Employment Status</th>
                              <th>Vacancy</th>
                              <th>Application Deadline</th>
                              <th>Category</th>
                              <th></th>
                           </tr>
                        </thead>
                        <tbody>
                           <?php foreach ($view_all_job as $key => $job):?>
                            <?php $category = $this->career_model->get_category_by_id($job->category); ?>
                           <tr>
                              <td><?php echo $job->title ?></td>
                              <td><?php echo $job->employment_status ?></td>
                              <td><?php echo $job->vacancy ?></td>
                              <td><?php echo $job->application_deadline ?></td>
                              <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="<?php echo base_url();?>admin/career/edit_job/<?php echo $job->code; ?>"><i class="fa fa-edit option-icon"></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/<?php echo $job->id ?>"><i class="fa fa-trash-o" aria-hidden="true"></i>
                                      &nbsp;Delect</a>
                                   </div>
                                </div>
                               </td>
                           </tr>
                        <?php endforeach; ?>
                        </tbody>
                     </table>
                  </div>
                  <!-- /.card-body -->
               </div>
               <!-- /.card -->
            </div>
         </div>
      </div>
   </div>
   
</section>
</div>
