<?php
if (!$this->error):
    if (count($this->paginator)): ?>
      <table class='grid' cellspacing='1' cellpadding='0' border='0' id='tablePagination'>
        <thead>
        <tr>
          <th nowrap="nowrap">Pendência</th>
          <th nowrap="nowrap">Tipo Pendência</th>
          <th nowrap="nowrap">Chave</th>
          <th nowrap="nowrap">Ações</th>
        </tr>
        </thead>
        <tbody>
        <?php
        $i = 0;
        foreach ($this->paginator as $item):
            $class = $i % 2 == 0 ? '' : "highlight";
            ?>
          <tr class="<?= $class ?>">
            <td nowrap='nowrap'>
              <a href="" title="<?= $item['ds_descricao_pendencia'] ?>">
                  <?= ($item['ds_nome_pendencia'] ? $item['ds_nome_pendencia'] : '&nbsp;') ?>
              </a>
            </td>
            <td nowrap='nowrap'><?= ($item['ds_tipo_pendencia'] ? $item['ds_tipo_pendencia'] : '&nbsp;') ?></td>
            <td nowrap='nowrap'><?= ($item['ds_chave'] ? $item['ds_chave'] : '&nbsp;') ?></td>

            <td align='center' width='1%' nowrap='nowrap'>
                <?= $this->iconActive('atendimento', 'pendencia', $item) ?>
              <a class="icon_edit" href="/atendimento/pendencia/form/id/<?= $item['id'] ?>">
                <img src="/resources/imagens/mini/edit.png" border="0" alt="delete.png" title="Editar"
                     style="cursor:pointer"/>
              </a>

              <a class="icon_delete" href="/atendimento/pendencia/delete/id/<?= $item['id'] ?>">
                <img src="/resources/imagens/mini/delete.png" border="0" alt="delete.png" title="Excluir"
                     style="cursor:pointer"/>
              </a>
            </td>
          </tr>
            <?php
            $i++;
        endforeach;
        ?>
        </tbody>
      </table>
        <?= $this->paginationControl($this->paginator, 'Sliding');
    endif;
else: ?>
    <?= $this->showListError($this->error);
endif;
?>
