<?
$styleListagem = "style='display: none;'";
$usuarioLogado = Zend_Auth::getInstance()->getIdentity();

if ((new Sistema_Model_Usuarios())->isFuncionarioAgro($usuarioLogado->id)) {
    $styleListagem = "";
}

if (!$this->error) {
    if (count($this->paginator)) {
        ?>
      <table class='grid' cellspacing='1' cellpadding='0' border='0' id='tablePagination'>
        <thead>
        <tr>
          <th nowrap="nowrap" style="display: none;">ID</th>
          <th nowrap="nowrap">Nome</th>
          <th nowrap="nowrap" <?=$styleListagem?>>Ação</th>
        </tr>
        </thead>
        <tbody>
        <?
        $i = 0;
        foreach ($this->paginator as $item) {
            $class = $i % 2 == 0 ? '' : "highlight";
            ?>
          <tr class="<?= $class ?>">
            <td align="center" nowrap='nowrap'>
                <?= $item['ds_nome_funcionario']; ?>
            </td>
            <td align='center' width='1%' nowrap='nowrap' <?=$styleListagem?>>
              <a href="#" data-id-corretor="<?= $item['id_corretor'] ?>"
                 data-id-comercial="<?= $item['id_comercial'] ?>"
                 class="deleteCorretorAdicional">
                <img src="/resources/imagens/mini/delete.png" border="0" alt="delete.png" title="Remover Registro"/>
              </a>
            </td>
          </tr>
            <?
            $i++;
        }
        ?>
        </tbody>
      </table>
        <?
    }
} else {
    echo $this->showListError($this->error);
}
?>