<div class="container">
    <div class="row">
        <div class="col-md-2">
            <div class="panel panel-default">
                
                <!--Left panel heading-->
                <div class="panel-heading">
                    <h3 class="panel-title">My Jobs</h3>
                </div>

                 <!--Left panel body-->
                <div class="panel-body">
                    <ul class="nav nav-pills nav-stacked">
                        <li class="active"><a href="<?php echo base_url(); ?>careers_listings/my_jobs_list">
                                <span class="badge pull-right"><?php echo $total; ?></span>
                                Jobs</a></li>
                        <li><a href="<?php echo base_url(); ?>careers_listings/my_resume_list">
                                <span class="badge pull-right"><?php echo $ptotal; ?></span>
                                Resume</a></li>
                    </ul>
                </div>
            </div>
        </div>

<!--Mid panel heading-->
<div class="col-md-10">
    <div class="panel panel-default">
        <div class="panel-heading">Jobs
            
            <div class="pull-right">
                <a href="<?php echo base_url(); ?>careers_listings/add_job_listing"><button type="button" class="btn btn-primary btn-xs">Add New Job 
                <i class="glyphicon glyphicon-log-in"></i></button></a>
            </div>
        </div>
        
        <!--Mid panel body-->        
        <div class="panel-body">
            <?php if($this->session->flashdata('job_updated')) : ?>
        <p class="alert alert-dismissable alert-success"><?php echo $this->session->flashdata('job_updated'); ?></p>
        <?php endif; ?>
        
        <?php if($this->session->flashdata('job_deleted')) : ?>
        <p class="alert alert-dismissable alert-success"><?php echo $this->session->flashdata('job_deleted'); ?></p>
        <?php endif; ?>
        
            <table  style="font-size: 13px;" class="table-responsive table-bordered table-hover table-condensed">
      <thead>
        <tr>
          <th class="col-md-2" <?php if($sort_by == 'company_name') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_jobs_list/company_name/" .
                      (($sort_order == 'asc' && $sort_by == 'company_name') ? 'desc' : 'asc') ,
                      'Company Name: '); ?></th>
		  <th class="col-md-2" <?php if($sort_by == 'position_name') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_jobs_list/position_name/" .
                      (($sort_order == 'asc' && $sort_by == 'position_name') ? 'desc' : 'asc') ,
                      'Position: '); ?></th>
          <th class="col-md-1" <?php if($sort_by == 'job_type') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_jobs_list/job_type/" .
                      (($sort_order == 'asc' && $sort_by == 'job_type') ? 'desc' : 'asc') ,
                      'Job Type: '); ?></th>
          <th class="col-md-2" <?php if($sort_by == 'city') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_jobs_list/city/" .
                      (($sort_order == 'asc' && $sort_by == 'city') ? 'desc' : 'asc') ,
                      'City: '); ?></th>
		  <th class="col-md-1" <?php if($sort_by == 'state') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_jobs_list/state/" .
                      (($sort_order == 'asc' && $sort_by == 'state') ? 'desc' : 'asc') ,
                      'State: '); ?></th>
          <th class="col-md-2" <?php if($sort_by == 'country') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_jobs_list/country/" .
                      (($sort_order == 'asc' && $sort_by == 'country') ? 'desc' : 'asc') ,
                      'Country: '); ?></th>
          <th class="col-md-2" <?php if($sort_by == 'closing_date') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_jobs_list/closing_date/" .
                      (($sort_order == 'asc' && $sort_by == 'closing_date') ? 'desc' : 'asc') ,
                      'Closing Date: '); ?></th>
          <th class="col-md-2" <?php if($sort_by == 'job_phone') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_jobs_list/job_phone/" .
                      (($sort_order == 'asc' && $sort_by == 'job_phone') ? 'desc' : 'asc') ,
                      'Phone: '); ?></th>
		  <th class="col-md-2" <?php if($sort_by == 'job_email') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_jobs_list/job_email/" .
                      (($sort_order == 'asc' && $sort_by == 'job_email') ? 'desc' : 'asc') ,
                      'E-Mail: '); ?></th>
          <th colspan="2"></th>
        </tr>
      </thead>
      <tbody>
           <?php if(!empty($listings) ) { ?> 
          <?php foreach($listings as $list) : ?>
        <tr>
		  <td><?php echo $list->company_name; ?></td>	
          <td><a href="<?php echo base_url(); ?>careers_listings/display_job_listing/<?php echo $list->listing_id; ?>"><?php echo $list->position_name; ?></a></td>
          <td><?php echo $list->job_type; ?></td>
          <td><?php echo $list->city; ?></td>
		  <td><?php echo $list->state; ?></td>
		  <td><?php echo $list->country; ?></td>
          <td><?php echo $list->closing_date; ?></td>
          <td><?php echo $list->job_phone; ?></td>
		  <td><?php echo $list->job_email; ?></td>
          <td>
             <a href="<?php echo base_url(); ?>careers_listings/edit_job_listing/<?php echo $list->listing_id; ?>"><i class="glyphicon glyphicon-edit"></i></a>
              <!--<i style="left: 10px;" class="glyphicon glyphicon-remove"></i>-->
          <!--</td>-->
          <!--<td>-->
              <!--<a onClick="return confirm('Are you sure?')" href="<?php // echo base_url(); ?>listings/delete_listing/<?php // echo $list->id; ?>"><i style="left: 0px" class="glyphicon glyphicon-trash"></i></a>-->
          
              <a data-confirm="Are you sure you want to delete?" href="<?php echo base_url(); ?>careers_listings/delete_job_listing/<?php echo $list->listing_id; ?>"><i style="left: 0px" class="glyphicon glyphicon-trash"></i></a>
          
          
          
          
          </td>
        </tr>
        <?php endforeach; ?>
         <?php } ?>
      </tbody>
    </table>
        </div>
        
        <!--Mid panel footer-->
        <div class="panel-footer">
            <div class="row">
                <div class="col-md-4">
                    
                     <?php if(!empty($start) && !empty($end)) { ?>
                    
                    Showing: <span id="label" class="label"><?php echo $start; ?> to <?php echo $end; ?> of <?php echo $total; ?> entries</span>
                
                    <?php } ?>
                </div> 
                <div class="col-md-7 pull-right">
                    <div id ="pgcol" class="pgPaginate" id="paginateInfo"> 
                        <?php echo $links; ?>
                    </div>
                </div>
            </div>  
        </div>
        
        
    </div>
</div>
    </div>
</div>
