<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 Resumes</h3>
                </div>

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

        <?php if($this->session->flashdata('resume_added')) : ?>
        <p class="alert alert-dismissable alert-success"><?php echo $this->session->flashdata('resume_added'); ?></p>
        <?php endif; ?>

        <div class="panel-heading">Resume
            
            <div class="pull-right">
                <a href="<?php echo base_url(); ?>careers_listings/add_resume_listing"><button type="button" class="btn btn-primary btn-xs">Add New Resume 
                <i class="glyphicon glyphicon-log-in"></i></button></a>
            </div>
        </div>
        
        <!--Mid panel body-->        
        <div class="panel-body">
            <?php if($this->session->flashdata('resume_updated')) : ?>
        <p class="alert alert-dismissable alert-success"><?php echo $this->session->flashdata('resume_updated'); ?></p>
        <?php endif; ?>
        
        <?php if($this->session->flashdata('resume_deleted')) : ?>
        <p class="alert alert-dismissable alert-success"><?php echo $this->session->flashdata('resume_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 == 'first_name') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_resume_list/first_name/" .
                      (($sort_order == 'asc' && $sort_by == 'first_name') ? 'desc' : 'asc') ,
                      'First Name: '); ?></th>
		  <th class="col-md-2" <?php if($sort_by == 'last_name') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_resume_list/last_name/" .
                      (($sort_order == 'asc' && $sort_by == 'last_name') ? 'desc' : 'asc') ,
                      'Last Name: '); ?></th>			  
          <th class="col-md-2" <?php if($sort_by == 'r_skills') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_resume_list/r_skills/" .
                      (($sort_order == 'asc' && $sort_by == 'r_skills') ? 'desc' : 'asc') ,
                      'Skills: '); ?></th>
          <th class="col-md-2" <?php if($sort_by == 'r_job_history') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_resume_list/r_job_history/" .
                      (($sort_order == 'asc' && $sort_by == 'r_job_history') ? 'desc' : 'asc') ,
                      'Most Recent Job: '); ?></th>
          <th class="col-md-2" <?php if($sort_by == 'education') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_resume_list/education/" .
                      (($sort_order == 'asc' && $sort_by == 'education') ? 'desc' : 'asc') ,
                      'Most Recent Degree: '); ?></th>
          <th class="col-md-2" <?php if($sort_by == 'r_phone') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_resume_list/r_phone/" .
                      (($sort_order == 'asc' && $sort_by == 'r_phone') ? 'desc' : 'asc') ,
                      'Phone: '); ?></th>
		  <th class="col-md-2" <?php if($sort_by == 'r_email') echo "id=\"sort_$sort_order\"" ?>><?php echo anchor("careers_listings/my_resume_list/r_email/" .
                      (($sort_order == 'asc' && $sort_by == 'r_email') ? 'desc' : 'asc') ,
                      'E-Mail: '); ?></th>
		  <th class="col-md-2">Resume: </th>			  			
          <th colspan="2"></th>
        </tr>
      </thead>
      <tbody>
           <?php if(!empty($listings) ) { ?> 
          <?php foreach($listings as $list) : ?>
        <tr>
          <td><a href="<?php echo base_url(); ?>auth/view_user"><?php echo $list->first_name; ?></a></td>
          <td><a href="<?php echo base_url(); ?>auth/view_user"><?php echo $list->last_name; ?></a></td>
		  <td><?php echo $list->r_skills; ?></td>
		  <td><?php echo $list->r_job_history; ?></td>
          <td><?php echo $list->education; ?></td>
          <td><?php echo $list->r_phone; ?></td>
		  <td><?php echo $list->r_email; ?></td>
		  <td><a href="<?php echo base_url(); ?>members/<?php echo $list->r_email; ?>/resume/<?php echo $list->r_filename; ?>"  target="_blank"><i class="glyphicon glyphicon-file"></i></a></td>
          <td>
             <a href="<?php echo base_url(); ?>careers_listings/edit_resume_listing/<?php echo $list->resume_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_resume_listing/<?php echo $list->resume_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>
