<script language="javascript" type="text/javascript">
  var modulo = 'usuarios';
</script>
<?php
  $modulo = 'usuarios';
?>
<div class="row-fluid">
  <div class="span12 btn-inverse div-top-borded">
    Usuários - Moodle
    
    <!-- <a href="<?=$this->linkTo($modulo, "new", array());?>" class="btn btn-small btn-primary">Novo »</a> -->
  <form class="search-query pull-right" method="get" action="<?=$this->linkTo($modulo, "list");?>">
      <input type="text" class="search-query" placeholder="Pesquisa" name="s" value="<?php if(!empty($this->filters['s'])) { echo $this->filters['s']; }?>"/>
      <button type="submit" class="btn">Buscar</button>
      <?php if(!empty($this->filters['s'])): ?>
      <input type="button" class="btn" value="clear" onclick="window.location.href = '<?=$this->linkTo($modulo, "list");?>'"/>
      <?php endif; ?>
    </form>
  </div>
</div>
<div class="row-fluid">
  <table class="table table-striped">
    <thead>
    <tr>
      <th width="5">&nbsp;</th>
      <th class="">Nome </th>
      <th class="">Nome de usuário </th>
      
      <th class="">Email </th>
      <th class="">Telefone </th>
      <th class="">Celular </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("id" => $item->id));?>" title="edit">
          <?=$item->firstname;?> 
          <?=$item->lastname;?>
        </a></td> 
        <td><a href="<?=$this->linkTo($modulo, "edit", array("id" => $item->id));?>" title="edit">
          <?=$item->username;?>
        </a></td> 
        <td><a href="<?=$this->linkTo($modulo, "edit", array("id" => $item->id));?>" title="edit">
          <?=$item->email;?>
        </a></td> 
        <td><a href="<?=$this->linkTo($modulo, "edit", array("id" => $item->id));?>" title="edit">
          <?=$item->telefone;?>
        </a></td> 
        <td><a href="<?=$this->linkTo($modulo, "edit", array("id" => $item->id));?>" title="edit">
          <?=$item->celular;?>
        </a></td> 
         <!-- <td><a href="<?=$this->linkTo($modulo, "edit", array("id" => $item->id));?>" title="edit">
          Q!w2E#r4<br>
          <?php //password_hash( "Q!w2E#r4", PASSWORD_BCRYPT, array() ); ?>
          <?php //$item->password;?>
        </a></td>  -->
        
       
       
        
        <td class="tc">
          <ul class="actions">
            
            <!-- <li><a class="ico" href="<?=$this->linkTo($modulo, "edit", array("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("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 -->
  <?= $this->paginationControl($this->items, null, '_paginator.phtml', array("filters" => $this->filters));?>
</div>