<!--Cabecalho -->
<?php $this->load->view('commons/cabecalho'); ?>
<?php $this->load->view('commons/header'); ?>
<?php $this->load->view('commons/menu'); ?>
<!--<style>
    .listas {
        display: none;
    }
</style>-->
<div class="lds-css ng-scope"><div style="width:100%;height:100%" class="lds-cube"></div></div>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>LINKS DO CURSO <?=$cursos?></h1>
        
        <br>
    </section>
    
    <section class="content container-fluid" style="margin-top: 0px; min-height: 40px;"> 
    <div class="box">
                <div class="box-body">
                    <form action="<?=base_url()?>addlink" method="post">
        
  
  <div class="form-group">
    <label for="exampleInputPassword1">Título do Link</label>
    <input type="text" class="form-control" id="titulo" name="titulo" placeholder="Digite o título do Link">
    
  </div>
        
  <div class="form-group">
    <label for="exampleInputPassword1">Url</label>
    <input type="text" class="form-control" id="url"  name="url" placeholder="Digite a Url do Link">
  </div>      
                        <input type="hidden" class="form-control" id="id_curso" name="id_curso" placeholder="Digite o título do Link" value="<?=$cursos?>">
  <button type="submit" class="btn btn-primary">Salvar</button>
</form>
                </div></div></section>
    <section class="content container-fluid" >    
        
      
            <div class="box">
                <div class="box-body">
                 <table class="table">
  <thead>
    <tr>
      <th style="width: 100px;">#</th>
      <th style="width: 100px;">TÍTULO</th>
      <th style="max-width: 300px;">URL</th>
      <th style="width: 100px;">AÇÃO</th>
    </tr>
  </thead>
  <tbody>
      
       <?php  
       $i=0;
       foreach ($links as $value) {
                     $i=$i+1;
           
           ?>
 


             
    <tr>
        <th style="width: 100px;"><?=$i?></th>
      <td style="width: 100px;"><?=$value->conteudo?></td>
      <td style="max-width: 300px;"><a href="<?=$value->url?>" target="_black"><?=$value->url?></a></td>
      <td style="width: 100px;"><a href="<?=base_url('excluir_link/')?><?=$value->id_link?>/<?=$value->id_curso?>"
              <span class="glyphicon glyphicon glyphicon-remove" aria-hidden="true" style=" color:  #b71c1c"></span></td>
      </a>
</tr>
    <?php }?>
    
  </tbody>
</table>
                    
                    
                    <div class="dataTables_wrapper form-inline dt-bootstrap">
                        <div class="row">
                            <div class="col-sm-12">
                                
                            </div>
                        </div>
                        
                        
                   </div></div> </div> 
        
       </div></section>    
    
   

<?php $this->load->view('commons/rodape'); ?>
