<script language="javascript" type="text/javascript">
  var modulo = 'bibliotecas-categorias-categorias';
</script>
<?php
  $modulo = 'bibliotecas-categorias-arquivos';
?>
<div class="row-fluid">
  <div class="span12 btn-inverse div-top-borded">
    Arquivos da categoria: <?=$this->category->titulo?>
    <a href="<?=$this->linkTo('bibliotecas-categorias', "list", array('r'=>$this->category->biblioteca_id));?>" class="btn btn-small btn-info">&laquo; Voltar</a>
    <a href="<?=$this->linkTo($modulo, "new", array('r'=>$this->category->id));?>" class="btn btn-small btn-primary">Novo »</a>
  
  </div>
</div>
<div class="row-fluid">
  <table class="table table-striped">
    <thead>
    <tr>
      <th width="5">&nbsp;</th>
      
      <th class="">Título </th>
      <th class="">Arquivo </th>
      
      
      
      
   
      
      <th class="tc" width="110">Actions</th>
    </tr>
    </thead>
    <tbody>
      <? if(count($this->items) === 0): ?>
      <tr class="first">
        <td colspan="10">Nenhum registro encontrado</td>
      </tr>
      <? endif; ?>
      <? foreach($this->items as $item):?>
      <tr class="first order" id="tr-<?= $item->id; ?>">
        <td class="updown">&nbsp;</td>
        
        <td><a href="<?=$this->linkTo($modulo, "edit", array('r'=>$this->category->id,"id" => $item->id));?>" title="edit">
          <?=str_replace("\r\n", '<br>', strip_tags($item->titulo));?>
        </a></td> 
        <td><a href="<?=BASE_URL?>uploads/bibliotecas/<?=$item->arquivo?>" target="blank" title="arquivi">
          Link arquivo
        </a></td> 
       
       
       
        
        <td class="tc">
          <ul class="actions">
             
            <li><a class="ico" href="<?=$this->linkTo($modulo, "edit", array('r'=>$this->category->id,"id" => $item->id));?>" title="edit"><img src="css/img/led-ico/pencil.png" alt="edit" /></a></li>
            <li><a class="ico confirm" href="<?=$this->linkTo($modulo, "delete", array('r'=>$this->category->id,"id" => $item->id));?>" title="delete"><img src="css/img/led-ico/delete.png" alt="delete" /></a></li>
          </ul>
        </td>
      </tr>
      <? endforeach; ?>
    </tbody>
  </table>
</div>
<div class="row-fluid">
  <!-- pagination -->
  <?php //$this->paginationControl($this->items, null, '_paginator.phtml', array("filters" => $this->filters));?>
</div>