<?php
$jobsT = Alfred_Hod::table('Jobs', 'Jobs');
$this->jobs = $jobsT->rowset($jobsT->getFilterSelect(array('isDeleted' => 0 ) ) )->getMutliOptions();
 

?>
<table class="table table-striped table-bordered table-condensed">
        <thead>
			<tr>
                                        <td colspan="5">
                                             <span class="main-actions pull-right">
                                                <!--a href="<?php echo $this->url( array( 'action' => 'save' ) ); ?>" class="btn btn-primary" title="<?php echo $this->translate( '#create#' ); ?>" rel="tooltip">
                                                    <span class="icon-plus"></span>

                                                </a-->

                                                <a href="<?php echo $this->url( array( 'action' => 'trash' ) ); ?>" class="btn" rel="tooltip" title="Corbeille">
                                                    <span class="icon-trash"></span>
                                                </a>
                                            </span>

                                            <?php echo $this->paginationControl( $this->paginator ); ?>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td>Ref</td>
                                        <td>Coordonée</td>
                                        <td>Fichiers</td>
                                        
                                        <td></td>
                                    </tr>
        <form>
                                    <tr>
                                        <td></td>
                                        <td><?= $this->formSelect('ref' , $this->search['jobid'], null , $this->jobs  ); ?></td>
                                        <td></td>    
                                        <td></td>
                                        
                                        <td><?= $this->formSubmit('search' , 'search') ; ?>
                                    </tr>
                                        </form>
        </thead>
        <tbody>
            
            <?php
             if( count( $this->paginator)  > 0 ){
                 foreach($this->paginator as $entry ){
                     echo $this->partial('/candidates-admin/partials/entry.phtml' , array( 'entry' => $entry, 'ref' => $this->jobs[$entry->jobid] ) );
                 }
             } 
             else{
                 echo '<tr><td colspan="5">'.$this->translate( '#this list is empty#' ) .'</td></tr>';
             }
            
            ?>
            
        </tbody>
        
        
    </table>