<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$url = base_url();
echo form_open( base_url('Student_Staz/MojeStaze/' ));
?>

<?php if($komunikat): ?>
	<div class="container-fluid" id="komunikat">
		<div class="container">
			<div class="alert alert-<?= $komunikatTyp ?>">
				<p><?= $komunikatTresc ?></p>
			</div>
		</div>
	</div>
<?php endif; ?>



<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">Zadania stażu <strong><?php echo $nazwaProjektu;?></strong> </h2>
            </div>
            <hr />
            <?php if(!$mojeZadania){ ?>
                <div class="alert alert-danger">Brak zadań przypisanych do stażu</div>
            <?php } // koniec if
            else{ ?>
            <div class="table-responsive">
                <table class="listing_table">
                        <tr>
                        <th class="col-sm-8">Nazwa zadania</th>
                        <th class="col-sm-1 text-center">Podgląd</th>    
                        <th class="col-sm-1 text-center">Raport startowy</th>
                        <th class="col-sm-1 text-center">Raport końcowy</th>
                        </tr>
                    
                        <?php foreach ($mojeZadania as $data): 
                        if($data['raport_start']){
                            $ikona_start = '<span class="zielony"><i class="fa fa-check" aria-hidden="true"></i></span>';
                        }
                        else{
                            $ikona_start = '<span class="czerwony"><i class="fa fa-times" aria-hidden="true"></i></span>';
                        }
                 
                        if($data['raport_finish']){
                            $ikona_finish = '<span class="zielony"><i class="fa fa-check" aria-hidden="true"></i></span>';
                        }
                        else{
                            $ikona_finish = '<span class="czerwony"><i class="fa fa-times" aria-hidden="true"></i></span>';
                        }                 
                 
                 
                        ?>
                            <tr class="zadania_raporty">    
                                <td class="col-sm-8">        
                                    <?php echo $data['task_name']; ?>
                                </td>
                                <td class="col-sm-2 text-center">
                                    <img data-idzad="<?php echo $data['id'];?>" class="szczegoly_zadania" src="<?php echo base_url('assets/img/ikony/view2.png'); ?>"  />
                                </td>
                                <td class="col-sm-2 text-center">
                                    <?php echo anchor(base_url('Student_Staz/Raport/'.$data['project_id'].'/' . $data['id'].'/1'), '<img src="' . base_url('assets/img/ikony/view.jpg') . '" style="margin-right: 10px;">'); 
                                    echo $ikona_start; ?>
                                </td>
                                <td class="col-sm-2 text-center">
                                    <?php echo anchor(base_url('Student_Staz/Raport/'.$data['project_id'].'/' . $data['id'].'/2'), '<img src="' . base_url('assets/img/ikony/view.jpg') . '" style="margin-right: 10px;">'); 
                                    echo $ikona_finish;
                                    ?>
                                </td>
                            </tr>
                        <?php endforeach; ?>           
                </table>
            </div>
            <?php } // koniec else?>
 
        <hr />

            <div class="row margtop20">
                <h2 class="karta_tytul bold">Harmonogram projektu</h2>
            </div>
            <div class="row margtop20">
                <div class="col-sm-12">
                <canvas id="myChart" width="400" height="200"></canvas>
                    <?php echo $daneWykres; ?>
                    <?php //echo '<textarea cols="50" rows="10">'.$daneWykres.'</textarea>'; ?>
                    
                </div>
            </div> 
        
        
        
        
    </div>
</div>
</div> 





