<div class="tlo-default">
<div class="container-fluid"> 
    <h1 class="section-title dash-left"><?php echo $this->company; ?></h1>
</div>

<div class="container">
    <div class="col-xs-12 col-sm-12 col-md-9 offset-md-3 col-lg-9 offset-lg-3 ramka">
            <div class="row margtop20">
                <h2 class="karta_tytul">Staże firmy <strong><?php echo $this->company; ?></strong></h2>
            </div>
            <hr />
            <div class="row margtop20">
                <div class="col-sm-10 text-left nowe_label">
                    Nowy <span>staż</span>
                </div>
                <div class="col-sm-2 text-right nowe_label">
                    <a href="<?php echo base_url('projects/add_project/'.$company_id); ?>"><div class="submitZielony">Dodaj</div></a>
                </div>    
            </div>               
            <hr />
            <div class="table-responsive">
                <table class="listing">
                    <tbody>
                        <?php foreach ($projects as $data): ?>
                            <tr>    
                                <td data-projectid="<?php echo $data['id'];?>" class="col-sm-9">        
                                    <a href="<?php echo base_url('tasks/index/' . $data['id']); ?>"><div class="table_labels"><?php echo $data['project_name']; ?></div></a>
                                </td>
                                
                                
                                <td class="col-sm-2 text-right table_edit_icon">        
                                    <?php echo anchor(base_url('projects/edit_project/' . $data['id']), '<img class="odsun" src="' . base_url('assets/img/ikony/edit.jpg') . '">'); ?>
                                    <?php echo anchor(base_url('projects/delete_project/' . $data['id']), '<img class="odsun" src="' . base_url('assets/img/ikony/trash.jpg') . '">'); ?>
                                    <?php echo anchor(base_url('projects/rate_project/' . $data['id']), '<img src="' . base_url('assets/img/ikony/rate.jpg') . '">'); ?>
                                </td>         
                            </tr>
                        <?php if($data['amount_tasks']){
                            //echo '<tr><td colspan="3" class="rozwin_projekt">Zadania: '.$data['amount_tasks'].' </td></tr>';
                        }  ?>
                        <?php endforeach; ?>
                    </tbody>            
                </table>
            </div> 
                <hr />    
            <div class="row margtop20">
                <?php echo $pagination; ?>
            </div>

    </div>
</div>
</div>    



















<!--

<div class="table-responsive">
    <table class="table table-hover">
        <thead>  
        <th>        
            Nazwa projektu
        </th>    
        <th>
            Opis
        </th>                    
        <th>
            Max studentów
        </th> 
        <th>
            Liczba zadań
        </th>                            
        <th>
            Lista zadań
        </th>                                    
        <th>        
            Edytuj
        </th>     
        <th>        
            Usuń
        </th>         
        </thead>
        <tbody>
            <?php foreach ($projects as $data): ?>
                <tr>    
                    <td>        
                        <?php echo $data['project_name']; ?>
                    </td>    
                    <td>        
                        <?php echo substr($data['description'], 0, 100) . '...'; ?>
                    </td>
                     <td>        
                        <?php if($data['number_of_students'] != NULL ){ echo $data['number_of_students']; } else{ echo "Brak"; }   ?>
                    </td>                    
                    <td>        
                        <?php echo $data['amount_tasks']; ?>
                    </td>                         
                    <td>        
                        <?php echo anchor(base_url('tasks/index/' . $data['id']), '<img src="' . base_url('assets/img/nowe/ikona_edytuj.png') . '">'); ?>                        
                    </td>                                             
                    <td>        
                        <?php echo anchor(base_url('projects/edit_project/' . $data['id']), '<img src="' . base_url('assets/img/nowe/ikona_edytuj.png') . '">'); ?>
                    </td>     
                    <td>        
                        <?php echo anchor(base_url('projects/delete_project/' . $data['id']), '<img src="' . base_url('assets/img/nowe/ikona_usun.png') . '">'); ?>
                    </td>         
                </tr>            
            <?php endforeach; ?>
        </tbody>            
    </table>
</div> 
-->


